diff --git a/app/Helper/FormHelper.php b/app/Helper/FormHelper.php
index e44c5d066..fb088d230 100644
--- a/app/Helper/FormHelper.php
+++ b/app/Helper/FormHelper.php
@@ -131,16 +131,34 @@ class FormHelper extends Base
* Display a checkbox field
*
* @access public
- * @param string $name Field name
- * @param string $label Form label
- * @param string $value Form value
- * @param boolean $checked Field selected or not
- * @param string $class CSS class
+ * @param string $name Field name
+ * @param string $label Form label
+ * @param string $value Form value
+ * @param boolean $checked Field selected or not
+ * @param string $class CSS class
+ * @param array $attributes
* @return string
*/
- public function checkbox($name, $label, $value, $checked = false, $class = '')
+ public function checkbox($name, $label, $value, $checked = false, $class = '', array $attributes = array())
{
- return '';
+ $htmlAttributes = '';
+
+ if ($checked) {
+ $attributes['checked'] = 'checked';
+ }
+
+ foreach ($attributes as $attribute => $value) {
+ $htmlAttributes .= sprintf('%s="%s"', $attribute, $this->helper->text->e($value));
+ }
+
+ return sprintf(
+ '',
+ $name,
+ $class,
+ $this->helper->text->e($value),
+ $htmlAttributes,
+ $this->helper->text->e($label)
+ );
}
/**
diff --git a/app/Template/category/edit.php b/app/Template/category/edit.php
index 72fd40de1..d8ca313d3 100644
--- a/app/Template/category/edit.php
+++ b/app/Template/category/edit.php
@@ -10,10 +10,10 @@
= $this->form->hidden('project_id', $values) ?>
= $this->form->label(t('Category Name'), 'name') ?>
- = $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
+ = $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"', 'tabindex="1"')) ?>
= $this->form->label(t('Description'), 'description') ?>
- = $this->form->textEditor('description', $values, $errors) ?>
+ = $this->form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?>
diff --git a/app/Template/category/index.php b/app/Template/category/index.php
index ac60d9a86..336b79a2b 100644
--- a/app/Template/category/index.php
+++ b/app/Template/category/index.php
@@ -15,9 +15,11 @@
-
+
= $this->url->link(t('Edit'), 'CategoryController', 'edit', array('project_id' => $project['id'], 'category_id' => $category_id), false, 'popover') ?>
-
+
= $this->url->link(t('Remove'), 'CategoryController', 'confirm', array('project_id' => $project['id'], 'category_id' => $category_id), false, 'popover') ?>
diff --git a/app/Template/column/create.php b/app/Template/column/create.php
index 71c94062b..f4cded52f 100644
--- a/app/Template/column/create.php
+++ b/app/Template/column/create.php
@@ -8,18 +8,18 @@
= $this->form->hidden('project_id', $values) ?>
= $this->form->label(t('Title'), 'title') ?>
- = $this->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
+ = $this->form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="50"', 'tabindex="1"')) ?>
= $this->form->label(t('Task limit'), 'task_limit') ?>
- = $this->form->number('task_limit', $values, $errors) ?>
+ = $this->form->number('task_limit', $values, $errors, array('tabindex="2"')) ?>
- = $this->form->checkbox('hide_in_dashboard', t('Hide tasks in this column in the dashboard'), 1) ?>
+ = $this->form->checkbox('hide_in_dashboard', t('Hide tasks in this column in the dashboard'), 1, false, '', array('tabindex' => 3)) ?>
= $this->form->label(t('Description'), 'description') ?>
- = $this->form->textEditor('description', $values, $errors) ?>
+ = $this->form->textEditor('description', $values, $errors, array('tabindex' => 4)) ?>
-
+
= t('or') ?>
= $this->url->link(t('cancel'), 'column', 'index', array('project_id' => $project['id']), false, 'close-popover') ?>
diff --git a/app/Template/swimlane/create.php b/app/Template/swimlane/create.php
index 0eb254111..207b526c1 100644
--- a/app/Template/swimlane/create.php
+++ b/app/Template/swimlane/create.php
@@ -7,13 +7,13 @@
= $this->form->hidden('project_id', $values) ?>
= $this->form->label(t('Name'), 'name') ?>
- = $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
+ = $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"', 'tabindex="1"')) ?>
= $this->form->label(t('Description'), 'description') ?>
- = $this->form->textEditor('description', $values, $errors) ?>
+ = $this->form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?>
-
+
= t('or') ?>
= $this->url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?>
diff --git a/app/Template/swimlane/edit.php b/app/Template/swimlane/edit.php
index 2cbabb60c..d225b345e 100644
--- a/app/Template/swimlane/edit.php
+++ b/app/Template/swimlane/edit.php
@@ -10,13 +10,13 @@
= $this->form->hidden('project_id', $values) ?>
= $this->form->label(t('Name'), 'name') ?>
- = $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
+ = $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"', 'tabindex="1"')) ?>
= $this->form->label(t('Description'), 'description') ?>
- = $this->form->textEditor('description', $values, $errors) ?>
+ = $this->form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?>
-
+
= t('or') ?>
= $this->url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?>
diff --git a/app/Template/swimlane/edit_default.php b/app/Template/swimlane/edit_default.php
index f271c5139..8a0c0a153 100644
--- a/app/Template/swimlane/edit_default.php
+++ b/app/Template/swimlane/edit_default.php
@@ -6,7 +6,7 @@
= $this->form->hidden('id', $values) ?>
= $this->form->label(t('Name'), 'default_swimlane') ?>
- = $this->form->text('default_swimlane', $values, $errors, array('required', 'maxlength="50"')) ?>
+ = $this->form->text('default_swimlane', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
= $this->form->checkbox('show_default_swimlane', t('Show default swimlane'), 1, $values['show_default_swimlane'] == 1) ?>
diff --git a/app/Template/swimlane/table.php b/app/Template/swimlane/table.php
index cefef9def..81daed013 100644
--- a/app/Template/swimlane/table.php
+++ b/app/Template/swimlane/table.php
@@ -20,12 +20,15 @@
-
+
= $this->url->link(t('Edit'), 'SwimlaneController', 'editDefault', array('project_id' => $project['id']), false, 'popover') ?>
-
+
= $this->url->link(t('Disable'), 'SwimlaneController', 'disableDefault', array('project_id' => $project['id']), true) ?>
+
= $this->url->link(t('Enable'), 'SwimlaneController', 'enableDefault', array('project_id' => $project['id']), true) ?>
@@ -55,16 +58,20 @@
-
+
= $this->url->link(t('Edit'), 'SwimlaneController', 'edit', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?>
-
+
= $this->url->link(t('Disable'), 'SwimlaneController', 'disable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
+
= $this->url->link(t('Enable'), 'SwimlaneController', 'enable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
-
+
= $this->url->link(t('Remove'), 'SwimlaneController', 'confirm', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?>