documentation update + code fixes

This commit is contained in:
Antonio Ramirez
2017-06-11 23:25:51 +02:00
parent 4dedf111a1
commit 7344ad31df
91 changed files with 1699 additions and 827 deletions

View File

@ -24,29 +24,36 @@ use yii\widgets\ActiveForm;
<?php if ($model->updated): ?>
<?= Alert::widget([
'options' => [
'class' => 'alert-success',
],
'body' => Yii::t('usuario', 'Assignments have been updated'),
]) ?>
<?= Alert::widget(
[
'options' => [
'class' => 'alert-success',
],
'body' => Yii::t('usuario', 'Assignments have been updated'),
]
) ?>
<?php endif ?>
<?php $form = ActiveForm::begin([
'enableClientValidation' => false,
'enableAjaxValidation' => false,
]) ?>
<?php $form = ActiveForm::begin(
[
'enableClientValidation' => false,
'enableAjaxValidation' => false,
]
) ?>
<?= Html::activeHiddenInput($model, 'user_id') ?>
<?= $form->field($model, 'items')->widget(SelectizeDropDownList::class, [
'items' => $availableItems,
'options' => [
'id' => 'children',
'multiple' => true,
],
]) ?>
<?= $form->field($model, 'items')->widget(
SelectizeDropDownList::class,
[
'items' => $availableItems,
'options' => [
'id' => 'children',
'multiple' => true,
],
]
) ?>
<?= Html::submitButton(Yii::t('usuario', 'Update assignments'), ['class' => 'btn btn-success btn-block']) ?>

View File

@ -9,9 +9,9 @@
* the LICENSE file that was distributed with this source code.
*/
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;
use yii\helpers\Html;
/*
* @var yii\web\View $this
@ -23,15 +23,17 @@ use yii\helpers\Html;
?>
<?php if (Yii::$app->user->isGuest): ?>
<?php $form = ActiveForm::begin([
'id' => 'login-widget-form',
'action' => Url::to(['/user/security/login']),
'enableAjaxValidation' => true,
'enableClientValidation' => false,
'validateOnBlur' => false,
'validateOnType' => false,
'validateOnChange' => false,
]) ?>
<?php $form = ActiveForm::begin(
[
'id' => 'login-widget-form',
'action' => Url::to(['/user/security/login']),
'enableAjaxValidation' => true,
'enableClientValidation' => false,
'validateOnBlur' => false,
'validateOnType' => false,
'validateOnChange' => false,
]
) ?>
<?= $form->field($model, 'login')->textInput(['placeholder' => 'Login']) ?>
@ -43,8 +45,12 @@ use yii\helpers\Html;
<?php ActiveForm::end(); ?>
<?php else: ?>
<?= Html::a(Yii::t('usuario', 'Logout'), ['/user/security/logout'], [
'class' => 'btn btn-danger btn-block',
'data-method' => 'post',
]) ?>
<?= Html::a(
Yii::t('usuario', 'Logout'),
['/user/security/logout'],
[
'class' => 'btn btn-danger btn-block',
'data-method' => 'post',
]
) ?>
<?php endif ?>