Advertisement
fernandezekiel

multi class form

Dec 31st, 2012
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.43 KB | None | 0 0
  1. <?php
  2. /* @var $this CustomerController */
  3. /* @var $model Customer */
  4.  
  5. $this->breadcrumbs=array(
  6.     'Customers'=>array('index'),
  7.     'Create',
  8. );
  9.  
  10. $this->menu=array(
  11.             array('label'=>'Customer Menu', 'itemOptions'=>array('class'=>'nav-header')),
  12.             array('label'=>'Manage Customers', 'url'=>array('admin'),'icon'=>'icon-wrench'),   
  13. );
  14.  
  15. ?>
  16.  
  17.  
  18.  
  19.  
  20.  
  21. <div class="content_left">
  22.     <div class="progress_bar">
  23.     Customer Information <span id="percent"></span> Complete
  24.     <?php
  25.     $this->widget('bootstrap.widgets.TbProgress', array(
  26.         'striped'=>true,
  27.         'animated'=>true,
  28.     ));
  29.     ?>
  30.     </div>
  31.    
  32.         <?php
  33.             $box = $this->beginWidget('bootstrap.widgets.TbBox', array(
  34.                 'title' => 'Create Customer',
  35.                 'headerIcon'=>'icon-plus',
  36.                 // when displaying a table, if we include bootstra-widget-table class
  37.                 // the table will be 0-padding to the box
  38.                 'htmlOptions' => array('class'=>'bootstrap-widget-table')
  39.             ));?>
  40.             <div id="crmbox">
  41.                 <?php /** @var BootActiveForm $form */
  42.                     $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
  43.                         'id'=>'customer-form',
  44.                         'type'=>'horizontal',
  45.                         'enableAjaxValidation'=>false,
  46.                 )); ?>
  47.  
  48.  
  49. <!--<?php
  50.    
  51.     $form=$this->beginWidget('CActiveForm', array(
  52.     'id'=>'customer-form',
  53.     'enableAjaxValidation'=>false,
  54. )); ?>-->
  55.    
  56. <p class="note" style="color:#555;font-weight:bold;font-style: italic"><span class="label label-important">Important! </span>&nbsp;Fields with <span class="required">*</span> are required.</p>
  57. <fieldset><table><tbody>   
  58. <?php echo $this->renderPartial('_form', array('model'=>$customer, 'form' => $form)); ?>
  59.  
  60. <?php
  61.     foreach($address as $key=>$value)
  62.     {
  63.         echo $this->renderPartial('_address', array('model'=>$value,'key'=>$key, 'form' => $form));
  64.     }
  65.  
  66. ?>
  67. <!-------------------------------------- ADDRESS INPUT ----------------------------->
  68. </tbody></table></fieldset>
  69. <div class="btn-toolbar" style="float:right;margin-right:70px;">
  70. <?php
  71.  
  72.  $this->widget('bootstrap.widgets.TbButton', array(
  73.     'buttonType'=>'submit',
  74.     'type'=>'primary',
  75.     'size'=>'large',
  76.     'label'=>'Create',
  77.    
  78.     'loadingText'=>'Creating...',
  79.     'htmlOptions'=>array('id'=>'buttonStateful'),
  80. ));
  81.  
  82. $this->widget('bootstrap.widgets.TbButtonGroup', array(
  83.     'size'=>'large',
  84.     'buttons'=>array(
  85.        array('label'=>'Cancel', 'url'=>array('/crm/customer')),),
  86. ));
  87. ?>
  88. </div>
  89.     <!--<div class="row buttons">
  90.    
  91.         <?php
  92.         $model = $address;
  93.         echo CHtml::submitButton($customer->isNewRecord ? 'Create' : 'Save'); ?>
  94.     </div>-->
  95. <?php $this->endWidget(); ?>
  96. <?php $this->endWidget();?><!-- widget of form -->
  97. <?php $this->endWidget(); ?><!-- widget of box-->
  98. </div>
  99.  
  100. </div>
  101.  
  102.  
  103.  
  104. <!-- right part of content
  105. <div class="content_right">
  106. <?php
  107.     $this->widget('bootstrap.widgets.TbMenu', array(
  108.         'type'=>'list',
  109.         'items' => array(
  110.             array('label'=>'Customer Relation Management Menu', 'itemOptions'=>array('class'=>'nav-header')),
  111.             array('label'=>'Customers', 'url'=>array('/customers/customer'),'icon'=>'icon-list'),
  112.             array('label'=>'Contacts', 'url'=>array('/customers/contact'),'icon'=>'icon-list'),
  113.             array('label'=>'Leads', 'url'=>array('/customers/lead'),'icon'=>'icon-list'),
  114.             '',
  115.             array('label'=>'Customer Menu', 'itemOptions'=>array('class'=>'nav-header')),
  116.             array('label'=>'Manage Customer', 'url'=>array('/customers/customer/admin'),'icon'=>'icon-wrench'),        
  117.         )
  118.     ));
  119. ?>
  120. </div>  -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement