update.php 3.03 KB
<?php
    
    /**
     * @var View                    $this
     * @var \common\models\Customer $model
     */
    
    use yii\web\View;
    use yii\widgets\ActiveForm;
    use yiister\gentelella\widgets\Panel;

    $this->title = 'Заявка № ' . $model->id;
    
    $this->params['breadcrumbs'][] = [
      'label' => 'Все заявки',
      'url' => ['/request']
    ];
    
    $this->params['breadcrumbs'][] = $this->title;
    

?>


<div class="alias-update">
    <?php $form = ActiveForm::begin(); ?>
    <?php
        $xPanel = Panel::begin(
            [
                'header' => $this->title,
            ]
        );
    ?>
  
  <div class="wrapp-blocks-edit-page">
    
      <?= $form->field($model, 'status')
               ->dropDownList(
                   [
                       2 => 'Новая',
                       1 => 'Одобрена',
                       0 => 'Отклонена',
                   ]
               ) ?>
    
     <!-- --><?php /*echo $form->field($model, 'secondname')
               ->textInput() */?>
      
      <?= $form->field($model, 'name')
               ->textInput() ?>
      
      <?= $form->field($model, 'organization')
               ->textInput() ?>
	  <?= $form->field($model, 'email')
		   ?>
	  <?= $form->field($model, 'post_address')
		  ->textInput() ?>
	  <?= $form->field($model, 'phone_office')
		  ->textInput() ?>
	  <?= $form->field($model, 'phone_other')
		  ->textInput() ?>
	  <?= $form->field($model, 'fax')
		  ->textInput() ?>
	  <?= $form->field($model, 'citizenship')
		  ->textInput() ?>
      <?= $form->field($model, 'gender')
               ->dropDownList(
                   [
                       1 => 'Мужской',
                       2 => 'Женский',
                   ]
               ) ?>
      
      <?= $form->field($model, 'birth')
               ->textInput() ?>
      

      
      
      <?= $form->field($model, 'passport_number')
               ->textInput() ?>
	  <?= $form->field($model, 'passport_date')
		  ->textInput() ?>
	  <?= $form->field($model, 'passport_place')
		  ->textInput() ?>
	  <?= $form->field($model, 'passport_valid')
		  ->textInput() ?>

	  <?= $form->field($model, 'need_visa')
		  ->dropDownList(
			  [
				  0 => 'Нет',
				  1 => 'Да',
			  ]
		  ) ?>
	  <?= $form->field($model, 'special_meal')
		  ->textInput() ?>


	  <?php echo $form->field($model, 'working_lang')
		  ->dropDownList([
			  2 => \Yii::t('app', "RusW"),
			  1  => \Yii::t('app', 'EngW'),
			  4 => \Yii::t('app', 'FrW'),
		  ]);

	  ?>



    
    <div class="style buttons-page-wr">
      <a href="<?= $model->image ?>" class="btn btn-success" download=>Скачать фото <i class="fa fa-download"></i></a>
    </div>
  
  </div>
    
    <?php
        $xPanel::end();
    ?>
  
  <div class="style buttons-page-wr">
      <?= \yii\helpers\Html::submitButton(
          'Сохранить',
          [ 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-success' ]
      ) ?>
  </div>
    
    
    <?php ActiveForm::end(); ?>

</div>