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/action/index.php | 12 ++--- app/Template/action/remove.php | 10 ++-- app/Template/action_creation/create.php | 8 +-- app/Template/action_creation/event.php | 9 +--- app/Template/action_creation/params.php | 9 +--- app/Template/board/table_column.php | 8 ++- app/Template/board/task_footer.php | 2 +- app/Template/board/tooltip_files.php | 2 +- .../board_popover/close_all_tasks_column.php | 26 ++++------ app/Template/category/edit.php | 9 +--- app/Template/category/index.php | 6 +-- app/Template/category/remove.php | 28 +++++------ app/Template/column/create.php | 9 +--- app/Template/column/edit.php | 8 +-- app/Template/column/index.php | 9 ++-- app/Template/column/remove.php | 9 ++-- app/Template/column_move_restriction/create.php | 34 ++++++------- app/Template/column_move_restriction/remove.php | 9 ++-- app/Template/column_restriction/create.php | 32 +++++------- app/Template/column_restriction/remove.php | 9 ++-- app/Template/comment/create.php | 8 +-- app/Template/comment/edit.php | 8 +-- app/Template/comment/remove.php | 10 ++-- app/Template/comment/show.php | 6 +-- app/Template/custom_filter/add.php | 2 +- app/Template/custom_filter/edit.php | 11 ++--- app/Template/custom_filter/index.php | 4 +- app/Template/custom_filter/remove.php | 28 +++++------ app/Template/dashboard/layout.php | 6 +-- app/Template/external_task_creation/step1.php | 7 +-- app/Template/external_task_creation/step2.php | 7 +-- app/Template/external_task_modification/show.php | 8 +-- app/Template/group/associate.php | 8 +-- app/Template/group/dissociate.php | 10 ++-- app/Template/group/index.php | 10 ++-- app/Template/group/remove.php | 10 ++-- app/Template/group/users.php | 5 +- app/Template/group_creation/show.php | 8 +-- app/Template/group_modification/show.php | 8 +-- app/Template/header/creation_dropdown.php | 7 ++- app/Template/link/remove.php | 10 ++-- app/Template/plugin/remove.php | 10 ++-- app/Template/plugin/show.php | 3 +- app/Template/project/dropdown.php | 2 +- app/Template/project/sidebar.php | 10 ++-- app/Template/project_action_duplication/show.php | 8 +-- app/Template/project_creation/create.php | 8 +-- 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 ----------- app/Template/project_file/create.php | 43 ++++++---------- app/Template/project_file/remove.php | 10 ++-- app/Template/project_header/dropdown.php | 5 +- app/Template/project_overview/attachments.php | 2 +- app/Template/project_overview/description.php | 4 +- app/Template/project_overview/files.php | 6 +-- app/Template/project_overview/images.php | 3 +- app/Template/project_role/create.php | 8 +-- app/Template/project_role/edit.php | 8 +-- app/Template/project_role/remove.php | 9 ++-- app/Template/project_role/show.php | 27 ++++------ app/Template/project_role_restriction/create.php | 8 +-- app/Template/project_role_restriction/remove.php | 9 ++-- app/Template/project_status/disable.php | 9 ++-- app/Template/project_status/enable.php | 9 ++-- app/Template/project_status/remove.php | 9 ++-- app/Template/project_tag/create.php | 8 +-- app/Template/project_tag/edit.php | 8 +-- app/Template/project_tag/index.php | 9 ++-- app/Template/project_tag/remove.php | 10 ++-- app/Template/subtask/create.php | 8 +-- app/Template/subtask/edit.php | 11 ++--- app/Template/subtask/menu.php | 9 ++-- app/Template/subtask/remove.php | 10 ++-- app/Template/subtask_converter/show.php | 10 ++-- app/Template/subtask_restriction/show.php | 8 +-- app/Template/swimlane/create.php | 8 +-- app/Template/swimlane/edit.php | 8 +-- app/Template/swimlane/edit_default.php | 8 +-- app/Template/swimlane/index.php | 3 +- app/Template/swimlane/remove.php | 28 +++++------ app/Template/swimlane/table.php | 9 ++-- app/Template/tag/create.php | 8 +-- app/Template/tag/edit.php | 8 +-- app/Template/tag/index.php | 9 ++-- app/Template/tag/remove.php | 10 ++-- app/Template/task/details.php | 2 +- app/Template/task/dropdown.php | 36 +++++--------- app/Template/task/sidebar.php | 45 ++++++----------- app/Template/task_bulk/show.php | 7 +-- app/Template/task_creation/duplicate_projects.php | 9 ++-- app/Template/task_creation/show.php | 40 ++++++++------- app/Template/task_duplication/copy.php | 30 +++++------- app/Template/task_duplication/duplicate.php | 10 ++-- app/Template/task_duplication/move.php | 29 +++++------ app/Template/task_external_link/create.php | 9 +--- app/Template/task_external_link/edit.php | 9 +--- app/Template/task_external_link/find.php | 8 +-- app/Template/task_external_link/remove.php | 10 ++-- app/Template/task_external_link/table.php | 6 +-- app/Template/task_file/create.php | 43 ++++++---------- app/Template/task_file/files.php | 6 +-- app/Template/task_file/images.php | 3 +- app/Template/task_file/remove.php | 10 ++-- app/Template/task_file/screenshot.php | 10 ++-- app/Template/task_gantt/show.php | 3 +- app/Template/task_gantt_creation/show.php | 46 ----------------- app/Template/task_internal_link/create.php | 8 +-- app/Template/task_internal_link/edit.php | 6 +-- app/Template/task_internal_link/remove.php | 10 ++-- app/Template/task_internal_link/table.php | 6 +-- app/Template/task_modification/show.php | 26 +++++----- app/Template/task_move_position/show.php | 6 +-- app/Template/task_recurrence/edit.php | 8 +-- app/Template/task_status/close.php | 10 ++-- app/Template/task_status/open.php | 10 ++-- app/Template/task_suppression/remove.php | 10 ++-- app/Template/twofactor/disable.php | 9 ++-- app/Template/user_creation/local.php | 8 +-- app/Template/user_creation/remote.php | 8 +-- app/Template/user_import/show.php | 6 +-- app/Template/user_list/dropdown.php | 9 ++-- app/Template/user_list/show.php | 16 ++++-- app/Template/user_status/disable.php | 10 ++-- app/Template/user_status/enable.php | 10 ++-- app/Template/user_status/remove.php | 10 ++-- app/Template/user_view/layout.php | 20 ++++++-- 129 files changed, 592 insertions(+), 977 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 delete mode 100644 app/Template/task_gantt_creation/show.php (limited to 'app/Template') diff --git a/app/Template/action/index.php b/app/Template/action/index.php index 7768a0b6..90db0450 100644 --- a/app/Template/action/index.php +++ b/app/Template/action/index.php @@ -2,12 +2,10 @@

@@ -17,8 +15,8 @@ - - + + @@ -65,7 +63,7 @@ diff --git a/app/Template/action/remove.php b/app/Template/action/remove.php index 384bec7a..e3cdb206 100644 --- a/app/Template/action/remove.php +++ b/app/Template/action/remove.php @@ -7,9 +7,9 @@ text->in($action['event_name'], $available_events).'/'.$this->text->in($action['action_name'], $available_actions)) ?>

