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" 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">
27 <select name
="downtime_type" id
="downtime_type">
28 <option value
="hostgroups" <?php
echo $schedule_info->get_downtime_type() === 'hostgroups' ?
'selected="selected"' : ''; ?
>><?php
echo _('Hostgroups') ?
></option
>
29 <option value
="hosts" <?php
echo $schedule_info->get_downtime_type() === 'hosts' ?
'selected="selected"' : ''; ?
>><?php
echo _('Hosts') ?
></option
>
30 <option value
="servicegroups" <?php
echo $schedule_info->get_downtime_type() === 'servicegroups' ?
'selected="selected"' : ''; ?
>><?php
echo _('Servicegroups') ?
></option
>
31 <option value
="services" <?php
echo $schedule_info->get_downtime_type() === 'services' ?
'selected="selected"' : ''; ?
>><?php
echo _('Services') ?
></option
>
33 <input type
="button" id
="sel_downtime_type" class="button select20" value
="<?php echo _('Select') ?>" />
34 <div id
="progress"></div
>
40 <?php
echo _('Filter:') ?
><br
/>
41 <input type
="text" name
="filter_field" id
="filter_field" autocomplete
=off size
="10" value
="">
42 <input type
="button" name
="clear_filter" id
="clear_filter" value
="<?php echo _('Clear') ?>">
48 <div
class="left" style
="width: 40%">
49 <?php
echo _('Available <span class="object-list-type">hostgroups</span>') ?
><br
/>
50 <select id
="objects_tmp" multiple
="multiple" size
='8' style
="width: 100%;" class="multiple">
53 <div
class="left" style
="padding-top: 16px;">
54 <input type
="button" value
=">" id
="mv_hg_r" class="button arrow-right" /><br
/>
55 <input type
="button" value
="<" id
="mv_hg_l" class="button arrow-left" />
57 <div
class="left" style
="width: 40%">
58 <?php
echo _('Selected <span class="object-list-type">hostgroups</span>') ?
><br
/>
59 <select name
="objects[]" id
="objects" multiple
="multiple" size
="8" style
="width: 100%;" class="multiple">
62 <div
class="clear"></div
>
68 <div
class="report-block">
69 <h2
><?php
echo _('Report Settings'); ?
></h2
>
71 <table
class="setup-tbl">
74 <?php
echo _('Comment') ?
><br
/>
75 <textarea cols
="40" rows
="4" name
="comment" width
="100%"><?php
echo $schedule_info->get_comment() ?
></textarea
>
79 <td style
="vertical-align: top;">
80 <input type
="checkbox" name
="fixed" id
="fixed" value
="1"<?php
if ($schedule_info->get_fixed()) { ?
> checked
=checked
<?php
} ?
>> <?php
echo _('Fixed') ?
>
82 <td id
="triggered_row" style
="display:none">
83 <?php
echo _('Duration') ?
> (hh
:mm
or hh
:mm
:ss
)<br
/>
84 <input
class="time-entry" type
='text' id
="duration" name
='duration' value
='<?php echo $schedule_info->get_duration_string() ?>'>
91 <?php
echo _('Start Time') ?
> (hh
:mm
or hh
:mm
:ss
)<br
/>
92 <input
class="time-entry" type
='text' name
='start_time' id
="start_time_input" value
='<?php echo $schedule_info->get_start_time_string() ?>'>
95 <?php
echo _('End Time') ?
> (hh
:mm
or hh
:mm
:ss
)<br
/>
96 <input
class="time-entry" type
='text' name
='end_time' id
="end_time_input" value
='<?php echo $schedule_info->get_end_time_string() ?>'>
102 <?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
/>
103 <table style
="margin-top: 5px;width: 560px; border-collapse: collapse; border-spacing: 0px">
105 <?php
foreach ($day_index as $i) {
107 if (in_array($i, $schedule_info->get_weekdays())) {
108 $checked = 'checked=checked';
111 <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
>
120 <?php
echo _('Months') ?
> <button type
="button" id
="select-all-months">Select all
</button
> <button type
="button" id
="deselect-all-months">Deselect all
</button
><br
/>
121 <table style
="margin-top: 5px; width: 480px; border-collapse: collapse; border-spacing: 0px">
124 foreach($month_names as $month) {
127 if (in_array($i, $schedule_info->get_months())) {
128 $checked = 'checked=checked';
130 <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
>
143 <div
class="setup-table">
144 <input id
="reports_submit_button" type
="submit" name
="" value
="<?php echo $schedule_id ? _('Update schedule') : _('Add Schedule') ?>" class="button create-report" />