From 36de36dad9928fd5d61a8bd4be45c79707f1aaae Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 8 Jan 2017 21:42:08 -0500 Subject: Improve settings pages layout --- ChangeLog | 1 + app/Controller/CustomFilterController.php | 5 ++-- app/Template/config/api.php | 12 ++++----- app/Template/config/application.php | 41 +++++++++++++++++-------------- app/Template/config/board.php | 21 ++++++++-------- app/Template/config/calendar.php | 28 +++++++++++---------- app/Template/config/email.php | 11 ++++++--- app/Template/config/project.php | 29 ++++++++++++---------- app/Template/config/webhook.php | 20 +++++---------- 9 files changed, 88 insertions(+), 80 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90bb0a4c..4efc9081 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,7 @@ Improvements: * Improve accordion component * Improve currencies pages navigation * Improve link labels pages navigation +* Improve settings pages layout * Offer the possibility to define version compatibility from plugins Version 1.0.36 (Dec 30, 2016) diff --git a/app/Controller/CustomFilterController.php b/app/Controller/CustomFilterController.php index b0b2daff..dfe1ffc4 100644 --- a/app/Controller/CustomFilterController.php +++ b/app/Controller/CustomFilterController.php @@ -167,13 +167,14 @@ class CustomFilterController extends BaseController if ($valid) { if ($this->customFilterModel->update($values)) { $this->flash->success(t('Your custom filter have been updated successfully.')); - return $this->response->redirect($this->helper->url->to('CustomFilterController', 'index', array('project_id' => $project['id']))); + $this->response->redirect($this->helper->url->to('CustomFilterController', 'index', array('project_id' => $project['id'])), true); + return; } else { $this->flash->failure(t('Unable to update custom filter.')); } } - return $this->edit($values, $errors); + $this->edit($values, $errors); } private function checkPermission(array $project, array $filter) diff --git a/app/Template/config/api.php b/app/Template/config/api.php index 7ff292fa..9a3b06ce 100644 --- a/app/Template/config/api.php +++ b/app/Template/config/api.php @@ -1,7 +1,7 @@ -
+
  • @@ -9,10 +9,10 @@
  • - -
  • -
  • - url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'api'), true) ?> + url->base().'jsonrpc.php' ?>
-
+ + +url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'api'), true, 'btn btn-red') ?> + diff --git a/app/Template/config/application.php b/app/Template/config/application.php index 0f842f6e..0d7f613c 100644 --- a/app/Template/config/application.php +++ b/app/Template/config/application.php @@ -2,33 +2,38 @@

- form->csrf() ?> - form->label(t('Application URL'), 'application_url') ?> - form->text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?> -

+
+ form->label(t('Application URL'), 'application_url') ?> + form->text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?> +

- form->label(t('Language'), 'application_language') ?> - form->select('application_language', $languages, $values, $errors) ?> + form->label(t('Language'), 'application_language') ?> + form->select('application_language', $languages, $values, $errors) ?> - form->label(t('Timezone'), 'application_timezone') ?> - form->select('application_timezone', $timezones, $values, $errors) ?> + form->checkbox('password_reset', t('Enable "Forget Password"'), 1, $values['password_reset'] == 1) ?> +
- form->label(t('Date format'), 'application_date_format') ?> - form->select('application_date_format', $date_formats, $values, $errors) ?> -

+
+ form->label(t('Timezone'), 'application_timezone') ?> + form->select('application_timezone', $timezones, $values, $errors) ?> - form->label(t('Date and time format'), 'application_datetime_format') ?> - form->select('application_datetime_format', $datetime_formats, $values, $errors) ?> + form->label(t('Date format'), 'application_date_format') ?> + form->select('application_date_format', $date_formats, $values, $errors) ?> +

- form->label(t('Time format'), 'application_time_format') ?> - form->select('application_time_format', $time_formats, $values, $errors) ?> + form->label(t('Date and time format'), 'application_datetime_format') ?> + form->select('application_datetime_format', $datetime_formats, $values, $errors) ?> - form->checkbox('password_reset', t('Enable "Forget Password"'), 1, $values['password_reset'] == 1) ?> + form->label(t('Time format'), 'application_time_format') ?> + form->select('application_time_format', $time_formats, $values, $errors) ?> +
- form->label(t('Custom Stylesheet'), 'application_stylesheet') ?> - form->textarea('application_stylesheet', $values, $errors) ?> +
+ form->label(t('Custom Stylesheet'), 'application_stylesheet') ?> + form->textarea('application_stylesheet', $values, $errors) ?> +
hook->render('template:config:application', array('values' => $values, 'errors' => $errors)) ?> diff --git a/app/Template/config/board.php b/app/Template/config/board.php index 62a736e7..35058f0f 100644 --- a/app/Template/config/board.php +++ b/app/Template/config/board.php @@ -2,20 +2,21 @@

- form->csrf() ?> - form->label(t('Task highlight period'), 'board_highlight_period') ?> - form->number('board_highlight_period', $values, $errors) ?> -

+
+ form->label(t('Task highlight period'), 'board_highlight_period') ?> + form->number('board_highlight_period', $values, $errors) ?> +

