1 <?php
defined('SYSPATH') OR die('No direct access allowed.'); ?
>
3 <div id
="response"></div
>
4 <div id
="recurring_downtime_error">
7 echo _('<strong>ERROR: </strong>' . $error);
11 <form
class="report-page-setup" method
="POST" id
="setup_form" action
="">
12 <div
class="report-block">
13 <h2
><?php
echo _('Report Mode'); ?
></h2
>
15 <?php
if (isset($schedule_id) && !empty($schedule_id)) {
16 # show link to create new recurring schedule
17 echo ' '.html
::anchor('recurring_downtime/', _('Add New Downtime Schedule')).'<br /><br />';
20 if (isset($schedule_id) && !empty($schedule_id)) {?
>
21 <input type
="hidden" name
="schedule_id" value
="<?php echo $schedule_id ?>" />
23 <table summary
="Select object type" class="setup-tbl obj_selector">
26 <select id
="report_type" name
="report_type">
27 <option value
="hostgroups" <?php
echo $schedule_info->get_downtime_type() === 'hostgroups' ?
'selected="selected"' : ''; ?
>><?php
echo _('Hostgroups') ?
></option
>
28 <option value
="hosts" <?php
echo $schedule_info->get_downtime_type() === 'hosts' ?
'selected="selected"' : ''; ?
>><?php
echo _('Hosts') ?
></option
>
29 <option value
="servicegroups" <?php
echo $schedule_info->get_downtime_type() === 'servicegroups' ?
'selected="selected"' : ''; ?
>><?php
echo _('Servicegroups') ?
></option
>
30 <option value
="services" <?php
echo $schedule_info->get_downtime_type() === 'services' ?
'selected="selected"' : ''; ?
>><?php
echo _('Services') ?
></option
>
32 <input type
="button" id
="sel_report_type" class="button select20" value
="<?php echo _('Select') ?>" />
38 <select data
-filterable data
-type
="hostgroup" name
="objects[]" id
="objects" multiple
="multiple">
44 <!--table summary
="Select object type" class="setup-tbl">
48 <select name
="downtime_type" id
="downtime_type">
49 <option value
="hostgroups" <?php
echo $schedule_info->get_downtime_type() === 'hostgroups' ?
'selected="selected"' : ''; ?
>><?php
echo _('Hostgroups') ?
></option
>
50 <option value
="hosts" <?php
echo $schedule_info->get_downtime_type() === 'hosts' ?
'selected="selected"' : ''; ?
>><?php
echo _('Hosts') ?
></option
>
51 <option value
="servicegroups" <?php
echo $schedule_info->get_downtime_type() === 'servicegroups' ?
'selected="selected"' : ''; ?
>><?php
echo _('Servicegroups') ?
></option
>
52 <option value
="services" <?php
echo $schedule_info->get_downtime_type() === 'services' ?
'selected="selected"' : ''; ?
>><?php
echo _('Services') ?
></option
>
54 <input type
="button" id
="sel_downtime_type" class="button select20" value
="<?php echo _('Select') ?>" />
55 <div id
="progress"></div
>
61 <?php
echo _('Filter:') ?
><br
/>
62 <input type
="text" name
="filter_field" id
="filter_field" autocomplete
=off size
="10" value
="">
63 <input type
="button" name
="clear_filter" id
="clear_filter" value
="<?php echo _('Clear') ?>">
69 <div
class="left" style
="width: 40%">
70 <?php
echo _('Available <span class="object-list-type">hostgroups</span>') ?
><br
/>
71 <select id
="objects_tmp" multiple
="multiple" size
='8' style
="width: 100%;" class="multiple">
74 <div
class="left" style
="padding-top: 16px;">
75 <input type
="button" value
=">" id
="mv_hg_r" class="button arrow-right" /><br
/>
76 <input type
="button" value
="<" id
="mv_hg_l" class="button arrow-left" />
78 <div
class="left" style
="width: 40%">
79 <?php
echo _('Selected <span class="object-list-type">hostgroups</span>') ?
><br
/>
80 <select name
="objects[]" id
="objects" multiple
="multiple" size
="8" style
="width: 100%;" class="multiple">
83 <div
class="clear"></div
>
89 <div
class="report-block">
90 <h2
><?php
echo _('Report Settings'); ?
></h2
>
92 <table
class="setup-tbl">
95 <?php
echo _('Comment') . " *" ?
><br
/>
96 <textarea cols
="40" rows
="4" name
="comment" width
="100%"><?php
echo $schedule_info->get_comment() ?
></textarea
>
100 <td style
="vertical-align: top;">
101 <input type
="checkbox" name
="fixed" id
="fixed" value
="1"<?php
if ($schedule_info->get_fixed()) { ?
> checked
=checked
<?php
} ?
>> <?php
echo _('Fixed') ?
>
103 <td id
="triggered_row" style
="display:none">
104 <?php
echo _('Duration') . " *" ?
> (hh
:mm
or hh
:mm
:ss
)<br
/>
105 <input
class="time-entry" type
='text' id
="duration" name
='duration' value
='<?php echo $schedule_info->get_duration_string() ?>'>
112 <?php
echo _('Start Time') . " *" ?
> (hh
:mm
or hh
:mm
:ss
)<br
/>
113 <input
class="time-entry" type
='text' name
='start_time' id
="start_time_input" value
='<?php echo $schedule_info->get_start_time_string() ?>'>
116 <?php
echo _('End Time') . " *" ?
> (hh
:mm
or hh
:mm
:ss
)<br
/>
117 <input
class="time-entry" type
='text' name
='end_time' id
="end_time_input" value
='<?php echo $schedule_info->get_end_time_string() ?>'>
123 <?php
echo _('Days of week') . " *" ?
> <button type
="button" id
="select-all-days" value
="">Select all
</button
> <button type
="button" id
="deselect-all-days">Deselect all
</button
><br
/>
124 <table style
="margin-top: 5px;width: 560px; border-collapse: collapse; border-spacing: 0px">
126 <?php
foreach ($day_index as $i) {
128 if (in_array($i, $schedule_info->get_weekdays())) {
129 $checked = 'checked=checked';
132 <td style
="width: 80px"><input type
="checkbox" <?php
echo $checked ?
> name
="weekdays[]" class="recurring_day" value
="<?php echo $i ?>" id
="<?php echo $day_names[$i];?>"> <label
for="<?php echo $day_names[$i];?>"><?php
echo $day_names[$i] ?
></label
></td
>
141 <?php
echo _('Months') . " *" ?
> <button type
="button" id
="select-all-months">Select all
</button
> <button type
="button" id
="deselect-all-months">Deselect all
</button
><br
/>
142 <table style
="margin-top: 5px; width: 480px; border-collapse: collapse; border-spacing: 0px">
145 foreach($month_names as $month) {
148 if (in_array($i, $schedule_info->get_months())) {
149 $checked = 'checked=checked';
151 <td style
="width: 80px"><input type
="checkbox" <?php
echo $checked ?
> name
="months[]" class="recurring_month" value
="<?php echo $i ?>" id
="<?php echo $month; ?>"> <label
for="<?php echo $month; ?>"><?php
echo $month ?
></label
></td
>
164 <div
class="setup-table">
165 <input id
="reports_submit_button" type
="submit" name
="" value
="<?php echo $schedule_id ? _('Update schedule') : _('Add Schedule') ?>" class="button create-report" />