From 3833c12ccce59bcc49c4cfa892401973558f604d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 2 Jan 2017 17:01:27 -0500 Subject: Refactoring/rewrite of modal boxes handling --- app/Template/project_edit/dates.php | 22 ----------- app/Template/project_edit/description.php | 19 ---------- app/Template/project_edit/general.php | 36 ------------------ app/Template/project_edit/show.php | 57 +++++++++++++++++++++++++++++ app/Template/project_edit/task_priority.php | 29 --------------- 5 files changed, 57 insertions(+), 106 deletions(-) delete mode 100644 app/Template/project_edit/dates.php delete mode 100644 app/Template/project_edit/description.php delete mode 100644 app/Template/project_edit/general.php create mode 100644 app/Template/project_edit/show.php delete mode 100644 app/Template/project_edit/task_priority.php (limited to 'app/Template/project_edit') diff --git a/app/Template/project_edit/dates.php b/app/Template/project_edit/dates.php deleted file mode 100644 index 1c2c3dd4..00000000 --- a/app/Template/project_edit/dates.php +++ /dev/null @@ -1,22 +0,0 @@ - -
- form->csrf() ?> - form->hidden('id', $values) ?> - form->hidden('name', $values) ?> - form->date(t('Start date'), 'start_date', $values, $errors) ?> - form->date(t('End date'), 'end_date', $values, $errors) ?> - -
- -
-
- -

diff --git a/app/Template/project_edit/description.php b/app/Template/project_edit/description.php deleted file mode 100644 index 586ddfcb..00000000 --- a/app/Template/project_edit/description.php +++ /dev/null @@ -1,19 +0,0 @@ - -
- form->csrf() ?> - form->hidden('id', $values) ?> - form->hidden('name', $values) ?> - form->textEditor('description', $values, $errors, array('autofocus' => true)) ?> - -
- -
-
diff --git a/app/Template/project_edit/general.php b/app/Template/project_edit/general.php deleted file mode 100644 index c7421477..00000000 --- a/app/Template/project_edit/general.php +++ /dev/null @@ -1,36 +0,0 @@ - -
- form->csrf() ?> - form->hidden('id', $values) ?> - - form->label(t('Name'), 'name') ?> - form->text('name', $values, $errors, array('required', 'maxlength="50"')) ?> - - form->label(t('Identifier'), 'identifier') ?> - form->text('identifier', $values, $errors, array('maxlength="50"')) ?> -

- -
-
- form->label(t('Project owner'), 'owner_id') ?> - form->select('owner_id', $owners, $values, $errors) ?> -
- - user->hasProjectAccess('ProjectCreationController', 'create', $project['id'])): ?> -
- form->checkbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?> -

- - -
- -
-
diff --git a/app/Template/project_edit/show.php b/app/Template/project_edit/show.php new file mode 100644 index 00000000..f574b6f9 --- /dev/null +++ b/app/Template/project_edit/show.php @@ -0,0 +1,57 @@ + +
+ form->csrf() ?> + form->hidden('id', $values) ?> + +
+ + + form->label(t('Name'), 'name') ?> + form->text('name', $values, $errors, array('required', 'maxlength="50"', 'autofocus', 'tabindex="1"')) ?> + + form->label(t('Identifier'), 'identifier') ?> + form->text('identifier', $values, $errors, array('maxlength="50"', 'tabindex="2"')) ?> +

+ + form->label(t('Description'), 'description') ?> + form->textEditor('description', $values, $errors, array('tabindex' => 3)) ?> +
+ +
+ + + user->hasProjectAccess('ProjectCreationController', 'create', $project['id'])): ?> + form->checkbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?> +

+ + +
+ form->label(t('Project owner'), 'owner_id') ?> + form->select('owner_id', $owners, $values, $errors, array('tabindex="5"')) ?> +
+
+ +
+ + + form->date(t('Start date'), 'start_date', $values, $errors, array('tabindex="6"')) ?> + form->date(t('End date'), 'end_date', $values, $errors, array('tabindex="7"')) ?> +
+ +
+ + + form->label(t('Default priority'), 'priority_default') ?> + form->number('priority_default', $values, $errors, array('tabindex="8"')) ?> + + form->label(t('Lowest priority'), 'priority_start') ?> + form->number('priority_start', $values, $errors, array('tabindex="9"')) ?> + + form->label(t('Highest priority'), 'priority_end') ?> + form->number('priority_end', $values, $errors, array('tabindex="10"')) ?> +
+ + modal->submitButtons(array('tabindex' => 11)) ?> +
diff --git a/app/Template/project_edit/task_priority.php b/app/Template/project_edit/task_priority.php deleted file mode 100644 index 3ef4b3cb..00000000 --- a/app/Template/project_edit/task_priority.php +++ /dev/null @@ -1,29 +0,0 @@ - -
- form->csrf() ?> - form->hidden('id', $values) ?> - form->hidden('name', $values) ?> - - form->label(t('Default priority'), 'priority_default') ?> - form->number('priority_default', $values, $errors) ?> - - form->label(t('Lowest priority'), 'priority_start') ?> - form->number('priority_start', $values, $errors) ?> - - form->label(t('Highest priority'), 'priority_end') ?> - form->number('priority_end', $values, $errors) ?> - -
- -
-
- -

-- cgit v1.2.3