Fix tabindexes on task creation and modification forms
- Add focus to tags, color and checkboxes fields
This commit is contained in:
parent
c250f3b1b8
commit
ff53a6aa6b
|
|
@ -90,7 +90,7 @@ class TaskHelper extends Base
|
|||
|
||||
$html = $this->helper->form->label(t('Tags'), 'tags[]');
|
||||
$html .= '<input type="hidden" name="tags[]" value="">';
|
||||
$html .= '<select name="tags[]" id="form-tags" class="tag-autocomplete" multiple>';
|
||||
$html .= '<select name="tags[]" id="form-tags" class="tag-autocomplete" multiple tabindex="3">';
|
||||
|
||||
foreach ($options as $tag) {
|
||||
$html .= sprintf(
|
||||
|
|
@ -110,7 +110,7 @@ class TaskHelper extends Base
|
|||
{
|
||||
$colors = $this->colorModel->getList();
|
||||
$html = $this->helper->form->label(t('Color'), 'color_id');
|
||||
$html .= $this->helper->form->select('color_id', $colors, $values, array(), array(), 'color-picker');
|
||||
$html .= $this->helper->form->select('color_id', $colors, $values, array(), array('tabindex="4"'), 'color-picker');
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ class TaskHelper extends Base
|
|||
return '';
|
||||
}
|
||||
|
||||
$attributes = array_merge(array('tabindex="3"'), $attributes);
|
||||
$attributes = array_merge(array('tabindex="5"'), $attributes);
|
||||
|
||||
$html = $this->helper->form->label(t('Assignee'), 'owner_id');
|
||||
$html .= $this->helper->form->select('owner_id', $users, $values, $errors, $attributes);
|
||||
|
|
@ -134,7 +134,7 @@ class TaskHelper extends Base
|
|||
|
||||
public function renderCategoryField(array $categories, array $values, array $errors = array(), array $attributes = array(), $allow_one_item = false)
|
||||
{
|
||||
$attributes = array_merge(array('tabindex="4"'), $attributes);
|
||||
$attributes = array_merge(array('tabindex="6"'), $attributes);
|
||||
$html = '';
|
||||
|
||||
if (! (! $allow_one_item && count($categories) === 1 && key($categories) == 0)) {
|
||||
|
|
@ -147,7 +147,7 @@ class TaskHelper extends Base
|
|||
|
||||
public function renderSwimlaneField(array $swimlanes, array $values, array $errors = array(), array $attributes = array())
|
||||
{
|
||||
$attributes = array_merge(array('tabindex="5"'), $attributes);
|
||||
$attributes = array_merge(array('tabindex="7"'), $attributes);
|
||||
$html = '';
|
||||
|
||||
if (count($swimlanes) > 1) {
|
||||
|
|
@ -160,7 +160,7 @@ class TaskHelper extends Base
|
|||
|
||||
public function renderColumnField(array $columns, array $values, array $errors = array(), array $attributes = array())
|
||||
{
|
||||
$attributes = array_merge(array('tabindex="6"'), $attributes);
|
||||
$attributes = array_merge(array('tabindex="8"'), $attributes);
|
||||
|
||||
$html = $this->helper->form->label(t('Column'), 'column_id');
|
||||
$html .= $this->helper->form->select('column_id', $columns, $values, $errors, $attributes);
|
||||
|
|
@ -175,14 +175,14 @@ class TaskHelper extends Base
|
|||
$values += array('priority' => $project['priority_default']);
|
||||
|
||||
$html = $this->helper->form->label(t('Priority'), 'priority');
|
||||
$html .= $this->helper->form->select('priority', $options, $values, array(), array('tabindex="7"'));
|
||||
$html .= $this->helper->form->select('priority', $options, $values, array(), array('tabindex="9"'));
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function renderScoreField(array $values, array $errors = array(), array $attributes = array())
|
||||
{
|
||||
$attributes = array_merge(array('tabindex="13"'), $attributes);
|
||||
$attributes = array_merge(array('tabindex="14"'), $attributes);
|
||||
|
||||
$html = $this->helper->form->label(t('Complexity'), 'score');
|
||||
$html .= $this->helper->form->number('score', $values, $errors, $attributes);
|
||||
|
|
@ -192,7 +192,7 @@ class TaskHelper extends Base
|
|||
|
||||
public function renderReferenceField(array $values, array $errors = array(), array $attributes = array())
|
||||
{
|
||||
$attributes = array_merge(array('tabindex="14"'), $attributes);
|
||||
$attributes = array_merge(array('tabindex="15"'), $attributes);
|
||||
|
||||
$html = $this->helper->form->label(t('Reference'), 'reference');
|
||||
$html .= $this->helper->form->text('reference', $values, $errors, $attributes, 'form-input-small');
|
||||
|
|
@ -202,7 +202,7 @@ class TaskHelper extends Base
|
|||
|
||||
public function renderTimeEstimatedField(array $values, array $errors = array(), array $attributes = array())
|
||||
{
|
||||
$attributes = array_merge(array('tabindex="11"'), $attributes);
|
||||
$attributes = array_merge(array('tabindex="12"'), $attributes);
|
||||
|
||||
$html = $this->helper->form->label(t('Original estimate'), 'time_estimated');
|
||||
$html .= $this->helper->form->numeric('time_estimated', $values, $errors, $attributes);
|
||||
|
|
@ -213,7 +213,7 @@ class TaskHelper extends Base
|
|||
|
||||
public function renderTimeSpentField(array $values, array $errors = array(), array $attributes = array())
|
||||
{
|
||||
$attributes = array_merge(array('tabindex="12"'), $attributes);
|
||||
$attributes = array_merge(array('tabindex="13"'), $attributes);
|
||||
|
||||
$html = $this->helper->form->label(t('Time spent'), 'time_spent');
|
||||
$html .= $this->helper->form->numeric('time_spent', $values, $errors, $attributes);
|
||||
|
|
@ -224,13 +224,13 @@ class TaskHelper extends Base
|
|||
|
||||
public function renderStartDateField(array $values, array $errors = array(), array $attributes = array())
|
||||
{
|
||||
$attributes = array_merge(array('tabindex="10"'), $attributes);
|
||||
$attributes = array_merge(array('tabindex="11"'), $attributes);
|
||||
return $this->helper->form->datetime(t('Start Date'), 'date_started', $values, $errors, $attributes);
|
||||
}
|
||||
|
||||
public function renderDueDateField(array $values, array $errors = array(), array $attributes = array())
|
||||
{
|
||||
$attributes = array_merge(array('tabindex="9"'), $attributes);
|
||||
$attributes = array_merge(array('tabindex="10"'), $attributes);
|
||||
return $this->helper->form->datetime(t('Due Date'), 'date_due', $values, $errors, $attributes);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@
|
|||
|
||||
<div class="task-form-bottom">
|
||||
<?php if (! isset($duplicate)): ?>
|
||||
<?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?>
|
||||
<?= $this->form->checkbox('duplicate_multiple_projects', t('Duplicate to multiple projects'), 1) ?>
|
||||
<?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1, '', array("tabindex" => "16")) ?>
|
||||
<?= $this->form->checkbox('duplicate_multiple_projects', t('Duplicate to multiple projects'), 1, false, '', array("tabindex" => "17")) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->modal->submitButtons() ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue