From a964350a64e0423aa98eb3a07dfdba4b6a00e3fa Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 13 Jun 2015 16:08:59 -0400 Subject: UI: Improve tabindex for task forms --- app/Template/task/edit.php | 26 +++++++++++++------------- app/Template/task/new.php | 32 ++++++++++++++++---------------- 2 files changed, 29 insertions(+), 29 deletions(-) (limited to 'app/Template/task') diff --git a/app/Template/task/edit.php b/app/Template/task/edit.php index 2900b739..359df779 100644 --- a/app/Template/task/edit.php +++ b/app/Template/task/edit.php @@ -9,11 +9,17 @@
form->label(t('Title'), 'title') ?> - form->text('title', $values, $errors, array('required', 'maxlength="200"')) ?>
+ form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"')) ?>
form->label(t('Description'), 'description') ?>
+
+ form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"', 'tabindex="2"')) ?> +
+
+
+
  • @@ -22,12 +28,6 @@
-
- form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"')) ?> -
-
-
-
@@ -39,24 +39,24 @@ form->hidden('project_id', $values) ?> form->label(t('Assignee'), 'owner_id') ?> - form->select('owner_id', $users_list, $values, $errors) ?>
+ form->select('owner_id', $users_list, $values, $errors, array('tabindex="3"')) ?>
form->label(t('Category'), 'category_id') ?> - form->select('category_id', $categories_list, $values, $errors) ?>
+ form->select('category_id', $categories_list, $values, $errors, array('tabindex="4"')) ?>
form->label(t('Color'), 'color_id') ?> - form->select('color_id', $colors_list, $values, $errors) ?>
+ form->select('color_id', $colors_list, $values, $errors, array('tabindex="5"')) ?>
form->label(t('Complexity'), 'score') ?> - form->number('score', $values, $errors) ?>
+ form->number('score', $values, $errors, array('tabindex="6"')) ?>
form->label(t('Due Date'), 'date_due') ?> - form->text('date_due', $values, $errors, array('placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ form->text('date_due', $values, $errors, array('placeholder="'.$this->text->in($date_format, $date_formats).'"', 'tabindex="7"'), 'form-date') ?>
- + url->link(t('cancel'), 'board', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?> diff --git a/app/Template/task/new.php b/app/Template/task/new.php index bd00d347..181b82bf 100644 --- a/app/Template/task/new.php +++ b/app/Template/task/new.php @@ -17,11 +17,17 @@
form->label(t('Title'), 'title') ?> - form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"'), 'form-input-large') ?>
+ form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="200"', 'tabindex="1"'), 'form-input-large') ?>
form->label(t('Description'), 'description') ?>
+
+ form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"', 'tabindex="2"')) ?> +
+
+
+
  • @@ -30,12 +36,6 @@
-
- form->textarea('description', $values, $errors, array('placeholder="'.t('Leave a description').'"')) ?> -
-
-
-
@@ -49,35 +49,35 @@ form->hidden('project_id', $values) ?> form->label(t('Assignee'), 'owner_id') ?> - form->select('owner_id', $users_list, $values, $errors) ?>
+ form->select('owner_id', $users_list, $values, $errors, array('tabindex="3"')) ?>
form->label(t('Category'), 'category_id') ?> - form->select('category_id', $categories_list, $values, $errors) ?>
+ form->select('category_id', $categories_list, $values, $errors, array('tabindex="4"')) ?>
form->label(t('Swimlane'), 'swimlane_id') ?> - form->select('swimlane_id', $swimlanes_list, $values, $errors) ?>
+ form->select('swimlane_id', $swimlanes_list, $values, $errors, array('tabindex="5"')) ?>
form->label(t('Column'), 'column_id') ?> - form->select('column_id', $columns_list, $values, $errors) ?>
+ form->select('column_id', $columns_list, $values, $errors, array('tabindex="6"')) ?>
form->label(t('Color'), 'color_id') ?> - form->select('color_id', $colors_list, $values, $errors) ?>
+ form->select('color_id', $colors_list, $values, $errors, array('tabindex="7"')) ?>
form->label(t('Complexity'), 'score') ?> - form->number('score', $values, $errors) ?>
+ form->number('score', $values, $errors, array('tabindex="8"')) ?>
form->label(t('Original estimate'), 'time_estimated') ?> - form->numeric('time_estimated', $values, $errors) ?>
+ form->numeric('time_estimated', $values, $errors, array('tabindex="9"')) ?>
form->label(t('Due Date'), 'date_due') ?> - form->text('date_due', $values, $errors, array('placeholder="'.$this->text->in($date_format, $date_formats).'"'), 'form-date') ?>
+ form->text('date_due', $values, $errors, array('placeholder="'.$this->text->in($date_format, $date_formats).'"', 'tabindex="10"'), 'form-date') ?>
- + url->link(t('cancel'), 'board', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?>
-- cgit v1.2.3