set autofocus attribute on form fields for better keyboard support (#640)
This commit is contained in:
@@ -52,6 +52,9 @@ class ActivityEditForm extends AbstractType
|
||||
// string - length 255
|
||||
->add('name', TextType::class, [
|
||||
'label' => 'label.name',
|
||||
'attr' => [
|
||||
'autofocus' => 'autofocus'
|
||||
],
|
||||
])
|
||||
// text
|
||||
->add('comment', TextareaType::class, [
|
||||
|
||||
@@ -40,6 +40,9 @@ class CustomerEditForm extends AbstractType
|
||||
$builder
|
||||
->add('name', TextType::class, [
|
||||
'label' => 'label.name',
|
||||
'attr' => [
|
||||
'autofocus' => 'autofocus'
|
||||
],
|
||||
])
|
||||
->add('number', TextType::class, [
|
||||
'label' => 'label.number',
|
||||
|
||||
@@ -46,6 +46,9 @@ class ProjectEditForm extends AbstractType
|
||||
$builder
|
||||
->add('name', TextType::class, [
|
||||
'label' => 'label.name',
|
||||
'attr' => [
|
||||
'autofocus' => 'autofocus'
|
||||
],
|
||||
])
|
||||
->add('comment', TextareaType::class, [
|
||||
'label' => 'label.comment',
|
||||
|
||||
@@ -111,6 +111,9 @@ class TimesheetEditForm extends AbstractType
|
||||
'label' => 'label.begin',
|
||||
'model_timezone' => $timezone,
|
||||
'view_timezone' => $timezone,
|
||||
'attr' => [
|
||||
'autofocus' => 'autofocus',
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,10 @@ class UserCreateType extends UserEditType
|
||||
$builder
|
||||
->add('username', null, [
|
||||
'label' => 'label.username',
|
||||
'required' => true
|
||||
'required' => true,
|
||||
'attr' => [
|
||||
'autofocus' => 'autofocus'
|
||||
],
|
||||
])
|
||||
->add('plainPassword', RepeatedType::class, [
|
||||
'required' => true,
|
||||
|
||||
Reference in New Issue
Block a user