Example #1
0
 public function getContent()
 {
     // Inicializa assistente de formulário
     $form = new Form("myAddress");
     // Prepara formulário de upload
     $dataArr['street'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->street, "text" => Text::read('form.street'), "length" => 100]];
     $dataArr['number'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->number, "text" => Text::read('form.number'), "length" => 5]];
     $dataArr['complement'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->complement, "text" => Text::read('form.complement'), "length" => 50]];
     $dataArr['local'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->local, "text" => Text::read('form.local'), "length" => 100]];
     $dataArr['city'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->city, "text" => Text::read('form.city'), "length" => 100]];
     $dataArr['state'] = ["type" => Config::read('form.dropdown'), "data" => (object) ["value" => Config::read('combo.states'), "text" => Text::read('form.state'), "selected" => $this->data->state]];
     $dataArr['zipcode'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->zipcode, "text" => Text::read('form.zipcode'), "length" => 9]];
     return $form->createFormFields($dataArr);
 }
Example #2
0
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        // Prepara formulário de inserção/atualização de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $dataArr['title'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->title, "text" => Text::read('form.title'), "length" => 100]];
        $detailForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.detail');
        ?>
</legend>
			  <?php 
        echo $detailForm;
        ?>
			</fieldset>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-camera"></span> <?php 
        echo Text::read('form.photo');
        ?>
</legend>
			  <?php 
        echo $this->photoView->getContent();
        ?>
			</fieldset>
			<br />
		<?php 
        $globalForm = ob_get_clean();
        $dataArr['btnSave'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success", "icon" => "glyphicon-floppy-disk"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
			<div class="panel panel-primary">
			  <div class="panel-body">
				<?php 
        echo $detailForm;
        ?>
			  </div>
			</div>
		<?php 
        return ob_get_clean();
    }
    protected function getContent()
    {
        // Inicializa assistente de formul�rio
        $form = new Form("myDetail");
        // Prepara formul�rio de inser��o/atualiza��o de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $dataArr['status'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->statusText, "text" => Text::read('form.status'), "disabled" => true]];
        $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->name, "text" => Text::read('form.name'), "disabled" => true]];
        $dataArr['text'] = ["type" => Config::read('form.textarea'), "data" => (object) ["value" => $this->data->text, "text" => Text::read('form.description'), "disabled" => true]];
        $dataArr['type'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->type, "text" => Text::read('form.type'), "disabled" => true]];
        $dataArr['subtype'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->subtype, "text" => Text::read('form.subtype'), "disabled" => true]];
        $dataArr['brand'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->brand, "text" => Text::read('form.brand'), "disabled" => true]];
        $detailForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['price'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->price, "text" => Text::read('form.price'), "disabled" => true]];
        $dataArr['discount'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->discount, "text" => Text::read('form.discount'), "disabled" => true]];
        $dataArr['account'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->account]];
        $dataArr['accName'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->accName, "text" => Text::read('form.createdBy'), "disabled" => true]];
        $priceForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.detail');
        ?>
</legend>
			  <?php 
        echo $detailForm;
        ?>
            </fieldset>

            <fieldset>
                <legend><span class="glyphicon glyphicon-camera"></span> <?php 
        echo Text::read('form.photo');
        ?>
</legend>
                <?php 
        echo $this->photoView->getContent();
        ?>
            </fieldset>

            <fieldset>
                <legend><span class="glyphicon glyphicon-usd"></span> <?php 
        echo Text::read('form.price');
        ?>
