<?php
 /* @var $this PosController */
 /* @var $model Pos */
 /* @var $form CActiveForm */
?>

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

 $this->widget('bootstrap.widgets.TbAlert');


 echo $form->textFieldRow($model, 'name', array('size' => 60, 'maxlength' => 255));

 echo $form->dropDownListRow($model, 'location_id', CHtml::listData(Location::getAll("Active"), 'id', 'code'), array('disabled' => 'disabled'));

 echo $form->uneditableRow($model, 'installation_date');

 echo $form->uneditableRow($model, 'user_id');

 echo $form->textAreaRow($model, 'description', array('size' => 60, 'maxlength' => 255));

 echo $form->uneditableRow($model, 'mac_address', array('size' => 60, 'maxlength' => 255));


 if ($model->isNewRecord)
 {
     $model->status = 'Active';
 }

 echo $form->radioButtonListInlineRow($model, 'status', array('Active' => Yii::t('default', 'Active'), 'Inactive' => Yii::t('default', 'Inactive')));
?>

<div class="actions">
    <?php echo CHtml::submitButton(Yii::t('default', 'Save'), array('class' => 'btn primary')); ?>
     &ensp;
    <?php echo CHtml::link(Yii::t('default', 'Cancel'), array('index'), array('class' => 'btn primary')); ?>
     &ensp;
    <?php echo CHtml::link(Yii::t('default', 'Manage Schedules'), array('/posSchedule/create', 'posId' => $model->id), array('class' => 'btn primary')); ?>
</div>

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

