Merge branch 'ent-9662-second-round' of brutus.artica.es:artica/pandorafms into ent-9662-second-round

This commit is contained in:
Jose Gonzalez 2023-03-07 17:50:57 +01:00
commit 5925cb0b2c
13 changed files with 426 additions and 263 deletions

View File

@ -171,7 +171,7 @@ if (is_ajax()) {
$ffield = $editor_type_chkbx;
$ffield .= html_print_textarea(
'field'.$i.'_value',
1,
5,
1,
'',
'class="fields"',
@ -208,7 +208,7 @@ if (is_ajax()) {
$rfield = $editor_type_chkbx;
$rfield .= html_print_textarea(
'field'.$i.'_recovery_value',
1,
5,
1,
'',
'class="fields_recovery"',
@ -329,7 +329,7 @@ if (is_ajax()) {
$ffield .= html_print_textarea(
'field'.$i.'_value[]',
1,
5,
1,
'',
'style="min-height:40px; '.$style.'" class="fields"',
@ -341,7 +341,7 @@ if (is_ajax()) {
$rfield .= html_print_textarea(
'field'.$i.'_recovery_value[]',
1,
5,
1,
'',
'style="min-height:40px; '.$style.'" class="fields_recovery',
@ -484,7 +484,7 @@ if (is_ajax()) {
} else {
$ffield = html_print_textarea(
'field'.$i.'_value',
1,
5,
1,
$fv[0],
'style="'.$style.'" class="fields min-height-40px"',
@ -494,7 +494,7 @@ if (is_ajax()) {
);
$rfield = html_print_textarea(
'field'.$i.'_recovery_value',
1,
5,
1,
$fv[0],
'style="'.$style.'" class="fields_recovery min-height-40px',
@ -507,7 +507,7 @@ if (is_ajax()) {
} else {
$ffield = html_print_textarea(
'field'.$i.'_value',
1,
5,
1,
'',
'style="'.$style.'" class="fields min-height-40px"',
@ -517,7 +517,7 @@ if (is_ajax()) {
);
$rfield = html_print_textarea(
'field'.$i.'_recovery_value',
1,
5,
1,
'',
'style="'.$style.'" class="fields_recovery min-height-40px"',
@ -533,7 +533,7 @@ if (is_ajax()) {
$fields_rows[$i] = '';
} else {
$fields_rows[$i] = '<tr id="table_macros-field'.$i.'" class="datos">';
$fields_rows[$i] .= '<td class="datos bolder w20p">'.$fdesc.'</td>';
$fields_rows[$i] .= '<td class="datos bolder w20p" style="font-size: 13px;">'.$fdesc.'</td>';
$fields_rows[$i] .= '<td class="datos">'.$ffield.'</td>';
if ($get_recovery_fields) {
$fields_rows[$i] .= '<td class="datos recovery_col">'.$rfield.'</td>';
@ -575,12 +575,19 @@ if ($update_command) {
if (defined('METACONSOLE')) {
alerts_meta_print_header();
} else {
ui_print_page_header(
__('Alerts').' &raquo; '.__('Alert commands'),
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
false,
'',
true
true,
[],
[
[
'link' => '',
'label' => __('Alert commands'),
],
]
);
}
@ -811,10 +818,9 @@ foreach ($commands as $command) {
array_push($table->data, $data);
}
ui_pagination($total_commands, $url);
if (isset($data) === true && count($table->data) > 0) {
html_print_table($table);
ui_pagination($total_commands, $url, 0, 0, false, 'offset', true, 'pagination-bottom');
$pagination = ui_pagination($total_commands, $url, 0, 0, true, 'offset', false, '');
} else {
ui_print_info_message(
[
@ -826,12 +832,17 @@ if (isset($data) === true && count($table->data) > 0) {
// Commands can only be created by the super administrator.
if (users_is_admin() === true) {
echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/configure_alert_command&pure='.$pure.'">';
html_print_submit_button(__('Create'), 'create', false, 'class="sub next"');
$buttonSubmit = html_print_submit_button(
__('Create'),
'create',
false,
['icon' => 'wand'],
true
);
html_print_input_hidden('create_alert', 1);
html_print_action_buttons($buttonSubmit, ['right_content' => $pagination]);
echo '</form>';
echo '</div>';
}
?>

View File

@ -68,12 +68,19 @@ if ($al_action !== false) {
if (defined('METACONSOLE')) {
alerts_meta_print_header();
} else {
ui_print_page_header(
__('Alerts').' &raquo; '.__('Configure alert action'),
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
false,
'alert_config',
true
'',
true,
[],
[
[
'link' => '',
'label' => __('Configure alert action'),
],
]
);
}
} else {
@ -81,12 +88,19 @@ if ($al_action !== false) {
if (defined('METACONSOLE')) {
alerts_meta_print_header();
} else {
ui_print_page_header(
__('Alerts').' &raquo; '.__('Configure alert action'),
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
false,
'alert_config',
true
'',
true,
[],
[
[
'link' => '',
'label' => __('Configure alert action'),
],
]
);
}
@ -290,73 +304,99 @@ $table->data[1][1] = html_print_label_input_block(
)
);
$table->data[2][0] = html_print_label_input_block(
$table_macros = new stdClass();
$table_macros->id = 'table_macros';
$table_macros->width = '100%';
$table_macros->class = 'databox filters filter-table-adv';
$table_macros->style = [];
$table_macros->size = [];
$table_macros->size[0] = '20%';
$table_macros->size[1] = '40%';
$table_macros->size[2] = '40%';
$table_macros->data = [];
$table_macros->data[0][0] = '';
$table_macros->data[0][1] = html_print_label_input_block(
__('Triggering'),
''
);
$table_macros->data[0][2] = html_print_label_input_block(
__('Recovery'),
''
);
$table->data[2][1] = html_print_label_input_block(
__('Recovery'),
$table_macros->data[1][0] = html_print_label_input_block(
__('Command preview'),
''
);
$table->data[5][0] = __('Command preview');
$table->data[5][1] = html_print_textarea(
'command_preview',
5,
30,
$table_macros->data[1][1] = html_print_label_input_block(
'',
'disabled="disabled"',
true
html_print_textarea(
'command_preview',
5,
30,
'',
'disabled="disabled"',
true
)
);
$table->data[5][2] = html_print_textarea(
'command_recovery_preview',
5,
30,
$table_macros->data[1][2] = html_print_label_input_block(
'',
'disabled="disabled"',
true
html_print_textarea(
'command_recovery_preview',
5,
30,
'',
'disabled="disabled"',
true
)
);
// Selector will work only with Integria activated.
$integriaIdName = 'integria_wu';
$table->data[$integriaIdName][0] = __('Create workunit on recovery').ui_print_help_tip(
__('If closed status is set on recovery, a workunit will be added to the ticket in Integria IMS rather that closing the ticket.'),
true
);
$table->data[$integriaIdName][1] = html_print_checkbox_switch_extended(
'create_wu_integria',
1,
$create_wu_integria,
false,
'',
$disabled_attr,
true
$table_macros->colspan[$integriaIdName][0] = 3;
$table_macros->data[$integriaIdName][0] = html_print_label_input_block(
__('Create workunit on recovery').ui_print_help_tip(
__('If closed status is set on recovery, a workunit will be added to the ticket in Integria IMS rather that closing the ticket.'),
true
),
html_print_checkbox_switch_extended(
'create_wu_integria',
1,
$create_wu_integria,
false,
'',
$disabled_attr,
true
)
);
for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
$table->data['field'.$i][0] = html_print_image(
$table_macros->data['field'.$i][0] = html_print_image(
'images/spinner.gif',
true
);
$table->data['field'.$i][1] = html_print_image(
$table_macros->data['field'.$i][1] = html_print_image(
'images/spinner.gif',
true
);
$table->data['field'.$i][2] = html_print_image(
$table_macros->data['field'.$i][2] = html_print_image(
'images/spinner.gif',
true
);
// Store the value in a hidden to keep it on first execution
$table->data['field'.$i][1] .= html_print_input_hidden(
$table_macros->data['field'.$i][1] .= html_print_input_hidden(
'field'.$i.'_value',
(!empty($action['field'.$i]) || $action['field'.$i] == 0) ? $action['field'.$i] : '',
true,
'',
$disabled_attr
);
$table->data['field'.$i][2] .= html_print_input_hidden(
$table_macros->data['field'.$i][2] .= html_print_input_hidden(
'field'.$i.'_recovery_value',
(!empty($action['field'.$i.'_recovery']) || $action['field'.$i] == 0) ? $action['field'.$i.'_recovery'] : '',
true,
@ -369,10 +409,12 @@ $offset = (int) get_parameter('offset', 0);
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_actions&pure='.$pure.'&offset='.$offset.'" class="max_floating_element_size">';
$table_html = html_print_table($table, true);
$table_html_macros = html_print_table($table_macros, true);
$backButton = '';
$submitButton = '';
echo $table_html;
echo $table_html_macros;
if ($is_management_allowed === true) {
if ($id) {
html_print_input_hidden('id', $id);

View File

@ -54,12 +54,19 @@ $alert = [];
if (is_metaconsole() === true) {
alerts_meta_print_header();
} else {
ui_print_page_header(
__('Alerts').' &raquo; '.__('Configure alert command'),
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
false,
'',
true
true,
[],
[
[
'link' => '',
'label' => __('Configure alert command'),
],
]
);
}
@ -199,112 +206,23 @@ if ($is_management_allowed === false) {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
if (is_metaconsole() === true) {
$table->head[0] = ($id) ? __('Update Command') : __('Create Command');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
}
$table->class = 'databox filters filter-table-adv';
$table->style = [];
if (is_metaconsole() === false) {
$table->style[0] = 'font-weight: bold';
$table->style[2] = 'font-weight: bold';
$table->style[4] = 'font-weight: bold';
}
$table->size = [];
$table->size[0] = '20%';
$table->size[0] = '45%';
$table->size[1] = '45%';
$table->size[2] = '10%';
$table->data = [];
$table->colspan['name'][1] = 3;
$table->data['name'][0] = __('Name');
$table->data['name'][2] = html_print_input_text(
'name',
$name,
'',
35,
255,
true,
false,
false,
'',
'',
'',
'',
false,
'',
'',
'',
!$is_management_allowed
);
$table->colspan['command'][1] = 3;
$table->data['command'][0] = __('Command');
$table->data['command'][1] = html_print_textarea(
'command',
8,
30,
$command,
'',
true,
'',
!$is_management_allowed
);
$return_all_group = false;
if (users_can_manage_group_all('LM') === true) {
$return_all_group = true;
}
$table->colspan['group'][1] = 3;
$table->data['group'][0] = __('Group');
$table->data['group'][1] = '<div class="w250px inline">'.html_print_select_groups(
false,
'LM',
$return_all_group,
'id_group',
$id_group,
false,
'',
0,
true,
false,
true,
'',
!$is_management_allowed
).'</div>';
$table->colspan['description'][1] = 3;
$table->data['description'][0] = __('Description');
$table->data['description'][1] = html_print_textarea(
'description',
10,
30,
$description,
'',
true,
'',
!$is_management_allowed
);
for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
$table->data['field'.$i][0] = sprintf(__('Field %s description'), $i);
if (empty($fields_descriptions) === false) {
$field_description = $fields_descriptions[($i - 1)];
} else {
$field_description = '';
}
$table->data['field'.$i][1] = html_print_input_text(
'field'.$i.'_description',
$field_description,
$table->data[0][0] = html_print_label_input_block(
__('Name'),
html_print_input_text(
'name',
$name,
'',
30,
35,
255,
true,
false,
@ -318,12 +236,91 @@ for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
'',
'',
!$is_management_allowed
);
)
);
$table->data['field'.$i][2] = sprintf(__('Field %s values'), $i);
$table->data['field'.$i][2] .= ui_print_help_tip(
__('value1,tag1;value2,tag2;value3,tag3'),
true
if (users_can_manage_group_all('LM') === true) {
$return_all_group = true;
}
$table->data[0][1] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
'LM',
$return_all_group,
'id_group',
$id_group,
false,
'',
0,
true,
false,
true,
'',
!$is_management_allowed
)
);
$table->data[1][0] = html_print_label_input_block(
__('Command'),
html_print_textarea(
'command',
8,
30,
$command,
'',
true,
'',
!$is_management_allowed
)
);
$return_all_group = false;
$table->data[1][1] = html_print_label_input_block(
__('Description'),
html_print_textarea(
'description',
8,
30,
$description,
'',
true,
'',
!$is_management_allowed
)
);
for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
if (empty($fields_descriptions) === false) {
$field_description = $fields_descriptions[($i - 1)];
} else {
$field_description = '';
}
$table->data['field'.$i][0] = html_print_label_input_block(
sprintf(__('Field %s description'), $i),
html_print_input_text(
'field'.$i.'_description',
$field_description,
'',
30,
255,
true,
false,
false,
'',
'',
'',
'',
false,
'',
'',
'',
!$is_management_allowed
)
);
if (empty($fields_values) === false) {
@ -338,54 +335,72 @@ for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
$selected = false;
}
$table->data['field'.$i][3] = html_print_input_text(
'field'.$i.'_values',
$field_values,
'',
55,
1000,
true,
false,
false,
'',
'field_value',
'',
'',
false,
'',
'',
'',
!$is_management_allowed
$table->data['field'.$i][1] = html_print_label_input_block(
sprintf(__('Field %s values'), $i).ui_print_help_tip(
__('value1,tag1;value2,tag2;value3,tag3'),
true
),
html_print_input_text(
'field'.$i.'_values',
$field_values,
'',
55,
1000,
true,
false,
false,
'',
'field_value',
'',
'',
false,
'',
'',
'',
!$is_management_allowed
)
);
$table->data['field'.$i][4] = __('Hide');
$table->data['field'.$i][5] = html_print_checkbox_extended(
'field'.$i.'_hide',
1,
$selected,
!$is_management_allowed,
'cursor: \'pointer\'',
'class="hide_inputs"',
true
$table->data['field'.$i][2] = html_print_label_input_block(
__('Hide'),
html_print_checkbox_extended(
'field'.$i.'_hide',
1,
$selected,
!$is_management_allowed,
'cursor: \'pointer\'',
'class="hide_inputs"',
true
)
);
}
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_commands&pure='.$pure.'">';
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_commands&pure='.$pure.'" class="max_floating_element_size">';
html_print_table($table);
if ($is_management_allowed === true) {
echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id) {
html_print_input_hidden('id', $id);
html_print_input_hidden('update_command', 1);
html_print_submit_button(__('Update'), 'create', false, 'class="sub upd"');
$buttonSubmit = html_print_submit_button(
__('Update'),
'create',
false,
['icon' => 'wand'],
true
);
} else {
html_print_input_hidden('create_command', 1);
html_print_submit_button(__('Create'), 'create', false, 'class="sub wand"');
$buttonSubmit = html_print_submit_button(
__('Create'),
'create',
false,
['icon' => 'wand'],
true
);
}
echo '</div>';
html_print_action_buttons($buttonSubmit);
}
echo '</form>';

View File

@ -1040,7 +1040,7 @@ class CalendarManager
'id' => 'templates_alerts_special_days',
'return' => true,
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => 'godmode/alerts/alert_special_days',
@ -1075,7 +1075,9 @@ class CalendarManager
'name' => 'name',
],
],
'class' => 'no_border',
],
'filter_main_class' => 'box-flat white_table_graph',
]
);
} catch (Exception $e) {

View File

@ -2400,3 +2400,10 @@ function topFunction() {
500
);
}
function menuActionButtonResizing() {
$(".action_buttons_right_content").attr(
"style",
"left: " + $("#menu_full").width() + "px;"
);
}

View File

@ -354,3 +354,35 @@ div#rules.show {
.note-special-day div a.tip > img {
margin: 0px;
}
form#icalendar-special-days.calendar-upload-form {
border: 0px;
padding: 0px;
}
form#icalendar-special-days.calendar-upload-form > ul {
align-items: flex-start !important;
}
form#icalendar-special-days.calendar-upload-form > ul > li > label {
font-size: 13px;
line-height: 16px;
margin-bottom: 10px;
}
.special-days-thead > thead > tr > th:not(.header) {
border: 1px solid #e2e2e2;
}
.special-days-thead > thead > tr > th.header {
border: 0px;
border-bottom: 1px solid #878787;
}
.special-days-thead > thead > tr > th.c0 {
border-left: 1px solid #e2e2e2;
}
.special-days-thead > thead > tr > th.c6 {
border-right: 1px solid #e2e2e2;
}

View File

@ -675,6 +675,14 @@ select:-internal-list-box {
width: 40%;
}
.w45p {
width: 45%;
}
.w48p {
width: 48%;
}
.w47p {
width: 47%;
}
@ -11567,3 +11575,7 @@ ul.tag-editor {
background: #f6f7fb;
line-height: 20px;
}
.max-width-100p {
max-width: 100% !important;
}

View File

@ -46,7 +46,6 @@ ul.wizard li > label:not(.p-switch):first-of-type {
}
ul.wizard li > textarea {
width: 600px;
height: 15em;
display: inline-block;
}
@ -206,6 +205,7 @@ li#textarea-create-site > textarea {
width: 100%;
}
form.alert-correlation > ul.wizard > li > label,
form#create_site > ul.wizard > li > label {
font-size: 13px;
line-height: 16px;
@ -216,3 +216,23 @@ form#create_site > ul.wizard > li > label {
select[multiple] {
min-height: 20em;
}
form.alert-correlation > div > ul,
form.alert-correlation > ul {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
form.alert-correlation > div > ul > li.flex-flex-end {
display: flex;
align-items: flex-end;
}
form.alert-correlation > div > ul > li.flex-flex-end > input {
width: 150px !important;
}
form.alert-correlation > div > ul > li.flex-flex-end > label {
width: 50px !important;
}

View File

@ -1524,17 +1524,6 @@ require 'include/php_to_js_values.php';
}
}
//$('.button_collapse').on('click', menuActionButtonResizing());
// Cursor change for show a spinner. Experimental.
/*
$('.buttonButton').not('.dialog_opener').on('click', function(){
$('*').css('cursor', 'wait');
});
$('.submitButton').not('.dialog_opener').on('click', function(){
$('*').css('cursor', 'wait');
});
*/
// When the user scrolls down 400px from the top of the document, show the
// button.
window.onscroll = function() {
@ -1545,10 +1534,6 @@ require 'include/php_to_js_values.php';
scrollFunction()
};
function menuActionButtonResizing() {
$('.action_buttons_right_content').attr('style', 'left: '+($('#menu_full').width())+'px;');
}
function first_time_identification() {
jQuery.post("ajax.php", {
"page": "general/register",

View File

@ -34,19 +34,19 @@ if (\is_metaconsole() === true) {
\alerts_meta_print_header($tabs);
} else {
// Header.
\ui_print_page_header(
// Title.
__('Calendars Edit'),
// Icon.
\ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
// Return.
false,
// Help.
'alert_special_days',
// Godmode.
true,
// Options.
$tabs
$tabs,
[
[
'link' => '',
'label' => __('Calendars Edit'),
],
]
);
}
@ -114,19 +114,24 @@ $inputs[] = [
'rows' => 50,
'columns' => 30,
],
'class' => 'w100p',
];
$button_create = '';
if ($is_management_allowed === true) {
// Submit.
$inputs[] = [
'arguments' => [
'name' => 'button',
'label' => (($create === true) ? __('Create') : __('Update')),
'type' => 'submit',
'attributes' => 'class="sub next"',
],
];
html_print_action_buttons(
html_print_submit_button(
(($create === true) ? __('Create') : __('Update')),
'button',
false,
[
'icon' => 'wand',
'form' => 'create_specia_days',
],
true
)
);
}
// Print form.
@ -135,6 +140,8 @@ HTML::printForm(
'form' => [
'action' => $url.'&op=edit&action=save&id='.$calendar->id(),
'method' => 'POST',
'id' => 'create_specia_days',
'class' => 'aaaa',
],
'inputs' => $inputs,
],

View File

@ -101,7 +101,7 @@ try {
[
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 100%',
'style' => 'width: 99%',
'columns' => $columns,
'column_names' => $column_names,
'ajax_url' => $ajax_url,
@ -117,12 +117,14 @@ try {
[
'label' => __('Free search'),
'type' => 'text',
'class' => 'mw250px',
'class' => 'w25p',
'id' => 'free_search',
'name' => 'free_search',
],
],
],
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
'dom_elements' => 'lftpB',
]
);
} catch (Exception $e) {
@ -130,7 +132,7 @@ try {
}
if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
HTML::printForm(
$form_create = HTML::printForm(
[
'form' => [
'action' => $url.'&op=edit',
@ -142,10 +144,12 @@ if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
'name' => 'button',
'label' => __('Create'),
'type' => 'submit',
'attributes' => 'class="sub next"',
'attributes' => ['icon' => 'wand'],
],
],
],
]
],
true
);
html_print_action_buttons($form_create);
}

View File

@ -35,19 +35,19 @@ if (\is_metaconsole() === true) {
\alerts_meta_print_header($tabs);
} else {
// Header.
\ui_print_page_header(
// Title.
__('Special days'),
// Icon.
ui_print_standard_header(
__('Alerts'),
'images/gm_alerts.png',
// Return.
false,
// Help.
'alert_special_days',
// Godmode.
true,
// Options.
$tabs
$tabs,
[
[
'link' => '',
'label' => __('Special days'),
],
]
);
}
@ -85,6 +85,7 @@ $inputs[] = [
'rows' => 10,
'options' => ['required' => 1],
],
'class' => 'flex flex_column',
];
$days = [];
@ -104,6 +105,7 @@ $inputs[] = [
'type' => 'select',
'fields' => $days,
],
'class' => 'mrgn_right_20px',
];
// Group.
@ -114,6 +116,7 @@ $inputs[] = [
'returnAllGroup' => true,
'name' => 'id_group',
],
'class' => 'mrgn_right_20px',
];
// Group.
@ -128,6 +131,7 @@ $inputs[] = [
'id' => 'overwrite',
'disabled_hidden' => true,
],
'class' => 'flex flex_column',
];
// Submit.
@ -136,23 +140,39 @@ $inputs[] = [
'name' => 'button',
'label' => __('Upload'),
'type' => 'submit',
'attributes' => 'class="sub next"',
'attributes' => [
'icon' => 'wand',
'class' => 'mini',
],
],
];
if ($is_management_allowed === true) {
// Print form.
HTML::printForm(
$form_upload = HTML::printForm(
[
'form' => [
'action' => $url.'&op=upload_ical&id='.$id_calendar,
'method' => 'POST',
'id' => 'icalendar-special-days',
'enctype' => 'multipart/form-data',
'class' => 'calendar-upload-form',
],
'inputs' => $inputs,
],
false
true
);
ui_toggle(
$form_upload,
'<span class="subsection_header_title">'.__('Upload').'</span>',
__('Upload'),
'upload',
true,
false,
'',
'white-box-content no_border',
'filter-datatable-main box-flat white_table_graph fixed_filter_bar '
);
}
@ -216,7 +236,7 @@ for ($month = 1; $month <= 12; $month++) {
$cal_table = new stdClass();
$cal_table->width = '100%';
$cal_table->class = 'databox data';
$cal_table->class = 'databox data special-days-thead';
$cal_table->data = [];
$cal_table->head = [];
@ -238,7 +258,7 @@ for ($month = 1; $month <= 12; $month++) {
$cal_table->size[6] = '14%';
$cal_table->align = [];
$cal_table->border = '1';
$cal_table->titlestyle = 'text-align:center; font-weight: bold;';
$cal_table->titlestyle = 'text-align:center;';
switch ($display_month) {
case 1:
$cal_table->title = __('January');
@ -467,7 +487,7 @@ for ($month = 1; $month <= 12; $month++) {
}
if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
HTML::printForm(
$form_create = HTML::printForm(
[
'form' => [
'action' => $url.'&op=edit',
@ -479,12 +499,14 @@ if ((bool) check_acl($config['id_user'], 0, 'LM') === true) {
'name' => 'button',
'label' => __('Create'),
'type' => 'submit',
'attributes' => 'class="sub next"',
'attributes' => ['icon' => 'wand'],
],
],
],
]
],
true
);
html_print_action_buttons($form_create);
}
echo '<div id="modal-alert-templates" class="invisible"></div>';

View File

@ -156,14 +156,18 @@ $inputs[] = [
if ($is_management_allowed === true) {
// Submit.
$inputs[] = [
'arguments' => [
'name' => 'button',
'label' => (($create === true) ? __('Create') : __('Update')),
'type' => 'submit',
'attributes' => 'class="sub next"',
],
];
html_print_action_buttons(
html_print_submit_button(
(($create === true) ? __('Create') : __('Update')),
'button',
false,
[
'icon' => 'wand',
'form' => 'form-special-days',
],
true
)
);
}
// Print form.