</legend>
                <?php 
        echo $priceForm;
        ?>
            </fieldset>
		<?php 
        $globalForm = ob_get_clean();
        $dataArr['btnApprove'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.approve'), "class" => "success", "icon" => "glyphicon-thumbs-up"]];
        $dataArr['btnReprove'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.reprove'), "class" => "danger", "icon" => "glyphicon-thumbs-down"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
			<div class="panel panel-primary">
			  <div class="panel-body">
				<?php 
        echo $detailForm;
        ?>
				  
			  </div>
			</div>
        
            <!-- MODAL //-->
            <div class="modal fade" id="myReproveModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="exampleModalLabel"><?php 
        echo Text::read('product.reproval.reason');
        ?>
</h4>
                        </div>
        
                        <div class="modal-body">
                            <form>
                                <div class="form-group">
                                    <label for="message-text" class="control-label"><?php 
        echo Text::read('form.message');
        ?>
:</label>
                                    <textarea class="form-control" id="message-text"></textarea>
                                </div>
                            </form>
                        </div>
                        
                        <div class="modal-footer">
                            <button type="button" id="sendReproveMessage" class="btn btn-primary"><?php 
        echo Text::read('form.send');
        ?>
</button>
                        </div>
                    </div>
                </div>
            </div>
		<?php 
        return ob_get_clean();
    }
Example #4
0
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        if (!$this->data->status) {
            $this->data->statusText = Text::read('product.status')['new'];
        }
        // Prepara formulário de inserção/atualização de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $productForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['shipping'] = ["type" => Config::read('form.radio'), "data" => (object) ["value" => Config::read('combo.shipping'), "text" => Text::read('form.shipping'), "checked" => 1]];
        $shippingForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
            <fieldset>
                <legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.product');
        ?>
</legend>

                <div class="row">
                  <div class="col-md-4 text-center">
            <?php 
        if ($this->data->photos[0]) {
            ?>
                            <img style="width:200px;" src="<?php 
            echo Config::read('url.photos') . '/' . $this->data->album . '/small-' . $this->data->photos[0]->url;
            ?>
" draggable="false">
            <?php 
        }
        ?>
                </div>
                <div class="col-md-6">
                    <h4><?php 
        echo $this->data->name;
        ?>
</h4>
                    <p><?php 
        echo $this->data->text;
        ?>
</p>
                </div>
              </div>
            </fieldset>

            <br />

            <?php 
        echo $productForm;
        ?>

            <fieldset>
              <legend><span class="glyphicon glyphicon-home"></span> <?php 
        echo Text::read('form.shipping.address');
        ?>
</legend>
              <div id="addressCard" class="col-md-6">
                <?php 
        echo OrderDetailView::prepareAddressCard($this->data);
        ?>
              </div>

              <div class="col-md-6">
                <a id="newAddress" class="btn btn-lg btn-info pull-right" href="#">+ Novo endere&ccedil;o de entrega</a>
              </div>
            </fieldset>

            <br />

            <fieldset>
              <legend><span class="glyphicon glyphicon-piggy-bank"></span> <?php 
        echo Text::read('form.price');
        ?>
</legend>
              
              <div class="col-md-4">
                <?php 
        echo $shippingForm;
        ?>
              </div>

              <div class="col-md-4">
                <div class="row">
                  <div class="col-md-6"><b>Valor:</b></div>
                  <div class="col-md-6">R$ <?php 
        echo $this->data->price;
        ?>
</div>
                </div>

                <div class="row">
                  <div class="col-md-6"><b>(-) Desconto:</b></div>
                  <div class="col-md-6">R$ <?php 
        echo $this->data->discount;
        ?>
</div>
                </div>

                <div class="row">
                  <div class="col-md-6"><b>(+) Frete:</b></div>
                  <div class="col-md-6">R$ 0,00</div>
                </div>

                <p>________________________________</p>

                <div class="row">
                  <div class="col-md-6"><b>TOTAL:</b></div>
                  <div class="col-md-6">R$ <?php 
        echo $this->data->price - $this->data->discount;
        ?>
</div>
                </div>
              </div>
            </fieldset>

            <br />
        <?php 
        $globalForm = ob_get_clean();
        $dataArr['btnPay'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success btn-lg", "icon" => "glyphicon-floppy-disk"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
            <!-- STATUS //-->
            <div class="row">
               <div class="col-md-8 col-md-offset-2">

                     <div class="stepwizard">
                        <div class="stepwizard-row setup-panel">
                            <div class="stepwizard-step">
                                <a href="#step-1" type="button" class="btn btn-primary btn-circle">1</a>
                                <p>Dados de Entrega</p>
                            </div>
                            <div class="stepwizard-step">
                                <a href="#step-2" type="button" class="btn btn-default btn-circle" disabled="disabled">2</a>
                                <p>Pagamento</p>
                            </div>
                            <div class="stepwizard-step">
                                <a href="#step-3" type="button" class="btn btn-default btn-circle" disabled="disabled">3</a>
                                <p>Conclus&atilde;o do Pedido</p>
                            </div>
                        </div>
                    </div>

               </div>
            </div>

            <div class="container">
              <div class="row cadastro">
                <div class="col-md-8 col-md-offset-2">
                  <?php 
        echo $detailForm;
        ?>
                </div>
              </div>
            </div>

            <!-- MODAL //-->
            <div class="modal fade" id="myShippingAddressModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4><?php 
        echo Text::read('form.shipping.address');
        ?>
</h4>
                        </div>
        
                        <div class="modal-body">
                          <form id="myShippingAddress" method="POST" action="<?php 
        echo Config::read('page.url.order.shipping.address');
        ?>
" class="form">
                            <?php 
        echo $this->addressView->getContent();
        ?>
                          </form>
                        </div>
                        
                        <div class="modal-footer">
                            <button type="button" id="sendShippingAddress" class="btn btn-primary"><?php 
        echo Text::read('form.save');
        ?>
</button>
                        </div>
                    </div>
                </div>
            </div>
    		<?php 
        return ob_get_clean();
    }
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $dataArr['full'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.name'), "value" => $this->data->name, "length" => 50]];
        $dataArr['surname'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.surname'), "value" => $this->data->surname, "length" => 50]];
        $dataArr['sex'] = ["type" => Config::read('form.radio'), "data" => (object) ["text" => Text::read('form.sex'), "value" => [(object) ["id" => 1, "text" => Text::read('form.man')], (object) ["id" => 2, "text" => Text::read('form.woman')]], "checked" => $this->data->sex]];
        $dataArr['cpf'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.cpf'), "value" => $this->data->cpf, "length" => 14]];
        $accountForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['phone'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.phone'), "value" => $this->data->phone, "length" => 20]];
        $dataArr['cellphone'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.cellphone'), "value" => $this->data->cellphone, "length" => 20]];
        $dataArr['news'] = ["type" => Config::read('form.checkbox'), "data" => (object) ["text" => Text::read('form.newsletter'), "checked" => $this->data->news]];
        $contactForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['email'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.email'), "value" => $this->data->email, "disabled" => true]];
        $dataArr['password'] = ["type" => Config::read('form.password'), "data" => (object) ["text" => Text::read('form.password'), "length" => 20]];
        $securityForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
			<fieldset>
				<legend><span class="glyphicon glyphicon-camera"></span> <?php 
        echo Text::read('form.photo');
        ?>
</legend>
				<?php 
        echo $this->photoView->getContent();
        ?>
			</fieldset>

			<br />

			<fieldset>
				<legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.personal');
        ?>
</legend>
				<?php 
        echo $accountForm;
        ?>
			</fieldset>

			<br />

			<fieldset>
				<legend><span class="glyphicon glyphicon-lock"></span> <?php 
        echo Text::read('form.contact');
        ?>
</legend>
				<?php 
        echo $contactForm;
        ?>
			</fieldset>

			<br />

			<fieldset>
				<legend><span class="glyphicon glyphicon-home"></span> <?php 
        echo Text::read('form.address');
        ?>
</legend>
				<?php 
        echo $this->addressView->getContent();
        ?>
			</fieldset>

			<br />

			<fieldset>
				<legend><span class="glyphicon glyphicon-lock"></span> <?php 
        echo Text::read('form.security');
        ?>
</legend>
				<?php 
        echo $securityForm;
        ?>
			</fieldset>
		<?php 
        $globalForm = ob_get_clean();
        $dataArr['btnSave'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success btn-lg"]];
        $accountForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
			<div class="container">
				<div class="row cadastro">
					<div class="col-md-8 col-md-offset-2">
						<?php 
        echo $accountForm;
        ?>
					</div>
				</div>
			</div>
		<?php 
        return ob_get_clean();
    }
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        // Prepara formulário de inserção/atualização de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->name, "text" => Text::read('form.name'), "length" => 60]];
        $detailForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['email'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->email, "text" => Text::read('form.email'), "length" => 40]];
        $dataArr['password'] = ["type" => Config::read('form.password'), "data" => (object) ["value" => $this->data->password, "text" => Text::read('form.password'), "length" => 20, "help" => Text::read('form.password.help')]];
        $securityForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['blocked'] = ["type" => Config::read('form.checkbox'), "data" => (object) ["value" => true, "text" => Text::read('form.block.user'), "checked" => $this->data->blocked]];
        $accessForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.detail');
        ?>
</legend>
			  <?php 
        echo $detailForm;
        ?>
			</fieldset>
			
			<fieldset>
			  <legend><span class="glyphicon glyphicon-lock"></span> <?php 
        echo Text::read('form.security');
        ?>
</legend>
			  <?php 
        echo $securityForm;
        ?>
			</fieldset>
		<?php 
        if ($controlAccess) {
            ?>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-wrench"></span> <?php 
            echo Text::read('form.access');
            ?>
</legend>
			  <?php 
            echo $accessForm;
            ?>
			</fieldset>
		<?php 
        } else {
            ?>
			<?php 
            echo $accessForm;
            ?>
		<?php 
        }
        $globalForm = ob_get_clean();
        $dataArr['btnSave'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success", "icon" => "glyphicon-floppy-disk"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
			<div class="panel panel-primary">
			  <div class="panel-body">
				<?php 
        echo $detailForm;
        ?>
				  
			  </div>
			</div>
		<?php 
        return ob_get_clean();
    }
Example #7
0
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        // Prepara formulário de inserção/atualização de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $dataArr['title'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->title, "text" => Text::read('form.type'), "length" => 100]];
        $dataArr['parent'] = ["type" => Config::read('form.dropdown'), "data" => (object) ["value" => $this->comboType, "text" => Text::read('form.subtype'), "selected" => $this->data->parent, "disabled" => $this->data->id ? true : false]];
        $detailForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.detail');
        ?>
</legend>
			  <?php 
        echo $detailForm;
        ?>
			</fieldset>

			<fieldset>
			  <legend><span class="glyphicon glyphicon-tags"></span> <?php 
        echo Text::read('form.feature');
        ?>
</legend>
				<div id="featureContainer" <?php 
        echo !$this->data->id ? 'style="display:none;"' : '';
        ?>
>
				  <a tabindex="0" id="btnNewFeature" class="btn btn-info">+ Nova caracteristica</a>
				  <br />
				  <ul id="features" class="list-group">
					<?php 
        echo $this->createFeaturesForm();
        ?>
				  </ul>
			    </div>
				<div id="messageContainer" <?php 
        echo $this->data->id ? 'style="display:none;"' : '';
        ?>
>
					<p>Grave o registro antes de adicionar caracter&iacute;sticas</p>
				</div>
			</fieldset>
		<?php 
        $globalForm = ob_get_clean();
        $dataArr['btnSave'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success", "icon" => "glyphicon-floppy-disk"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        // Inicializa assistente de formulário
        $form = new Form("myNewFeature");
        // Prepara formulário de inserção/atualização de dados
        $dataArr['feature'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.name'), "length" => 60]];
        $dataArr['btnSave'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "primary", "icon" => "glyphicon-floppy-disk"]];
        $form->setHorizontal();
        $featureForm = $form->createForm($dataArr);
        unset($dataArr);
        ob_start();
        ?>
			<div class="panel panel-primary">
			  <div class="panel-body">
				<?php 
        echo $detailForm;
        ?>
				  
			  </div>
			</div>

			<!-- MODAL //-->
            <div class="modal fade" id="newFeatureModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            	<span aria-hidden="true">&times;</span>
                            </button>
        					<h4 class="modal-title" id="exampleModalLabel"><?php 
        echo Text::read('form.feature');
        ?>
</h4>
                        </div>

                        <div class="modal-body">
                        	<div class="row">
                        		<?php 
        echo $featureForm;
        ?>
                        	</div>
                        </div>
                    </div>
                </div>
            </div>
		<?php 
        return ob_get_clean();
    }
Example #8
0
    protected function getContent()
    {
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        // Prepara formulário de inserção/atualização de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.input'), "data" => (object) ["text" => Text::read('form.order'), "value" => $this->data->id, "disabled" => "true"]];
        $orderForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
            <fieldset>
              <div class="col-md-6 col-md-offset-3">
                <?php 
        echo $orderForm;
        ?>
              </div>
            </fieldset>
        <?php 
        $globalForm = ob_get_clean();
        $dataArr['btnPay'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.pagseguro'), "class" => "success btn-lg", "icon" => "glyphicon-money"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
            <!-- STATUS //-->
            <div class="row">
               <div class="col-md-8 col-md-offset-2">

                     <div class="stepwizard">
                        <div class="stepwizard-row setup-panel">
                            <div class="stepwizard-step">
                                <a href="#step-1" type="button" class="btn btn-primary btn-circle">1</a>
                                <p>Dados de Entrega</p>
                            </div>
                            <div class="stepwizard-step">
                                <a href="#step-2" type="button" class="btn btn-primary btn-circle">2</a>
                                <p>Pagamento</p>
                            </div>
                            <div class="stepwizard-step">
                                <a href="#step-3" type="button" class="btn btn-default btn-circle" disabled="disabled">3</a>
                                <p>Conclus&atilde;o do Pedido</p>
                            </div>
                        </div>
                    </div>

               </div>
            </div>

            <div class="container">
              <div class="row cadastro">
                <div class="col-md-8 col-md-offset-2">
                  <?php 
        echo $detailForm;
        ?>
                </div>
              </div>
            </div>
    		<?php 
        return ob_get_clean();
    }
Example #9
0
    protected function getContent()
    {
        // Verifica se usuário possui permissão para alterar o Controle de Acessos
        foreach ($_SESSION['admLogin']->getRoles() as $role) {
            if ($role->rolePageID == str_replace('.detail', '', $this->pageId)) {
                $controlAccess = true;
                break;
            }
        }
        // Inicializa assistente de formulário
        $form = new Form("myDetail");
        // Prepara formulário de inserção/atualização de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->name, "text" => Text::read('form.name'), "length" => 60]];
        $dataArr['email'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->email, "text" => Text::read('form.email'), "length" => 40]];
        $detailForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['login'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->login, "text" => Text::read('form.user'), "length" => 20]];
        $dataArr['password'] = ["type" => Config::read('form.password'), "data" => (object) ["value" => $this->data->password, "text" => Text::read('form.password'), "length" => 20, "help" => Text::read('form.password.help')]];
        $securityForm = $form->createFormFields($dataArr);
        unset($dataArr);
        if ($controlAccess) {
            $dataArr['roles'] = ["type" => Config::read('form.combobox'), "data" => (object) ["value" => $this->comboRoles, "text" => Text::read('form.modules'), "checked" => $this->data->roles]];
            $dataArr['blocked'] = ["type" => Config::read('form.checkbox'), "data" => (object) ["value" => true, "text" => Text::read('form.block.user'), "checked" => $this->data->blocked]];
        } else {
            $dataArr['blocked'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => false]];
        }
        $accessForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-th-list"></span> <?php 
        echo Text::read('form.detail');
        ?>
</legend>
			  <?php 
        echo $detailForm;
        ?>
			</fieldset>
			
			<fieldset>
			  <legend><span class="glyphicon glyphicon-lock"></span> <?php 
        echo Text::read('form.security');
        ?>
</legend>
			  <?php 
        echo $securityForm;
        ?>
			</fieldset>
		<?php 
        if ($controlAccess) {
            ?>
			<fieldset>
			  <legend><span class="glyphicon glyphicon-wrench"></span> <?php 
            echo Text::read('form.access');
            ?>
</legend>
			  <?php 
            echo $accessForm;
            ?>
			</fieldset>
		<?php 
        } else {
            ?>
			<?php 
            echo $accessForm;
            ?>
		<?php 
        }
        $globalForm = ob_get_clean();
        $dataArr['btnSave'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success", "icon" => "glyphicon-floppy-disk"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
			<div class="panel panel-primary">
			  <div class="panel-body">
				<?php 
        echo $detailForm;
        ?>
				  
			  </div>
			</div>
		<?php 
        return ob_get_clean();
    }
Example #10
0
    protected function getContent()
    {
        // Inicializa assistente de formul�rio
        $form = new Form("myDetail");
        if (!$this->data->status) {
            $this->data->statusText = Text::read('product.status')['new'];
        }
        // Prepara formul�rio de inser��o/atualiza��o de dados
        $dataArr['ajax'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => true]];
        $dataArr['id'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->id]];
        $dataArr['status'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->status]];
        $dataArr['statText'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->statusText, "text" => Text::read('form.status'), "disabled" => true]];
        $dataArr['name'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->name, "text" => Text::read('form.name'), "length" => 100, "disabled" => $this->globalDisabled]];
        $dataArr['text'] = ["type" => Config::read('form.textarea'), "data" => (object) ["value" => $this->data->text, "text" => Text::read('form.description'), "disabled" => $this->globalDisabled]];
        $dataArr['type'] = ["type" => Config::read('form.dropdown'), "data" => (object) ["value" => $this->comboType, "text" => Text::read('form.type'), "selected" => $this->data->type, "disabled" => $this->globalDisabled]];
        $dataArr['subtype'] = ["type" => Config::read('form.dropdown'), "data" => (object) ["value" => $this->comboSubType, "text" => Text::read('form.subtype'), "selected" => $this->data->subtype, "disabled" => $this->globalDisabled]];
        $dataArr['brand'] = ["type" => Config::read('form.dropdown'), "data" => (object) ["value" => $this->comboBrand, "text" => Text::read('form.brand'), "selected" => $this->data->brand, "disabled" => $this->globalDisabled]];
        $firstForm = $form->createFormFields($dataArr);
        unset($dataArr);
        $dataArr['price'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->price, "text" => Text::read('form.price'), "disabled" => $this->globalDisabled]];
        $dataArr['discount'] = ["type" => Config::read('form.input'), "data" => (object) ["value" => $this->data->discount, "text" => Text::read('form.discount')]];
        if ($_SESSION['webLogin'] && $_SESSION['webLogin']->getUserID()) {
            $dataArr['account'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $_SESSION['webLogin']->getUserID()]];
            // $dataArr['accName']  = ["type" => Config::read('form.input'),
            //                         "data" => (object)["value" 	  => $_SESSION['webLogin']->getUserName( ),
            //                                            "text" 	  => Text::read('form.createdBy'),
            //                                            "disabled" => true]];
        }
        $lastForm = $form->createFormFields($dataArr);
        unset($dataArr);
        ob_start();
        ?>
            <?php 
        echo $firstForm;
        ?>

            <fieldset>
                <legend><span class="glyphicon glyphicon-camera"></span> <?php 
        echo Text::read('form.photo');
        ?>
