<?php elseif(Yii::$app->user->identity->status == User::STATUS_ADMIN): ?> | <?php elseif(Yii::$app->user->identity->status == User::STATUS_ADMIN): ?> | ||||
<?php $form = ActiveForm::begin(['id' => 'select-etablissement']) ; ?> | <?php $form = ActiveForm::begin(['id' => 'select-etablissement']) ; ?> | ||||
<?= Html::dropDownList('select_etablissement', Yii::$app->user->identity->id_etablissement, ArrayHelper::map(Etablissement::find()->orderBy('nom ASC')->all(), 'id', function($model, $defaultValue) { | <?= Html::dropDownList('select_etablissement', Yii::$app->user->identity->id_etablissement, ArrayHelper::map(Etablissement::find()->orderBy('nom ASC')->all(), 'id', function($model, $defaultValue) { | ||||
return Html::encode($model->nom) ; | |||||
return $model->nom ; | |||||
})) ; ?> | })) ; ?> | ||||
<?php ActiveForm::end(); ?> | <?php ActiveForm::end(); ?> | ||||
<?php endif; ?> | <?php endif; ?> |