<?php
/* @var $this PersonController */
/* @var $model Person */

$person = LDAPPerson::model()->findByPk($id);
$this->breadcrumbs = array(
    yii::t('default', 'Persons') => array('/person/index'),
    yii::t('default', 'Non-LDAP Person') => '',
    $person->name => array('/nonLDAPPerson/view', 'id' => $id),
    yii::t('default', 'Convert to LDAP'),
);



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


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



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

echo $form->hiddenField($model, 'name');

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

echo $form->hiddenField($model, 'alias');

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

echo $form->hiddenField($model, 'number');

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

echo $form->hiddenField($model, 'type_id');

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

echo $form->hiddenField($model, 'mobile');

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

echo $form->uneditableRow($model, 'manager', array('size' => 45, 'maxlength' => 45));

echo $form->hiddenField($model, 'manager');

echo $form->dropDownListRow($model, 'department_id', CHtml::listData(Department::getAll("Active"), 'id', 'name'), array('empty' => Yii::t('default', 'Select Department')));

echo $form->radioButtonListInlineRow($model, 'is_manager', array('1' => Yii::t('default', 'Yes'), '0' => Yii::t('default', 'No')));

echo $form->radioButtonListInlineRow($model, 'is_food_manager', array('1' => Yii::t('default', 'Yes'), '0' => Yii::t('default', 'No')));

echo $form->radioButtonListInlineRow($model, 'receive_emails', array('1' => Yii::t('default', 'Yes'), '0' => Yii::t('default', 'No')));

echo $form->dropDownListRow($model, 'status', array('Active' => Yii::t('default', 'Active')
    , 'On Leave' => Yii::t('default', 'On Leave')
    , 'Terminated' => Yii::t('default', 'Terminated')
    , 'Resigned' => Yii::t('default', 'Resigned')
    , 'Transferred' => Yii::t('default', 'Transferred')
    , 'Inactive' => Yii::t('default', 'Inactive')
));
?>

<div class="actions">
    <?php echo CHtml::submitButton(Yii::t('default', 'Convert'), array('class' => 'btn primary')); ?>
    &ensp;
    <?php echo CHtml::link(Yii::t('default', 'Cancel'), array('/nonLDAPPerson/view', 'id' => $id), array('class' => 'btn primary')); ?>
</div>

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