-
- url->link(t('Yes'), 'ActionController', 'remove', array('project_id' => $project['id'], 'action_id' => $action['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'ActionController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
+ modal->confirmButtons( + 'ActionController', + 'remove', + array('project_id' => $project['id'], 'action_id' => $action['id']) + ) ?> diff --git a/app/Template/action_creation/create.php b/app/Template/action_creation/create.php index c0d2880e..04aa761c 100644 --- a/app/Template/action_creation/create.php +++ b/app/Template/action_creation/create.php @@ -1,16 +1,12 @@ - +form->csrf() ?> form->hidden('project_id', $values) ?> form->label(t('Action'), 'action_name') ?> form->select('action_name', $available_actions, $values) ?> -
- - - url->link(t('cancel'), 'ActionController', 'index', array(), false, 'close-popover') ?> -
+ modal->submitButtons(t('Next step')) ?> diff --git a/app/Template/action_creation/event.php b/app/Template/action_creation/event.php index cdf00310..58996ad8 100644 --- a/app/Template/action_creation/event.php +++ b/app/Template/action_creation/event.php @@ -2,8 +2,7 @@

- - +form->csrf() ?> form->hidden('project_id', $values) ?> @@ -19,9 +18,5 @@ -
- - - url->link(t('cancel'), 'ActionController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
+ modal->submitButtons(t('Next step')) ?> diff --git a/app/Template/action_creation/params.php b/app/Template/action_creation/params.php index c9608f21..0cc98f50 100644 --- a/app/Template/action_creation/params.php +++ b/app/Template/action_creation/params.php @@ -2,8 +2,7 @@

- - +form->csrf() ?> form->hidden('project_id', $values) ?> @@ -50,9 +49,5 @@ -
- - - url->link(t('cancel'), 'ActionController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
+ modal->submitButtons() ?> diff --git a/app/Template/board/table_column.php b/app/Template/board/table_column.php index e2976f27..c334cda4 100644 --- a/app/Template/board/table_column.php +++ b/app/Template/board/table_column.php @@ -14,7 +14,7 @@
projectRole->canCreateTaskInColumn($column['project_id'], $column['id'])): ?>
- url->link('+', 'TaskCreationController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover', t('Add a new task')) ?> + modal->largeIcon('plus', t('Add a new task'), 'TaskCreationController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id'])) ?>
@@ -37,15 +37,13 @@ projectRole->canCreateTaskInColumn($column['project_id'], $column['id'])): ?>
  • - - url->link(t('Create tasks in bulk'), 'TaskBulkController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?> + modal->medium('align-justify', t('Create tasks in bulk'), 'TaskBulkController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id'])) ?>
  • 0 && $this->projectRole->canChangeTaskStatusInColumn($column['project_id'], $column['id'])): ?>
  • - - url->link(t('Close all tasks of this column'), 'BoardPopoverController', 'confirmCloseColumnTasks', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?> + modal->confirm('close', t('Close all tasks of this column'), 'BoardPopoverController', 'confirmCloseColumnTasks', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id'])) ?>
  • diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index 83a582c6..15f1f713 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -10,7 +10,7 @@ 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, - 'popover' . (! empty($task['category_description']) ? ' tooltip' : ''), + 'js-modal-medium' . (! empty($task['category_description']) ? ' tooltip' : ''), ! empty($task['category_description']) ? $this->text->markdownAttribute($task['category_description']) : t('Change category') ) ?> diff --git a/app/Template/board/tooltip_files.php b/app/Template/board/tooltip_files.php index 4e704dac..a372b1a0 100644 --- a/app/Template/board/tooltip_files.php +++ b/app/Template/board/tooltip_files.php @@ -11,7 +11,7 @@
    diff --git a/app/Template/board_popover/close_all_tasks_column.php b/app/Template/board_popover/close_all_tasks_column.php index 57f703e3..54ea3220 100644 --- a/app/Template/board_popover/close_all_tasks_column.php +++ b/app/Template/board_popover/close_all_tasks_column.php @@ -1,18 +1,12 @@ -
    - -
    - form->csrf() ?> - form->hidden('column_id', $values) ?> - form->hidden('swimlane_id', $values) ?> + + + form->csrf() ?> + form->hidden('column_id', $values) ?> + form->hidden('swimlane_id', $values) ?> -

    +

    -
    - - - url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> -
    - -
    + modal->submitButtons(t('Yes'), 'red') ?> + diff --git a/app/Template/category/edit.php b/app/Template/category/edit.php index d8ca313d..108826f3 100644 --- a/app/Template/category/edit.php +++ b/app/Template/category/edit.php @@ -2,8 +2,7 @@

    - - +form->csrf() ?> form->hidden('id', $values) ?> @@ -15,9 +14,5 @@ form->label(t('Description'), 'description') ?> form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?> -
    - - - url->link(t('cancel'), 'CategoryController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/category/index.php b/app/Template/category/index.php index 336b79a2..e93138fd 100644 --- a/app/Template/category/index.php +++ b/app/Template/category/index.php @@ -15,12 +15,10 @@ diff --git a/app/Template/category/remove.php b/app/Template/category/remove.php index e7b9c9b4..79e8a560 100644 --- a/app/Template/category/remove.php +++ b/app/Template/category/remove.php @@ -1,17 +1,15 @@ -
    - + -
    -

    - -

    +
    +

    + +

    -
    - url->link(t('Yes'), 'CategoryController', 'remove', array('project_id' => $project['id'], 'category_id' => $category['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'CategoryController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    -
    -
    + modal->confirmButtons( + 'CategoryController', + 'remove', + array('project_id' => $project['id'], 'category_id' => $category['id']) + ) ?> + diff --git a/app/Template/column/create.php b/app/Template/column/create.php index f4cded52..aad9606b 100644 --- a/app/Template/column/create.php +++ b/app/Template/column/create.php @@ -1,8 +1,7 @@ - - +form->csrf() ?> form->hidden('project_id', $values) ?> @@ -18,9 +17,5 @@ form->label(t('Description'), 'description') ?> form->textEditor('description', $values, $errors, array('tabindex' => 4)) ?> -
    - - - url->link(t('cancel'), 'column', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/column/edit.php b/app/Template/column/edit.php index a72a5c84..a36c2e6c 100644 --- a/app/Template/column/edit.php +++ b/app/Template/column/edit.php @@ -2,7 +2,7 @@

    - +form->csrf() ?> @@ -20,9 +20,5 @@ form->label(t('Description'), 'description') ?> form->textEditor('description', $values, $errors) ?> -
    - - - url->link(t('cancel'), 'ColumnController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/column/index.php b/app/Template/column/index.php index 8c96a350..9e7ddfe8 100644 --- a/app/Template/column/index.php +++ b/app/Template/column/index.php @@ -2,8 +2,7 @@

    @@ -41,12 +40,10 @@ diff --git a/app/Template/column/remove.php b/app/Template/column/remove.php index dc0a4712..4134b175 100644 --- a/app/Template/column/remove.php +++ b/app/Template/column/remove.php @@ -8,8 +8,9 @@

    -
    - url->link(t('Yes'), 'ColumnController', 'remove', array('project_id' => $project['id'], 'column_id' => $column['id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'ColumnController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'ColumnController', + 'remove', + array('project_id' => $project['id'], 'column_id' => $column['id']) + ) ?> diff --git a/app/Template/column_move_restriction/create.php b/app/Template/column_move_restriction/create.php index 1eb6d539..852df971 100644 --- a/app/Template/column_move_restriction/create.php +++ b/app/Template/column_move_restriction/create.php @@ -1,24 +1,18 @@ -
    - -
    - form->csrf() ?> - form->hidden('project_id', $values) ?> - form->hidden('role_id', $values) ?> + + + form->csrf() ?> + form->hidden('project_id', $values) ?> + form->hidden('role_id', $values) ?> - form->label(t('Source column'), 'src_column_id') ?> - form->select('src_column_id', $columns, $values, $errors) ?> + form->label(t('Source column'), 'src_column_id') ?> + form->select('src_column_id', $columns, $values, $errors) ?> - form->label(t('Destination column'), 'dst_column_id') ?> - form->select('dst_column_id', $columns, $values, $errors) ?> + form->label(t('Destination column'), 'dst_column_id') ?> + form->select('dst_column_id', $columns, $values, $errors) ?> -
    - - - url->link(t('cancel'), 'ProjectRoleController', 'show', array(), false, 'close-popover') ?> -
    + modal->submitButtons() ?> -

    - -
    +

    + diff --git a/app/Template/column_move_restriction/remove.php b/app/Template/column_move_restriction/remove.php index 1985e167..4902cd23 100644 --- a/app/Template/column_move_restriction/remove.php +++ b/app/Template/column_move_restriction/remove.php @@ -7,8 +7,9 @@

    -
    - url->link(t('Yes'), 'ColumnMoveRestrictionController', 'remove', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'ProjectRoleController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'ColumnMoveRestrictionController', + 'remove', + array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']) + ) ?> diff --git a/app/Template/column_restriction/create.php b/app/Template/column_restriction/create.php index 982733b4..be158f19 100644 --- a/app/Template/column_restriction/create.php +++ b/app/Template/column_restriction/create.php @@ -1,22 +1,16 @@ -
    - -
    - form->csrf() ?> - form->hidden('project_id', $values) ?> - form->hidden('role_id', $values) ?> + + + form->csrf() ?> + form->hidden('project_id', $values) ?> + form->hidden('role_id', $values) ?> - form->label(t('Rule'), 'rule') ?> - form->select('rule', $rules, $values, $errors) ?> + form->label(t('Rule'), 'rule') ?> + form->select('rule', $rules, $values, $errors) ?> - form->label(t('Column'), 'column_id') ?> - form->select('column_id', $columns, $values, $errors) ?> + form->label(t('Column'), 'column_id') ?> + form->select('column_id', $columns, $values, $errors) ?> -
    - - - url->link(t('cancel'), 'ProjectRoleController', 'show', array(), false, 'close-popover') ?> -
    - -
    + modal->submitButtons() ?> + diff --git a/app/Template/column_restriction/remove.php b/app/Template/column_restriction/remove.php index 97650e2d..edbd9d6e 100644 --- a/app/Template/column_restriction/remove.php +++ b/app/Template/column_restriction/remove.php @@ -7,8 +7,9 @@

    -
    - url->link(t('Yes'), 'ColumnRestrictionController', 'remove', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'ProjectRoleController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'ColumnRestrictionController', + 'remove', + array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']) + ) ?> diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php index 02cb48eb..8a421759 100644 --- a/app/Template/comment/create.php +++ b/app/Template/comment/create.php @@ -1,16 +1,12 @@ - +form->csrf() ?> form->hidden('task_id', $values) ?> form->hidden('user_id', $values) ?> form->textEditor('comment', $values, $errors, array('autofocus' => true, 'required' => true)) ?> -
    - - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/comment/edit.php b/app/Template/comment/edit.php index f295c8a7..04f6ffd4 100644 --- a/app/Template/comment/edit.php +++ b/app/Template/comment/edit.php @@ -2,7 +2,7 @@

    - +form->csrf() ?> form->hidden('id', $values) ?> form->hidden('task_id', $values) ?> @@ -10,9 +10,5 @@ form->textEditor('comment', $values, $errors, array('autofocus' => true, 'required' => true)) ?> -
    - - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/comment/remove.php b/app/Template/comment/remove.php index 55587b67..03f16e00 100644 --- a/app/Template/comment/remove.php +++ b/app/Template/comment/remove.php @@ -13,9 +13,9 @@ 'hide_actions' => true )) ?> -
    - url->link(t('Yes'), 'CommentController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'CommentController', + 'remove', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']) + ) ?> diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php index 16a807bc..caf28c3c 100644 --- a/app/Template/comment/show.php +++ b/app/Template/comment/show.php @@ -25,12 +25,10 @@ user->isAdmin() || $this->user->isCurrentUser($comment['user_id']))): ?>
  • - - url->link(t('remove'), 'CommentController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> + modal->medium('edit', t('edit'), 'CommentController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
  • - - url->link(t('edit'), 'CommentController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> + modal->confirm('trash-o', t('remove'), 'CommentController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
  • diff --git a/app/Template/custom_filter/add.php b/app/Template/custom_filter/add.php index 3801cc30..0b91226a 100644 --- a/app/Template/custom_filter/add.php +++ b/app/Template/custom_filter/add.php @@ -12,7 +12,7 @@ form->label(t('Filter'), 'filter') ?> form->text('filter', $values, $errors, array('required', 'maxlength="100"')) ?> - user->hasProjectAccess('ProjectEditController', 'edit', $project['id'])): ?> + user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?> form->checkbox('is_shared', t('Share with all project members'), 1) ?> diff --git a/app/Template/custom_filter/edit.php b/app/Template/custom_filter/edit.php index 26da8da2..b64dee53 100644 --- a/app/Template/custom_filter/edit.php +++ b/app/Template/custom_filter/edit.php @@ -2,8 +2,7 @@

    - - +form->csrf() ?> form->hidden('id', $values) ?> @@ -16,7 +15,7 @@ form->label(t('Filter'), 'filter') ?> form->text('filter', $values, $errors, array('required', 'maxlength="100"')) ?> - user->hasProjectAccess('ProjectEditController', 'edit', $project['id'])): ?> + user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?> form->checkbox('is_shared', t('Share with all project members'), 1, $values['is_shared'] == 1) ?> form->hidden('is_shared', $values) ?> @@ -24,9 +23,5 @@ form->checkbox('append', t('Append filter (instead of replacement)'), 1, $values['append'] == 1) ?> -
    - - - url->link(t('cancel'), 'CustomFilterController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/custom_filter/index.php b/app/Template/custom_filter/index.php index dcab891b..95356e64 100644 --- a/app/Template/custom_filter/index.php +++ b/app/Template/custom_filter/index.php @@ -36,8 +36,8 @@ diff --git a/app/Template/custom_filter/remove.php b/app/Template/custom_filter/remove.php index 609f19b2..1c576fa2 100644 --- a/app/Template/custom_filter/remove.php +++ b/app/Template/custom_filter/remove.php @@ -1,17 +1,15 @@ -
    - + -
    -

    - -

    +
    +

    + +

    -
    - url->link(t('Yes'), 'CustomFilterController', 'remove', array('project_id' => $project['id'], 'filter_id' => $filter['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'CustomFilterController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    -
    -
    + modal->confirmButtons( + 'CustomFilterController', + 'remove', + array('project_id' => $project['id'], 'filter_id' => $filter['id']) + ) ?> + diff --git a/app/Template/dashboard/layout.php b/app/Template/dashboard/layout.php index 795537a6..d5a2695c 100644 --- a/app/Template/dashboard/layout.php +++ b/app/Template/dashboard/layout.php @@ -3,14 +3,12 @@ diff --git a/app/Template/group_creation/show.php b/app/Template/group_creation/show.php index b219bd70..9f4f5608 100644 --- a/app/Template/group_creation/show.php +++ b/app/Template/group_creation/show.php @@ -1,15 +1,11 @@ - +form->csrf() ?> form->label(t('Name'), 'name') ?> form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="100"')) ?> -
    - - - url->link(t('cancel'), 'GroupListController', 'index', array(), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/group_modification/show.php b/app/Template/group_modification/show.php index ddf07369..df4ed01e 100644 --- a/app/Template/group_modification/show.php +++ b/app/Template/group_modification/show.php @@ -1,7 +1,7 @@ - +form->csrf() ?> form->hidden('id', $values) ?> @@ -10,9 +10,5 @@ form->label(t('Name'), 'name') ?> form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="100"')) ?> -
    - - - url->link(t('cancel'), 'GroupListController', 'index', array(), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/header/creation_dropdown.php b/app/Template/header/creation_dropdown.php index d3b9e7cb..9bdf5ad2 100644 --- a/app/Template/header/creation_dropdown.php +++ b/app/Template/header/creation_dropdown.php @@ -6,14 +6,13 @@ diff --git a/app/Template/project/dropdown.php b/app/Template/project/dropdown.php index e3cf41c2..5fbffde4 100644 --- a/app/Template/project/dropdown.php +++ b/app/Template/project/dropdown.php @@ -34,7 +34,7 @@ hook->render('template:project:dropdown', array('project' => $project)) ?> - user->hasProjectAccess('ProjectEditController', 'edit', $project['id'])): ?> + user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?>
  • url->link(t('Settings'), 'ProjectViewController', 'show', array('project_id' => $project['id'])) ?> diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php index 6e7fff05..507cde3e 100644 --- a/app/Template/project/sidebar.php +++ b/app/Template/project/sidebar.php @@ -9,9 +9,9 @@
  • - user->hasProjectAccess('ProjectEditController', 'edit', $project['id'])): ?> + user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?>
  • app->checkMenuSelection('ProjectEditController') ?>> - url->link(t('Edit project'), 'ProjectEditController', 'edit', array('project_id' => $project['id'])) ?> + url->link(t('Edit project'), 'ProjectEditController', 'show', array('project_id' => $project['id'])) ?>
  • app->checkMenuSelection('ProjectViewController', 'share') ?>> url->link(t('Public access'), 'ProjectViewController', 'share', array('project_id' => $project['id'])) ?> @@ -50,15 +50,15 @@
  • - url->link(t('Disable'), 'ProjectStatusController', 'confirmDisable', array('project_id' => $project['id']), false, 'popover') ?> + modal->confirm('close', t('Disable'), 'ProjectStatusController', 'confirmDisable', array('project_id' => $project['id'])) ?>
  • - url->link(t('Enable'), 'ProjectStatusController', 'confirmEnable', array('project_id' => $project['id']), false, 'popover') ?> + modal->confirm('check-square-o', t('Enable'), 'ProjectStatusController', 'confirmEnable', array('project_id' => $project['id'])) ?>
  • user->hasProjectAccess('ProjectStatusController', 'remove', $project['id'])): ?>
  • - url->link(t('Remove'), 'ProjectStatusController', 'confirmRemove', array('project_id' => $project['id']), false, 'popover') ?> + modal->confirm('trash-o', t('Remove'), 'ProjectStatusController', 'confirmRemove', array('project_id' => $project['id'])) ?>
  • diff --git a/app/Template/project_action_duplication/show.php b/app/Template/project_action_duplication/show.php index 2eebb262..c2f52e35 100644 --- a/app/Template/project_action_duplication/show.php +++ b/app/Template/project_action_duplication/show.php @@ -4,16 +4,12 @@

    - + form->csrf() ?> form->label(t('Create from another project'), 'src_project_id') ?> form->select('src_project_id', $projects_list) ?> -
    - - - url->link(t('cancel'), 'Action', 'index', array(), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/project_creation/create.php b/app/Template/project_creation/create.php index 1df15d7d..171bd17a 100644 --- a/app/Template/project_creation/create.php +++ b/app/Template/project_creation/create.php @@ -2,7 +2,7 @@ - + form->csrf() ?> form->hidden('is_private', $values) ?> @@ -29,11 +29,7 @@ form->checkbox('projectTaskDuplicationModel', t('Tasks'), 1, false) ?> -
    - - - url->link(t('cancel'), 'ProjectListController', 'show', array(), false, 'close-popover') ?> -
    + modal->submitButtons() ?>
    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) ?> - -
    - -
    - - -

    diff --git a/app/Template/project_file/create.php b/app/Template/project_file/create.php index e262799b..de35f87c 100644 --- a/app/Template/project_file/create.php +++ b/app/Template/project_file/create.php @@ -1,33 +1,20 @@ - - - -
    -
    - -
    -
    - - +app->component('file-upload', array( + 'maxSize' => $max_size, + 'url' => $this->url->to('ProjectFileController', 'save', array('project_id' => $project['id'])), + 'labelDropzone' => t('Drag and drop your files here'), + 'labelOr' => t('or'), + 'labelChooseFiles' => t('choose files'), + 'labelOversize' => t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)), + 'labelSuccess' => t('All files have been uploaded successfully.'), + 'labelCloseSuccess' => t('Close this window'), + 'labelUploadError' => t('Unable to upload this file.'), +)) ?> -
    - - - url->link(t('cancel'), 'ProjectOverviewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> -
    +modal->submitButtons(array( + 'submitLabel' => t('Upload files'), + 'disabled' => true, +)) ?> diff --git a/app/Template/project_file/remove.php b/app/Template/project_file/remove.php index 0517a9e7..043b8fc8 100644 --- a/app/Template/project_file/remove.php +++ b/app/Template/project_file/remove.php @@ -7,9 +7,9 @@ text->e($file['name'])) ?>

    -
    - url->link(t('Yes'), 'ProjectFileController', 'remove', array('project_id' => $project['id'], 'file_id' => $file['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'ProjectOverviewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'ProjectFileController', + 'remove', + array('project_id' => $project['id'], 'file_id' => $file['id']) + ) ?>
    diff --git a/app/Template/project_header/dropdown.php b/app/Template/project_header/dropdown.php index baf4cc16..27d3fd3f 100644 --- a/app/Template/project_header/dropdown.php +++ b/app/Template/project_header/dropdown.php @@ -24,8 +24,7 @@ user->hasProjectAccess('TaskCreationController', 'show', $project['id'])): ?>
  • - - url->link(t('Add a new task'), 'TaskCreationController', 'show', array('project_id' => $project['id']), false, 'popover') ?> + modal->large('plus', t('Add a new task'), 'TaskCreationController', 'show', array('project_id' => $project['id'])) ?>
  • @@ -71,7 +70,7 @@ - user->hasProjectAccess('ProjectEditController', 'edit', $project['id'])): ?> + user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?>
  • url->link(t('Settings'), 'ProjectViewController', 'show', array('project_id' => $project['id'])) ?> diff --git a/app/Template/project_overview/attachments.php b/app/Template/project_overview/attachments.php index ab8cf2ad..b8baadd0 100644 --- a/app/Template/project_overview/attachments.php +++ b/app/Template/project_overview/attachments.php @@ -5,7 +5,7 @@
    user->hasProjectAccess('ProjectFileController', 'create', $project['id'])): ?>
    - url->button('fa-plus', t('Upload a file'), 'ProjectFileController', 'create', array('project_id' => $project['id']), 'popover') ?> + modal->mediumButton('plus', t('Upload a file'), 'ProjectFileController', 'create', array('project_id' => $project['id'])) ?>
    diff --git a/app/Template/project_overview/description.php b/app/Template/project_overview/description.php index 0c2027ed..80b93efe 100644 --- a/app/Template/project_overview/description.php +++ b/app/Template/project_overview/description.php @@ -3,9 +3,9 @@

    - user->hasProjectAccess('ProjectEditController', 'description', $project['id'])): ?> + user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?>
    - url->button('fa-edit', t('Edit description'), 'ProjectEditController', 'description', array('project_id' => $project['id']), 'popover') ?> + modal->mediumButton('edit', t('Edit description'), 'ProjectEditController', 'show', array('project_id' => $project['id'])) ?>
    diff --git a/app/Template/project_overview/files.php b/app/Template/project_overview/files.php index 1326a7d1..6518fafb 100644 --- a/app/Template/project_overview/files.php +++ b/app/Template/project_overview/files.php @@ -15,8 +15,7 @@
      file->getPreviewType($file['name']) !== null): ?>
    • - - url->link(t('View file'), 'FileViewerController', 'show', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?> + modal->large('eye', t('View file'), 'FileViewerController', 'show', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>
    • file->getBrowserViewType($file['name']) !== null): ?>
    • @@ -30,8 +29,7 @@
    • user->hasProjectAccess('ProjectFileController', 'remove', $project['id'])): ?>
    • - - url->link(t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?> + modal->confirm('trash-o', t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>
    diff --git a/app/Template/project_overview/images.php b/app/Template/project_overview/images.php index 3b575d3f..cabfd0f6 100644 --- a/app/Template/project_overview/images.php +++ b/app/Template/project_overview/images.php @@ -24,8 +24,7 @@
  • user->hasProjectAccess('ProjectFileController', 'remove', $project['id'])): ?>
  • - - url->link(t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?> + modal->confirm('trash-o', t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?>
  • diff --git a/app/Template/project_role/create.php b/app/Template/project_role/create.php index d0092243..f554eb17 100644 --- a/app/Template/project_role/create.php +++ b/app/Template/project_role/create.php @@ -1,16 +1,12 @@ - +form->csrf() ?> form->hidden('project_id', $values) ?> form->label(t('Role'), 'role') ?> form->text('role', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> -
    - - - url->link(t('cancel'), 'ProjectRoleController', 'show', array(), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/project_role/edit.php b/app/Template/project_role/edit.php index 3aa9e5cf..740ac0fe 100644 --- a/app/Template/project_role/edit.php +++ b/app/Template/project_role/edit.php @@ -1,7 +1,7 @@ - +form->csrf() ?> form->hidden('project_id', $values) ?> form->hidden('role_id', $values) ?> @@ -9,9 +9,5 @@ form->label(t('Role'), 'role') ?> form->text('role', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> -
    - - - url->link(t('cancel'), 'ProjectRoleController', 'show', array(), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/project_role/remove.php b/app/Template/project_role/remove.php index 25875e3a..44d24eda 100644 --- a/app/Template/project_role/remove.php +++ b/app/Template/project_role/remove.php @@ -7,8 +7,9 @@

    -
    - url->link(t('Yes'), 'ProjectRoleController', 'remove', array('project_id' => $project['id'], 'role_id' => $role['role_id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'ProjectRoleController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'ProjectRoleController', + 'remove', + array('project_id' => $project['id'], 'role_id' => $role['role_id']) + ) ?> diff --git a/app/Template/project_role/show.php b/app/Template/project_role/show.php index 59200fc9..5377f7bb 100644 --- a/app/Template/project_role/show.php +++ b/app/Template/project_role/show.php @@ -2,8 +2,7 @@

    @@ -19,24 +18,19 @@ @@ -59,8 +53,7 @@ text->e($restriction['title']) ?> @@ -77,8 +70,7 @@ text->e($restriction['title']) ?> @@ -91,8 +83,7 @@ diff --git a/app/Template/project_role_restriction/create.php b/app/Template/project_role_restriction/create.php index f49eafb3..2b6a61dc 100644 --- a/app/Template/project_role_restriction/create.php +++ b/app/Template/project_role_restriction/create.php @@ -2,7 +2,7 @@ - + form->csrf() ?> form->hidden('project_id', $values) ?> form->hidden('role_id', $values) ?> @@ -10,10 +10,6 @@ form->label(t('Restriction'), 'rule') ?> form->select('rule', $restrictions, $values, $errors) ?> -
    - - - url->link(t('cancel'), 'ProjectRoleController', 'show', array(), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/project_role_restriction/remove.php b/app/Template/project_role_restriction/remove.php index db1148e1..1a994199 100644 --- a/app/Template/project_role_restriction/remove.php +++ b/app/Template/project_role_restriction/remove.php @@ -7,8 +7,9 @@ text->in($restriction['rule'], $restrictions)) ?>

    -
    - url->link(t('Yes'), 'ProjectRoleRestrictionController', 'remove', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'ProjectRoleController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'ProjectRoleRestrictionController', + 'remove', + array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']) + ) ?> diff --git a/app/Template/project_status/disable.php b/app/Template/project_status/disable.php index d8145d3c..d607cedb 100644 --- a/app/Template/project_status/disable.php +++ b/app/Template/project_status/disable.php @@ -7,8 +7,9 @@

    -
    - url->link(t('Yes'), 'ProjectStatusController', 'disable', array('project_id' => $project['id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'ProjectStatusController', + 'disable', + array('project_id' => $project['id']) + ) ?> diff --git a/app/Template/project_status/enable.php b/app/Template/project_status/enable.php index 1f76d093..fd8f8c72 100644 --- a/app/Template/project_status/enable.php +++ b/app/Template/project_status/enable.php @@ -7,8 +7,9 @@

    -
    - url->link(t('Yes'), 'ProjectStatusController', 'enable', array('project_id' => $project['id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'ProjectStatusController', + 'enable', + array('project_id' => $project['id']) + ) ?> diff --git a/app/Template/project_status/remove.php b/app/Template/project_status/remove.php index 8959ef75..27ae2ae0 100644 --- a/app/Template/project_status/remove.php +++ b/app/Template/project_status/remove.php @@ -7,8 +7,9 @@

    -
    - url->link(t('Yes'), 'ProjectStatusController', 'remove', array('project_id' => $project['id']), true, 'btn btn-red') ?> - url->link(t('cancel'), 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'ProjectStatusController', + 'remove', + array('project_id' => $project['id']) + ) ?> diff --git a/app/Template/project_tag/create.php b/app/Template/project_tag/create.php index bfd1084a..a0e6243b 100644 --- a/app/Template/project_tag/create.php +++ b/app/Template/project_tag/create.php @@ -1,16 +1,12 @@ - +form->csrf() ?> form->hidden('project_id', $values) ?> form->label(t('Name'), 'name') ?> form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="255"')) ?> -
    - - - url->link(t('cancel'), 'ProjectTagController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/project_tag/edit.php b/app/Template/project_tag/edit.php index 9bf261bd..8cb1e209 100644 --- a/app/Template/project_tag/edit.php +++ b/app/Template/project_tag/edit.php @@ -1,7 +1,7 @@ - +form->csrf() ?> form->hidden('id', $values) ?> form->hidden('project_id', $values) ?> @@ -9,9 +9,5 @@ form->label(t('Name'), 'name') ?> form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="255"')) ?> -
    - - - url->link(t('cancel'), 'ProjectTagController', 'index', array(), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/project_tag/index.php b/app/Template/project_tag/index.php index f77e21ee..29d7082b 100644 --- a/app/Template/project_tag/index.php +++ b/app/Template/project_tag/index.php @@ -2,8 +2,7 @@

    @@ -20,10 +19,8 @@ diff --git a/app/Template/project_tag/remove.php b/app/Template/project_tag/remove.php index f4aadab1..9f957d10 100644 --- a/app/Template/project_tag/remove.php +++ b/app/Template/project_tag/remove.php @@ -7,9 +7,9 @@

    -
    - url->link(t('Yes'), 'ProjectTagController', 'remove', array('tag_id' => $tag['id'], 'project_id' => $project['id']), true, 'btn btn-red popover-link') ?> - - url->link(t('cancel'), 'ProjectTagController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'ProjectTagController', + 'remove', + array('tag_id' => $tag['id'], 'project_id' => $project['id']) + ) ?> diff --git a/app/Template/subtask/create.php b/app/Template/subtask/create.php index cc4ccba6..ade9686e 100644 --- a/app/Template/subtask/create.php +++ b/app/Template/subtask/create.php @@ -2,7 +2,7 @@

    - +form->csrf() ?> form->hidden('task_id', $values) ?> @@ -13,9 +13,5 @@ form->checkbox('another_subtask', t('Create another sub-task'), 1, isset($values['another_subtask']) && $values['another_subtask'] == 1) ?> -
    - - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/subtask/edit.php b/app/Template/subtask/edit.php index 07419f79..b34b93a8 100644 --- a/app/Template/subtask/edit.php +++ b/app/Template/subtask/edit.php @@ -2,8 +2,7 @@

    - - +form->csrf() ?> form->hidden('id', $values) ?> form->hidden('task_id', $values) ?> @@ -12,10 +11,6 @@ subtask->selectTimeEstimated($values, $errors) ?> subtask->selectTimeSpent($values, $errors) ?> hook->render('template:subtask:form:edit', array('values' => $values, 'errors' => $errors)) ?> - -
    - - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + + modal->submitButtons() ?> diff --git a/app/Template/subtask/menu.php b/app/Template/subtask/menu.php index d5d1bf85..a0743a70 100644 --- a/app/Template/subtask/menu.php +++ b/app/Template/subtask/menu.php @@ -2,16 +2,13 @@ diff --git a/app/Template/subtask/remove.php b/app/Template/subtask/remove.php index 426c1a93..cf9bbc35 100644 --- a/app/Template/subtask/remove.php +++ b/app/Template/subtask/remove.php @@ -12,9 +12,9 @@ -
    - url->link(t('Yes'), 'SubtaskController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'SubtaskController', + 'remove', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']) + ) ?> diff --git a/app/Template/subtask_converter/show.php b/app/Template/subtask_converter/show.php index 63f45482..9ecc70c8 100644 --- a/app/Template/subtask_converter/show.php +++ b/app/Template/subtask_converter/show.php @@ -12,9 +12,9 @@ -
    - url->link(t('Yes'), 'SubtaskConverterController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'SubtaskConverterController', + 'save', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']) + ) ?> diff --git a/app/Template/subtask_restriction/show.php b/app/Template/subtask_restriction/show.php index ec8b8d5b..b6c56a12 100644 --- a/app/Template/subtask_restriction/show.php +++ b/app/Template/subtask_restriction/show.php @@ -1,7 +1,7 @@ - +form->csrf() ?> @@ -9,9 +9,5 @@ form->radios('status', $status_list) ?> form->hidden('id', $subtask_inprogress) ?> -
    - - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/swimlane/create.php b/app/Template/swimlane/create.php index 207b526c..7d05e731 100644 --- a/app/Template/swimlane/create.php +++ b/app/Template/swimlane/create.php @@ -1,7 +1,7 @@ - +form->csrf() ?> form->hidden('project_id', $values) ?> @@ -12,9 +12,5 @@ form->label(t('Description'), 'description') ?> form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?> -
    - - - url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/swimlane/edit.php b/app/Template/swimlane/edit.php index d225b345..c1c41196 100644 --- a/app/Template/swimlane/edit.php +++ b/app/Template/swimlane/edit.php @@ -2,7 +2,7 @@

    - +form->csrf() ?> @@ -15,9 +15,5 @@ form->label(t('Description'), 'description') ?> form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?> -
    - - - url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/swimlane/edit_default.php b/app/Template/swimlane/edit_default.php index 8a0c0a15..a2c3ee73 100644 --- a/app/Template/swimlane/edit_default.php +++ b/app/Template/swimlane/edit_default.php @@ -1,7 +1,7 @@ - +form->csrf() ?> form->hidden('id', $values) ?> @@ -10,9 +10,5 @@ form->checkbox('show_default_swimlane', t('Show default swimlane'), 1, $values['show_default_swimlane'] == 1) ?> -
    - - - url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/swimlane/index.php b/app/Template/swimlane/index.php index 4f78a405..e05b9088 100644 --- a/app/Template/swimlane/index.php +++ b/app/Template/swimlane/index.php @@ -2,8 +2,7 @@

    diff --git a/app/Template/swimlane/remove.php b/app/Template/swimlane/remove.php index f16b778c..02d1e322 100644 --- a/app/Template/swimlane/remove.php +++ b/app/Template/swimlane/remove.php @@ -1,17 +1,15 @@ -
    - + -
    -

    - -

    +
    +

    + +

    -
    - url->link(t('Yes'), 'SwimlaneController', 'remove', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> -
    -
    -
    + modal->confirmButtons( + 'SwimlaneController', + 'remove', + array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']) + ) ?> + diff --git a/app/Template/swimlane/table.php b/app/Template/swimlane/table.php index 81daed01..4c9390e0 100644 --- a/app/Template/swimlane/table.php +++ b/app/Template/swimlane/table.php @@ -20,8 +20,7 @@ diff --git a/app/Template/tag/remove.php b/app/Template/tag/remove.php index 46ea3f99..47ba8d3d 100644 --- a/app/Template/tag/remove.php +++ b/app/Template/tag/remove.php @@ -7,9 +7,9 @@

    -
    - url->link(t('Yes'), 'TagController', 'remove', array('tag_id' => $tag['id']), true, 'btn btn-red popover-link') ?> - - url->link(t('cancel'), 'TagController', 'index', array(), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'TagController', + 'remove', + array('tag_id' => $tag['id']) + ) ?> diff --git a/app/Template/task/details.php b/app/Template/task/details.php index 202991d2..b616afe3 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -168,7 +168,7 @@
    - url->button('fa-play', t('Set start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + url->button('play', t('Set start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
    diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php index 86428059..bd424443 100644 --- a/app/Template/task/dropdown.php +++ b/app/Template/task/dropdown.php @@ -8,55 +8,43 @@
  • - - url->link(t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
  • - - url->link(t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
  • - - url->link(t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->medium('code-fork', t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
  • - - url->link(t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->medium('external-link', t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
  • - - url->link(t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->small('comment-o', t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
  • - - url->link(t('Add a screenshot'), 'TaskPopoverController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->medium('camera', t('Add a screenshot'), 'TaskPopoverController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
  • - - url->link(t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->small('files-o', t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
  • - - url->link(t('Duplicate to another project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->small('clipboard', t('Duplicate to another project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
  • - - url->link(t('Move to another project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->small('clone', t('Move to another project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
  • projectRole->canRemoveTask($task)): ?>
  • - - url->link(t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->confirm('trash-o', t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
  • projectRole->canChangeTaskStatusInColumn($task['project_id'], $task['column_id'])): ?>
  • - - url->link(t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->confirm('times', t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - - url->link(t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + modal->confirm('check-square-o', t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
  • diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index 9472b6ba..9735efcb 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -35,72 +35,57 @@ diff --git a/app/Template/task_file/remove.php b/app/Template/task_file/remove.php index 42894f05..e7ffe560 100644 --- a/app/Template/task_file/remove.php +++ b/app/Template/task_file/remove.php @@ -7,9 +7,9 @@ text->e($file['name'])) ?>

    -
    - url->link(t('Yes'), 'TaskFileController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'TaskFileController', + 'remove', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']) + ) ?> diff --git a/app/Template/task_file/screenshot.php b/app/Template/task_file/screenshot.php index 6300159f..dad8c233 100644 --- a/app/Template/task_file/screenshot.php +++ b/app/Template/task_file/screenshot.php @@ -6,14 +6,10 @@

    - - +form->csrf() ?> -
    - - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + app->component('screenshot') ?> + modal->submitButtons() ?>

    diff --git a/app/Template/task_gantt/show.php b/app/Template/task_gantt/show.php index c5d338fb..ddc70a43 100644 --- a/app/Template/task_gantt/show.php +++ b/app/Template/task_gantt/show.php @@ -11,8 +11,7 @@ url->link(t('Sort by date'), 'TaskGanttController', 'show', array('project_id' => $project['id'], 'sorting' => 'date')) ?>
  • - - url->link(t('Add task'), 'TaskGanttCreationController', 'show', array('project_id' => $project['id']), false, 'popover') ?> + modal->large('plus', t('Add task'), 'TaskCreationController', 'show', array('project_id' => $project['id'])) ?>
  • diff --git a/app/Template/task_gantt_creation/show.php b/app/Template/task_gantt_creation/show.php deleted file mode 100644 index 7906c39a..00000000 --- a/app/Template/task_gantt_creation/show.php +++ /dev/null @@ -1,46 +0,0 @@ - - - form->csrf() ?> - form->hidden('project_id', $values) ?> - form->hidden('column_id', $values) ?> - form->hidden('position', $values) ?> - -
    -
    - task->selectTitle($values, $errors) ?> - task->selectDescription($values, $errors) ?> - task->selectTags($project) ?> - - hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> -
    - -
    - task->selectColor($values) ?> - task->selectAssignee($users_list, $values, $errors) ?> - task->selectCategory($categories_list, $values, $errors) ?> - task->selectSwimlane($swimlanes_list, $values, $errors) ?> - task->selectPriority($project, $values) ?> - task->selectScore($values, $errors) ?> - task->selectReference($values, $errors) ?> - - hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> -
    - -
    - task->selectTimeEstimated($values, $errors) ?> - task->selectTimeSpent($values, $errors) ?> - task->selectStartDate($values, $errors) ?> - task->selectDueDate($values, $errors) ?> - - hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?> -
    -
    - -
    - - - url->link(t('cancel'), 'TaskGanttController', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> -
    - diff --git a/app/Template/task_internal_link/create.php b/app/Template/task_internal_link/create.php index fed29605..3c39b87c 100644 --- a/app/Template/task_internal_link/create.php +++ b/app/Template/task_internal_link/create.php @@ -2,7 +2,7 @@

    - +form->csrf() ?> form->hidden('task_id', array('task_id' => $task['id'])) ?> @@ -25,9 +25,5 @@ ), 'autocomplete') ?> -
    - - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/task_internal_link/edit.php b/app/Template/task_internal_link/edit.php index f4df57bd..5abf7b65 100644 --- a/app/Template/task_internal_link/edit.php +++ b/app/Template/task_internal_link/edit.php @@ -26,9 +26,5 @@ ), 'autocomplete') ?> -
    - - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/task_internal_link/remove.php b/app/Template/task_internal_link/remove.php index 966ad116..f8d91a81 100644 --- a/app/Template/task_internal_link/remove.php +++ b/app/Template/task_internal_link/remove.php @@ -7,9 +7,9 @@

    -
    - url->link(t('Yes'), 'TaskInternalLinkController', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'TaskInternalLinkController', + 'remove', + array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']) + ) ?> diff --git a/app/Template/task_internal_link/table.php b/app/Template/task_internal_link/table.php index 3a3a2b88..255ecc97 100644 --- a/app/Template/task_internal_link/table.php +++ b/app/Template/task_internal_link/table.php @@ -73,12 +73,10 @@ diff --git a/app/Template/task_modification/show.php b/app/Template/task_modification/show.php index 734b247a..23a0a43b 100644 --- a/app/Template/task_modification/show.php +++ b/app/Template/task_modification/show.php @@ -1,13 +1,13 @@ - +form->csrf() ?> form->hidden('id', $values) ?> form->hidden('project_id', $values) ?> -
    -
    +
    +
    task->selectTitle($values, $errors) ?> task->selectDescription($values, $errors) ?> task->selectTags($project, $tags) ?> @@ -15,30 +15,28 @@ hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?>
    -
    +
    task->selectColor($values) ?> task->selectAssignee($users_list, $values, $errors) ?> task->selectCategory($categories_list, $values, $errors) ?> task->selectPriority($project, $values) ?> - task->selectScore($values, $errors) ?> - task->selectReference($values, $errors) ?> hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?>
    -
    +
    + task->selectDueDate($values, $errors) ?> + task->selectStartDate($values, $errors) ?> task->selectTimeEstimated($values, $errors) ?> task->selectTimeSpent($values, $errors) ?> - task->selectStartDate($values, $errors) ?> - task->selectDueDate($values, $errors) ?> + task->selectScore($values, $errors) ?> + task->selectReference($values, $errors) ?> hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?>
    -
    -
    - - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> +
    + modal->submitButtons() ?> +
    diff --git a/app/Template/task_move_position/show.php b/app/Template/task_move_position/show.php index 91241016..a73be785 100644 --- a/app/Template/task_move_position/show.php +++ b/app/Template/task_move_position/show.php @@ -14,10 +14,6 @@ 'afterLabel' => t('Insert after this task'), )) ?> -app->component('submit-cancel', array( - 'submitLabel' => t('Save'), - 'orLabel' => t('or'), - 'cancelLabel' => t('cancel'), -)) ?> +modal->submitButtons() ?> diff --git a/app/Template/task_recurrence/edit.php b/app/Template/task_recurrence/edit.php index 09d14826..8e0b936d 100644 --- a/app/Template/task_recurrence/edit.php +++ b/app/Template/task_recurrence/edit.php @@ -15,7 +15,7 @@ -
    + form->csrf() ?> @@ -37,11 +37,7 @@ form->label(t('Base date to calculate new due date'), 'recurrence_basedate') ?> form->select('recurrence_basedate', $recurrence_basedate_list, $values, $errors) ?> -
    - - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/task_status/close.php b/app/Template/task_status/close.php index 2d7b0ce5..0bf3c8e3 100644 --- a/app/Template/task_status/close.php +++ b/app/Template/task_status/close.php @@ -7,9 +7,9 @@

    -
    - url->link(t('Yes'), 'TaskStatusController', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red popover-link') ?> - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'TaskStatusController', + 'close', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes') + ) ?>
    diff --git a/app/Template/task_status/open.php b/app/Template/task_status/open.php index 242b5db5..42765e34 100644 --- a/app/Template/task_status/open.php +++ b/app/Template/task_status/open.php @@ -7,9 +7,9 @@

    -
    - url->link(t('Yes'), 'TaskStatusController', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red popover-link') ?> - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'TaskStatusController', + 'open', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes') + ) ?>
    diff --git a/app/Template/task_suppression/remove.php b/app/Template/task_suppression/remove.php index 5d0f7720..4b0666d8 100644 --- a/app/Template/task_suppression/remove.php +++ b/app/Template/task_suppression/remove.php @@ -7,9 +7,9 @@ text->e($task['title'])) ?>

    -
    - url->link(t('Yes'), 'TaskSuppressionController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => $redirect), true, 'btn btn-red popover-link') ?> - - url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'TaskSuppressionController', + 'remove', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => $redirect) + ) ?>
    diff --git a/app/Template/twofactor/disable.php b/app/Template/twofactor/disable.php index bc419181..c44c450f 100644 --- a/app/Template/twofactor/disable.php +++ b/app/Template/twofactor/disable.php @@ -7,8 +7,9 @@

    -
    - url->link(t('Yes'), 'TwoFactorController', 'disable', array('user_id' => $user['id'], 'disable' => 'yes'), true, 'btn btn-red') ?> - url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?> -
    + modal->confirmButtons( + 'TwoFactorController', + 'disable', + array('user_id' => $user['id'], 'disable' => 'yes') + ) ?>
    diff --git a/app/Template/user_creation/local.php b/app/Template/user_creation/local.php index 059a0114..08784925 100644 --- a/app/Template/user_creation/local.php +++ b/app/Template/user_creation/local.php @@ -1,7 +1,7 @@ - +form->csrf() ?>
    @@ -39,9 +39,5 @@
    -
    - - - url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?> -
    + modal->submitButtons() ?> diff --git a/app/Template/user_creation/remote.php b/app/Template/user_creation/remote.php index 41d0d3c7..0f28c1c4 100644 --- a/app/Template/user_creation/remote.php +++ b/app/Template/user_creation/remote.php @@ -1,7 +1,7 @@ - +form->csrf() ?> form->hidden('is_ldap_user', array('is_ldap_user' => 1)) ?> @@ -37,11 +37,7 @@ -
    - - - url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?> -
    + modal->submitButtons() ?>
    diff --git a/app/Template/user_list/show.php b/app/Template/user_list/show.php index 5e285c89..92ea74e7 100644 --- a/app/Template/user_list/show.php +++ b/app/Template/user_list/show.php @@ -2,10 +2,18 @@ diff --git a/app/Template/user_status/disable.php b/app/Template/user_status/disable.php index d30b0c20..1309b080 100644 --- a/app/Template/user_status/disable.php +++ b/app/Template/user_status/disable.php @@ -5,9 +5,9 @@

    -
    - url->link(t('Yes'), 'UserStatusController', 'disable', array('user_id' => $user['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'UserStatusController', + 'disable', + array('user_id' => $user['id']) + ) ?>
    diff --git a/app/Template/user_status/enable.php b/app/Template/user_status/enable.php index 29d25eee..2413739e 100644 --- a/app/Template/user_status/enable.php +++ b/app/Template/user_status/enable.php @@ -5,9 +5,9 @@

    -
    - url->link(t('Yes'), 'UserStatusController', 'enable', array('user_id' => $user['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'UserStatusController', + 'enable', + array('user_id' => $user['id']) + ) ?>
    diff --git a/app/Template/user_status/remove.php b/app/Template/user_status/remove.php index 2b8f2df5..6cd3f63a 100644 --- a/app/Template/user_status/remove.php +++ b/app/Template/user_status/remove.php @@ -5,9 +5,9 @@

    -
    - url->link(t('Yes'), 'UserStatusController', 'remove', array('user_id' => $user['id']), true, 'btn btn-red') ?> - - url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?> -
    + modal->confirmButtons( + 'UserStatusController', + 'remove', + array('user_id' => $user['id']) + ) ?>
    diff --git a/app/Template/user_view/layout.php b/app/Template/user_view/layout.php index c3604b99..4f0eca94 100644 --- a/app/Template/user_view/layout.php +++ b/app/Template/user_view/layout.php @@ -2,11 +2,21 @@ -- cgit v1.2.3
    - url->link(t('Remove'), 'ActionController', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id']), false, 'popover') ?> + modal->confirm('trash-o', t('Remove'), 'ActionController', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id'])) ?>
    url->link(t('download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> -   url->link(t('open file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> +  modal->large('eye', t('open file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?>
    - - url->link(t('Remove this user'), 'GroupListController', 'dissociate', array('group_id' => $group['id'], 'user_id' => $user['id']), false, 'popover') ?> + modal->confirm('trash-o', t('Remove this user'), 'GroupListController', 'dissociate', array('group_id' => $group['id'], 'user_id' => $user['id'])) ?>
    text->e($plugin->getPluginVersion()) ?> - - url->link(t('Uninstall'), 'PluginController', 'confirm', array('pluginId' => $pluginFolder), false, 'popover') ?> + modal->confirm('trash-o', t('Uninstall'), 'PluginController', 'confirm', array('pluginId' => $pluginFolder)) ?>
    - - url->link(t('Remove'), 'ProjectRoleRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), false, 'popover') ?> + modal->confirm('trash-o', t('Remove'), 'ProjectRoleRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id'])) ?>
    - - url->link(t('Remove'), 'ColumnRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), false, 'popover') ?> + modal->confirm('trash-o', t('Remove'), 'ColumnRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id'])) ?>
    - - url->link(t('Remove'), 'ColumnMoveRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), false, 'popover') ?> + modal->confirm('trash-o', t('Remove'), 'ColumnMoveRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id'])) ?>
    text->e($tag['name']) ?> - - url->link(t('Remove'), 'ProjectTagController', 'confirm', array('tag_id' => $tag['id'], 'project_id' => $project['id']), false, 'popover') ?> - - url->link(t('Edit'), 'ProjectTagController', 'edit', array('tag_id' => $tag['id'], 'project_id' => $project['id']), false, 'popover') ?> + modal->medium('edit', t('Edit'), 'ProjectTagController', 'edit', array('tag_id' => $tag['id'], 'project_id' => $project['id'])) ?> + modal->confirm('trash-o', t('Remove'), 'ProjectTagController', 'confirm', array('tag_id' => $tag['id'], 'project_id' => $project['id'])) ?>
    text->e($tag['name']) ?> - - url->link(t('Remove'), 'TagController', 'confirm', array('tag_id' => $tag['id']), false, 'popover') ?> - - url->link(t('Edit'), 'TagController', 'edit', array('tag_id' => $tag['id']), false, 'popover') ?> + modal->medium('edit', t('Edit'), 'TagController', 'edit', array('tag_id' => $tag['id'])) ?> + modal->confirm('trash-o', t('Remove'), 'TagController', 'confirm', array('tag_id' => $tag['id'])) ?>