瀏覽代碼

Merge pull request #38 from maximal/patch-1

Autofocus on username field
Dmitry Naumenko 10 年之前
父節點
當前提交
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() ?>