- form->label(t('Refresh interval for public board'), 'board_public_refresh_interval') ?> - form->number('board_public_refresh_interval', $values, $errors) ?> -

+ form->label(t('Refresh interval for public board'), 'board_public_refresh_interval') ?> + form->number('board_public_refresh_interval', $values, $errors) ?> +

- form->label(t('Refresh interval for private board'), 'board_private_refresh_interval') ?> - form->number('board_private_refresh_interval', $values, $errors) ?> -

+ form->label(t('Refresh interval for private board'), 'board_private_refresh_interval') ?> + form->number('board_private_refresh_interval', $values, $errors) ?> +

+
diff --git a/app/Template/config/calendar.php b/app/Template/config/calendar.php index 077fe903..0cc3d064 100644 --- a/app/Template/config/calendar.php +++ b/app/Template/config/calendar.php @@ -1,34 +1,36 @@ -
form->csrf() ?> -
-

+
+ form->radios('calendar_project_tasks', array( 'date_creation' => t('Show tasks based on the creation date'), 'date_started' => t('Show tasks based on the start date'), - ), $values) ?> -
+ ), + $values + ) ?> + -
-

+
+ form->radios('calendar_user_tasks', array( 'date_creation' => t('Show tasks based on the creation date'), 'date_started' => t('Show tasks based on the start date'), - ), $values) ?> -
+ ), + $values + ) ?> + -
-

+
+ form->checkbox('calendar_user_subtasks_time_tracking', t('Show subtasks based on the time tracking'), 1, $values['calendar_user_subtasks_time_tracking'] == 1) ?> -
+
-
diff --git a/app/Template/config/email.php b/app/Template/config/email.php index 6ff76eca..bc2c2ae5 100644 --- a/app/Template/config/email.php +++ b/app/Template/config/email.php @@ -4,11 +4,14 @@
form->csrf() ?> - form->label(t('Email sender address'), 'mail_sender_address') ?> - form->text('mail_sender_address', $values, $errors, array('placeholder="'.MAIL_FROM.'"')) ?> +
+ + form->label(t('Email sender address'), 'mail_sender_address') ?> + form->text('mail_sender_address', $values, $errors, array('placeholder="'.MAIL_FROM.'"')) ?> - form->label(t('Email transport'), 'mail_transport') ?> - form->select('mail_transport', $mail_transports, $values, $errors) ?> + form->label(t('Email transport'), 'mail_transport') ?> + form->select('mail_transport', $mail_transports, $values, $errors) ?> +
hook->render('template:config:email', array('values' => $values, 'errors' => $errors)) ?> diff --git a/app/Template/config/project.php b/app/Template/config/project.php index 6d8d131a..514a9baa 100644 --- a/app/Template/config/project.php +++ b/app/Template/config/project.php @@ -2,24 +2,27 @@

- form->csrf() ?> - form->label(t('Default task color'), 'default_color') ?> - form->select('default_color', $colors, $values, $errors) ?> +
+ form->label(t('Default task color'), 'default_color') ?> + form->select('default_color', $colors, $values, $errors) ?> - form->label(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?> - form->text('board_columns', $values, $errors) ?> -

+ form->label(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?> + form->text('board_columns', $values, $errors) ?> +

- form->label(t('Default categories for new projects (Comma-separated)'), 'project_categories') ?> - form->text('project_categories', $values, $errors) ?> -

+ form->label(t('Default categories for new projects (Comma-separated)'), 'project_categories') ?> + form->text('project_categories', $values, $errors) ?> +

+
- form->checkbox('disable_private_project', t('Disable private projects'), 1, isset($values['disable_private_project']) && $values['disable_private_project'] == 1) ?> - form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?> - form->checkbox('subtask_time_tracking', t('Trigger automatically subtask time tracking'), 1, $values['subtask_time_tracking'] == 1) ?> - form->checkbox('cfd_include_closed_tasks', t('Include closed tasks in the cumulative flow diagram'), 1, $values['cfd_include_closed_tasks'] == 1) ?> +
+ form->checkbox('disable_private_project', t('Disable private projects'), 1, isset($values['disable_private_project']) && $values['disable_private_project'] == 1) ?> + form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?> + form->checkbox('subtask_time_tracking', t('Trigger automatically subtask time tracking'), 1, $values['subtask_time_tracking'] == 1) ?> + form->checkbox('cfd_include_closed_tasks', t('Include closed tasks in the cumulative flow diagram'), 1, $values['cfd_include_closed_tasks'] == 1) ?> +
diff --git a/app/Template/config/webhook.php b/app/Template/config/webhook.php index 24bd0c27..bc4bbfdf 100644 --- a/app/Template/config/webhook.php +++ b/app/Template/config/webhook.php @@ -1,9 +1,7 @@ -
- form->csrf() ?> form->label(t('Webhook URL'), 'webhook_url') ?> @@ -13,19 +11,13 @@
- -
- -
+
+ + text->e($values['webhook_token']) ?> +
+ +url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'webhook'), true, 'btn btn-red') ?> -- cgit v1.2.3