diff --git a/views/order/_form.php b/views/order/_form.php index 13e1bd9..7799c47 100755 --- a/views/order/_form.php +++ b/views/order/_form.php @@ -172,11 +172,16 @@ JS;
- field($model, 'deadline') + deadline = date('d.m.Y', (int) $model->deadline); + echo $form->field($model, 'deadline') ->widget( DatePicker::className(), [ 'disabled' => !$permissions->checkAttr('deadline'), + 'pluginOptions' => [ + 'format' => 'dd.mm.yyyy', + ], ] ) ?> @@ -208,7 +213,9 @@ JS; field($model, 'label') ->dropDownList( ArrayHelper::map( - Label::find() + Label::find()->where([ + 'id' => $permissions->labelsArray, + ]) ->asArray() ->all(), 'id', @@ -263,7 +270,7 @@ JS; checkAttr('manager_id')) { + if ($permissions->checkAttr('manager_id')) { echo $form->field($model, 'manager_id') ->dropDownList( ArrayHelper::map( @@ -730,12 +737,11 @@ JS; ); ?>
- checkAttr('add_product')) + echo Html::submitButton( \Yii::t('app', 'Добавить'), [ - 'class' => ( $model->isNewRecord || !$permissions->checkAttr( - 'add_product' - ) ) ? 'btn btn-primary disabled' : 'btn btn-primary', + 'class' => 'btn btn-primary', ] ) ?>
-- libgit2 0.21.4