diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/config/api.php | 12 | ||||
-rw-r--r-- | app/Template/config/application.php | 41 | ||||
-rw-r--r-- | app/Template/config/board.php | 21 | ||||
-rw-r--r-- | app/Template/config/calendar.php | 28 | ||||
-rw-r--r-- | app/Template/config/email.php | 11 | ||||
-rw-r--r-- | app/Template/config/project.php | 29 | ||||
-rw-r--r-- | app/Template/config/webhook.php | 20 |
7 files changed, 84 insertions, 78 deletions
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 @@ <div class="page-header"> <h2><?= t('API') ?></h2> </div> -<section class="panel"> +<div class="panel"> <ul> <li> <?= t('API token:') ?> @@ -9,10 +9,10 @@ </li> <li> <?= t('API endpoint:') ?> - <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().'jsonrpc.php' ?>"> - </li> - <li> - <?= $this->url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'api'), true) ?> + <strong><?= $this->url->base().'jsonrpc.php' ?></strong> </li> </ul> -</section> +</div> + +<?= $this->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 @@ <h2><?= t('Application settings') ?></h2> </div> <form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'application')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->label(t('Application URL'), 'application_url') ?> - <?= $this->form->text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?> - <p class="form-help"><?= t('Example: http://example.kanboard.net/ (used to generate absolute URLs)') ?></p> + <fieldset> + <?= $this->form->label(t('Application URL'), 'application_url') ?> + <?= $this->form->text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?> + <p class="form-help"><?= t('Example: http://example.kanboard.net/ (used to generate absolute URLs)') ?></p> - <?= $this->form->label(t('Language'), 'application_language') ?> - <?= $this->form->select('application_language', $languages, $values, $errors) ?> + <?= $this->form->label(t('Language'), 'application_language') ?> + <?= $this->form->select('application_language', $languages, $values, $errors) ?> - <?= $this->form->label(t('Timezone'), 'application_timezone') ?> - <?= $this->form->select('application_timezone', $timezones, $values, $errors) ?> + <?= $this->form->checkbox('password_reset', t('Enable "Forget Password"'), 1, $values['password_reset'] == 1) ?> + </fieldset> - <?= $this->form->label(t('Date format'), 'application_date_format') ?> - <?= $this->form->select('application_date_format', $date_formats, $values, $errors) ?> - <p class="form-help"><?= t('ISO format is always accepted, example: "%s" and "%s"', date('Y-m-d'), date('Y_m_d')) ?></p> + <fieldset> + <?= $this->form->label(t('Timezone'), 'application_timezone') ?> + <?= $this->form->select('application_timezone', $timezones, $values, $errors) ?> - <?= $this->form->label(t('Date and time format'), 'application_datetime_format') ?> - <?= $this->form->select('application_datetime_format', $datetime_formats, $values, $errors) ?> + <?= $this->form->label(t('Date format'), 'application_date_format') ?> + <?= $this->form->select('application_date_format', $date_formats, $values, $errors) ?> + <p class="form-help"><?= t('ISO format is always accepted, example: "%s" and "%s"', date('Y-m-d'), date('Y_m_d')) ?></p> - <?= $this->form->label(t('Time format'), 'application_time_format') ?> - <?= $this->form->select('application_time_format', $time_formats, $values, $errors) ?> + <?= $this->form->label(t('Date and time format'), 'application_datetime_format') ?> + <?= $this->form->select('application_datetime_format', $datetime_formats, $values, $errors) ?> - <?= $this->form->checkbox('password_reset', t('Enable "Forget Password"'), 1, $values['password_reset'] == 1) ?> + <?= $this->form->label(t('Time format'), 'application_time_format') ?> + <?= $this->form->select('application_time_format', $time_formats, $values, $errors) ?> + </fieldset> - <?= $this->form->label(t('Custom Stylesheet'), 'application_stylesheet') ?> - <?= $this->form->textarea('application_stylesheet', $values, $errors) ?> + <fieldset> + <?= $this->form->label(t('Custom Stylesheet'), 'application_stylesheet') ?> + <?= $this->form->textarea('application_stylesheet', $values, $errors) ?> + </fieldset> <?= $this->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 @@ <h2><?= t('Board settings') ?></h2> </div> <form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'board')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->label(t('Task highlight period'), 'board_highlight_period') ?> - <?= $this->form->number('board_highlight_period', $values, $errors) ?> - <p class="form-help"><?= t('Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)') ?></p> + <fieldset> + <?= $this->form->label(t('Task highlight period'), 'board_highlight_period') ?> + <?= $this->form->number('board_highlight_period', $values, $errors) ?> + <p class="form-help"><?= t('Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)') ?></p> - <?= $this->form->label(t('Refresh interval for public board'), 'board_public_refresh_interval') ?> - <?= $this->form->number('board_public_refresh_interval', $values, $errors) ?> - <p class="form-help"><?= t('Frequency in second (60 seconds by default)') ?></p> + <?= $this->form->label(t('Refresh interval for public board'), 'board_public_refresh_interval') ?> + <?= $this->form->number('board_public_refresh_interval', $values, $errors) ?> + <p class="form-help"><?= t('Frequency in second (60 seconds by default)') ?></p> - <?= $this->form->label(t('Refresh interval for private board'), 'board_private_refresh_interval') ?> - <?= $this->form->number('board_private_refresh_interval', $values, $errors) ?> - <p class="form-help"><?= t('Frequency in second (0 to disable this feature, 10 seconds by default)') ?></p> + <?= $this->form->label(t('Refresh interval for private board'), 'board_private_refresh_interval') ?> + <?= $this->form->number('board_private_refresh_interval', $values, $errors) ?> + <p class="form-help"><?= t('Frequency in second (0 to disable this feature, 10 seconds by default)') ?></p> + </fieldset> <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> 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 @@ <div class="page-header"> <h2><?= t('Calendar settings') ?></h2> </div> -<section> <form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'calendar')) ?>" autocomplete="off"> <?= $this->form->csrf() ?> - <div class="panel"> - <h3><?= t('Project calendar view') ?></h3> + <fieldset> + <legend><?= t('Project calendar view') ?></legend> <?= $this->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) ?> - </div> + ), + $values + ) ?> + </fieldset> - <div class="panel"> - <h3><?= t('User calendar view') ?></h3> + <fieldset> + <legend><?= t('User calendar view') ?></legend> <?= $this->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) ?> - </div> + ), + $values + ) ?> + </fieldset> - <div class="panel"> - <h3><?= t('Subtasks time tracking') ?></h3> + <fieldset> + <legend><?= t('Subtasks time tracking') ?></legend> <?= $this->form->checkbox('calendar_user_subtasks_time_tracking', t('Show subtasks based on the time tracking'), 1, $values['calendar_user_subtasks_time_tracking'] == 1) ?> - </div> + </fieldset> <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> </div> </form> -</section> 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 method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'email')) ?>" autocomplete="off"> <?= $this->form->csrf() ?> - <?= $this->form->label(t('Email sender address'), 'mail_sender_address') ?> - <?= $this->form->text('mail_sender_address', $values, $errors, array('placeholder="'.MAIL_FROM.'"')) ?> + <fieldset> + <legend><?= t('Outgoing Emails') ?></legend> + <?= $this->form->label(t('Email sender address'), 'mail_sender_address') ?> + <?= $this->form->text('mail_sender_address', $values, $errors, array('placeholder="'.MAIL_FROM.'"')) ?> - <?= $this->form->label(t('Email transport'), 'mail_transport') ?> - <?= $this->form->select('mail_transport', $mail_transports, $values, $errors) ?> + <?= $this->form->label(t('Email transport'), 'mail_transport') ?> + <?= $this->form->select('mail_transport', $mail_transports, $values, $errors) ?> + </fieldset> <?= $this->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 @@ <h2><?= t('Project settings') ?></h2> </div> <form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'project')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->label(t('Default task color'), 'default_color') ?> - <?= $this->form->select('default_color', $colors, $values, $errors) ?> + <fieldset> + <?= $this->form->label(t('Default task color'), 'default_color') ?> + <?= $this->form->select('default_color', $colors, $values, $errors) ?> - <?= $this->form->label(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?> - <?= $this->form->text('board_columns', $values, $errors) ?> - <p class="form-help"><?= t('Default values are "%s"', $default_columns) ?></p> + <?= $this->form->label(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?> + <?= $this->form->text('board_columns', $values, $errors) ?> + <p class="form-help"><?= t('Default values are "%s"', $default_columns) ?></p> - <?= $this->form->label(t('Default categories for new projects (Comma-separated)'), 'project_categories') ?> - <?= $this->form->text('project_categories', $values, $errors) ?> - <p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p> + <?= $this->form->label(t('Default categories for new projects (Comma-separated)'), 'project_categories') ?> + <?= $this->form->text('project_categories', $values, $errors) ?> + <p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p> + </fieldset> - <?= $this->form->checkbox('disable_private_project', t('Disable private projects'), 1, isset($values['disable_private_project']) && $values['disable_private_project'] == 1) ?> - <?= $this->form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?> - <?= $this->form->checkbox('subtask_time_tracking', t('Trigger automatically subtask time tracking'), 1, $values['subtask_time_tracking'] == 1) ?> - <?= $this->form->checkbox('cfd_include_closed_tasks', t('Include closed tasks in the cumulative flow diagram'), 1, $values['cfd_include_closed_tasks'] == 1) ?> + <fieldset> + <?= $this->form->checkbox('disable_private_project', t('Disable private projects'), 1, isset($values['disable_private_project']) && $values['disable_private_project'] == 1) ?> + <?= $this->form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?> + <?= $this->form->checkbox('subtask_time_tracking', t('Trigger automatically subtask time tracking'), 1, $values['subtask_time_tracking'] == 1) ?> + <?= $this->form->checkbox('cfd_include_closed_tasks', t('Include closed tasks in the cumulative flow diagram'), 1, $values['cfd_include_closed_tasks'] == 1) ?> + </fieldset> <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> 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 @@ <div class="page-header"> <h2><?= t('Webhook settings') ?></h2> </div> -<section> <form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'webhook')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> <?= $this->form->label(t('Webhook URL'), 'webhook_url') ?> @@ -13,19 +11,13 @@ <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> </div> </form> -</section> <div class="page-header margin-top"> <h2><?= t('Webhook token') ?></h2> </div> -<section class="panel"> - <ul> - <li> - <?= t('Webhook token:') ?> - <strong><?= $this->text->e($values['webhook_token']) ?></strong> - </li> - <li> - <?= $this->url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'webhook'), true) ?> - </li> - </ul> -</section> +<div class="panel"> + <?= t('Webhook token:') ?> + <strong><?= $this->text->e($values['webhook_token']) ?></strong> +</div> + +<?= $this->url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'webhook'), true, 'btn btn-red') ?> |