Просмотр исходного кода

Merge pull request #38 from maximal/patch-1

Autofocus on username field
Dmitry Naumenko 10 лет назад
Родитель
Сommit
418afaec9f
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      views/site/contact.php
  2. 1 1
      views/site/login.php

+ 1 - 1
views/site/contact.php

@@ -43,7 +43,7 @@ $this->params['breadcrumbs'][] = $this->title;
 
                 <?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
 
-                    <?= $form->field($model, 'name') ?>
+                    <?= $form->field($model, 'name')->textInput(['autofocus' => true]) ?>
 
                     <?= $form->field($model, 'email') ?>
 

+ 1 - 1
views/site/login.php

@@ -24,7 +24,7 @@ $this->params['breadcrumbs'][] = $this->title;
         ],
     ]); ?>
 
-        <?= $form->field($model, 'username') ?>
+        <?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?>
 
         <?= $form->field($model, 'password')->passwordInput() ?>