<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
    'id'=>'vehicle-form',
    'enableAjaxValidation'=>false,
)); ?>

<p class="help-block">
	<?php echo(t('Fields with <span class="required">*</span> are required.')); ?>
</p>

<?php 

echo $form->errorSummary($model);

if(user()->checkAccess('vehicle_management_full') || user()->checkAccess('vehicle_create'))
{

  echo $form->textFieldRow($model,'Descrizione',array('class'=>'span5','maxlength'=>250));

  echo $form->textFieldRow($model,'Classe',array('class'=>'span5','maxlength'=>250));

  echo $form->textFieldRow($model,'Abilitato',array('class'=>'span5','maxlength'=>20));

  echo $form->textFieldRow($model,'AreaID',array('class'=>'span5','maxlength'=>20));

  echo $form->textFieldRow($model,'Targa',array('class'=>'span5','maxlength'=>250));

  echo $form->textFieldRow($model,'Nationality',array('class'=>'span5','maxlength'=>250));

  echo $form->textFieldRow($model,'NetworkID',array('class'=>'span5','maxlength'=>20));

  echo $form->textFieldRow($model,'UserID',array('class'=>'span5','maxlength'=>20));

  echo $form->textFieldRow($model,'ID1',array('class'=>'span5','maxlength'=>20));

  echo $form->textFieldRow($model,'ID2',array('class'=>'span5','maxlength'=>20));

  echo $form->textFieldRow($model,'ID3',array('class'=>'span5','maxlength'=>20));

  echo $form->textFieldRow($model,'ID4',array('class'=>'span5','maxlength'=>20));

  echo $form->textFieldRow($model,'ID5',array('class'=>'span5','maxlength'=>20));

  echo $form->textFieldRow($model,'epoch',array('class'=>'span5'));

  echo $form->textFieldRow($model,'source',array('class'=>'span5','maxlength'=>255));

  echo $form->textFieldRow($model,'privacy_level',array('class'=>'span5'));

  echo $form->textAreaRow($model,'action',array('rows'=>6, 'cols'=>50, 'class'=>'span5'));

  echo $form->textFieldRow($model,'list_code',array('class'=>'span5'));

  echo $form->textFieldRow($model,'type',array('class'=>'span5','maxlength'=>255));

  echo $form->textFieldRow($model,'category',array('class'=>'span5','maxlength'=>255));

  echo $form->textAreaRow($model,'note',array('rows'=>6, 'cols'=>50, 'class'=>'span5'));

}
else
{
  echo("<h2>$model->Targa</h2>");

  echo $form->textFieldRow($model,'Descrizione',array('class'=>'span5','maxlength'=>250));

  echo $form->textFieldRow($model,'source',array('class'=>'span5','maxlength'=>255));

  echo $form->textAreaRow($model,'action',array('rows'=>6, 'cols'=>50, 'class'=>'span5'));

  echo $form->textFieldRow($model,'type',array('class'=>'span5','maxlength'=>255));

  echo $form->textFieldRow($model,'category',array('class'=>'span5','maxlength'=>255));

  echo $form->textAreaRow($model,'note',array('rows'=>6, 'cols'=>50, 'class'=>'span5'));

}

?>

<div class="form-actions">
	<?php $this->widget('bootstrap.widgets.TbButton', array(
	    'buttonType'=>'submit',
	    'type'=>'primary',
	    'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
</div>

<?php $this->endWidget(); ?>
