From 4fa9de8390603fca22fa5b45d6c734c15e08739f Mon Sep 17 00:00:00 2001 From: rivten Date: Tue, 11 May 2021 16:30:06 +0200 Subject: [PATCH] Add a min="0" attribute to task_list form input --- app/Template/column/create.php | 2 +- app/Template/column/edit.php | 2 +- app/Template/project_creation/create.php | 2 +- app/Template/project_edit/show.php | 2 +- app/Template/swimlane/create.php | 2 +- app/Template/swimlane/edit.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Template/column/create.php b/app/Template/column/create.php index 034e948c1..1a91ee0b6 100644 --- a/app/Template/column/create.php +++ b/app/Template/column/create.php @@ -8,7 +8,7 @@ form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="191"', 'tabindex="1"')) ?> form->label(t('Task limit'), 'task_limit') ?> - form->number('task_limit', $values, $errors, array('tabindex="2"')) ?> + form->number('task_limit', $values, $errors, array('tabindex="2"', 'min="0"')) ?> form->checkbox('hide_in_dashboard', t('Hide tasks in this column in the dashboard'), 1, false, '', array('tabindex' => 3)) ?> diff --git a/app/Template/column/edit.php b/app/Template/column/edit.php index def0f2999..c5a3ae14a 100644 --- a/app/Template/column/edit.php +++ b/app/Template/column/edit.php @@ -9,7 +9,7 @@ form->text('title', $values, $errors, array('autofocus', 'required', 'maxlength="191"')) ?> form->label(t('Task limit'), 'task_limit') ?> - form->number('task_limit', $values, $errors) ?> + form->number('task_limit', $values, $errors, array('min="0"')) ?> form->checkbox('hide_in_dashboard', t('Hide tasks in this column in the dashboard'), 1, $values['hide_in_dashboard'] == 1) ?> diff --git a/app/Template/project_creation/create.php b/app/Template/project_creation/create.php index a7619ee88..404ac1efa 100644 --- a/app/Template/project_creation/create.php +++ b/app/Template/project_creation/create.php @@ -17,7 +17,7 @@ form->checkbox('per_swimlane_task_limits', t('Column task limits apply to each swimlane individually'), 1, false) ?> form->label(t('Task limit'), 'task_limit') ?> - form->number('task_limit', $values, $errors) ?> + form->number('task_limit', $values, $errors, array('min="0"')) ?> 1): ?> form->label(t('Create from another project'), 'src_project_id') ?> diff --git a/app/Template/project_edit/show.php b/app/Template/project_edit/show.php index be849cce9..6fe32f851 100644 --- a/app/Template/project_edit/show.php +++ b/app/Template/project_edit/show.php @@ -30,7 +30,7 @@ form->checkbox('per_swimlane_task_limits', t('Task limits apply to each swimlane individually'), 1, $project['per_swimlane_task_limits'] == 1, '', array('tabindex' => 5)) ?> form->label(t('Task limit'), 'task_limit') ?> - form->number('task_limit', $values, $errors, array('tabindex' => 6)) ?> + form->number('task_limit', $values, $errors, array('tabindex' => 6, 'min="0"')) ?>
diff --git a/app/Template/swimlane/create.php b/app/Template/swimlane/create.php index 3a6519613..8ecfa5232 100644 --- a/app/Template/swimlane/create.php +++ b/app/Template/swimlane/create.php @@ -11,7 +11,7 @@ form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?> form->label(t('Task limit'), 'task_limit') ?> - form->number('task_limit', $values, $errors, array('tabindex' => 3)) ?> + form->number('task_limit', $values, $errors, array('tabindex' => 3, 'min="0"')) ?> modal->submitButtons() ?> diff --git a/app/Template/swimlane/edit.php b/app/Template/swimlane/edit.php index ebe6a3458..046407a88 100644 --- a/app/Template/swimlane/edit.php +++ b/app/Template/swimlane/edit.php @@ -12,7 +12,7 @@ form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?> form->label(t('Task limit'), 'task_limit') ?> - form->number('task_limit', $values, $errors, array('tabindex' => 3)) ?> + form->number('task_limit', $values, $errors, array('tabindex' => 3, 'min="0"')) ?> modal->submitButtons() ?>