'; $url_link .= __('metaconsole'); $url_link .= ''; } else { $url_link = __('any node'); } \ui_print_warning_message( __( 'This node is configured with centralized mode. All alert calendar information is read only. Go to %s to manage it.', $url_link ) ); } if (empty($message) === false) { echo $message; } $inputs = []; // Date. $inputs[] = [ 'label' => __('Date'), 'arguments' => [ 'type' => 'text', 'name' => 'date', 'required' => true, 'value' => $specialDay->date(), ], 'extra' => html_print_image( 'images/calendar_view_day.png', true, [ 'alt' => 'calendar', 'onclick' => "scwShow(scwID('text-date'),this);", 'class' => 'invert_filter', ] ), ]; if (users_can_manage_group_all('LM') === true) { $display_all_group = true; } else { $display_all_group = false; } // Group. $inputs[] = [ 'label' => __('Group'), 'arguments' => [ 'type' => 'select_groups', 'returnAllGroup' => $display_all_group, 'name' => 'id_group', 'selected' => $specialDay->id_group(), ], ]; $days = []; $days[1] = __('Monday'); $days[2] = __('Tuesday'); $days[3] = __('Wednesday'); $days[4] = __('Thursday'); $days[5] = __('Friday'); $days[6] = __('Saturday'); $days[7] = __('Sunday'); $days[8] = __('Holidays'); // Same day of the week. $inputs[] = [ 'label' => __('Same day of the week'), 'arguments' => [ 'name' => 'day_code', 'type' => 'select', 'fields' => $days, 'selected' => ($specialDay->day_code() === null) ? 1 : $specialDay->day_code(), ], ]; // Description. $inputs[] = [ 'label' => __('Description'), 'arguments' => [ 'type' => 'textarea', 'name' => 'description', 'required' => false, 'value' => $specialDay->description(), 'rows' => 50, 'columns' => 30, ], ]; // Calendar. $inputs[] = [ 'arguments' => [ 'type' => 'hidden', 'name' => 'id_calendar', 'value' => $specialDay->id_calendar(), ], ]; if ($is_management_allowed === true) { // Submit. $inputs[] = [ 'arguments' => [ 'name' => 'button', 'label' => (($create === true) ? __('Create') : __('Update')), 'type' => 'submit', 'attributes' => 'class="sub next"', ], ]; } // Print form. HTML::printForm( [ 'form' => [ 'id' => 'form-special-days', 'action' => $url.'&action=save&id='.$specialDay->id(), 'method' => 'POST', ], 'inputs' => $inputs, ], false, true ); echo ''; ui_require_javascript_file('calendar'); ui_require_javascript_file('pandora_alerts'); \enterprise_hook('close_meta_frame'); ?>