</legend>
                <?php 
        echo $this->photoView->getContent();
        ?>
            </fieldset>

            <?php 
        echo $lastForm;
        ?>
        <?php 
        $globalForm = ob_get_clean();
        $dataArr['btnSave'] = ["type" => Config::read('form.submit'), "data" => (object) ["text" => Text::read('form.save'), "class" => "success btn-lg", "icon" => "glyphicon-floppy-disk"]];
        $detailForm = $form->createForm($dataArr, $globalForm);
        unset($dataArr);
        ob_start();
        ?>
              <div class="container">
                <div class="row cadastro">
                  <div class="col-md-8 col-md-offset-2">
                    <?php 
        echo $detailForm;
        ?>
                  </div>
                </div>
              </div>
    		<?php 
        return ob_get_clean();
    }
Example #11
0
    public function createPhotosForm()
    {
        // Prepara formulário(s) de foto(s)
        if (is_array($this->data->photos) && count($this->data->photos) > 0) {
            foreach ($this->data->photos as $singlePhoto) {
                ob_start();
                ?>
                    <div class="col-sm-offset-3 col-sm-6">
                        <div class="avatar">
                            <img class="center-block" src="<?php 
                echo Config::read('url.photos') . '/' . $singlePhoto->album . '/small-' . $singlePhoto->url;
                ?>
" alt="<?php 
                echo $singlePhoto->title;
                ?>
">
                        </div>
                    </div>
                    <div class="col-sm-2 action">
                        <a class="popoverRemove btn btn-default" tabindex="<?php 
                echo $singlePhoto->id;
                ?>
" title="<?php 
                echo Text::read('form.remove.message');
                ?>
" role="button" data-toggle="popover" data-trigger="focus" data-placement="bottom"
                            data-content="<div class='text-center'>
                                            <a href='<?php 
                echo Config::read('page.url.photo.remove');
                ?>
/<?php 
                echo $singlePhoto->id;
                ?>
' class='confirmRemove btn btn-danger'>
                                            <?php 
                echo Text::read('form.remove');
                ?>
                                            </a>
                                          </div>">
                            <i class="glyphicon glyphicon-trash"></i>
                        </a>
                    </div>
                <?php 
                $photoList .= ob_get_clean();
            }
            return $photoList;
        } else {
            // Inicializa assistente de formulário
            $form = new Form("myUpload");
            // Prepara formulário de upload
            $dataArr['album'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->data->album]];
            $dataArr['albumType'] = ["type" => Config::read('form.hidden'), "data" => (object) ["value" => $this->type]];
            $dataArr['file'] = ["type" => Config::read('form.file')];
            return $form->createFormFields($dataArr);
        }
    }