summaryrefslogtreecommitdiff
path: root/template/default/timer_new.html
blob: 37b86b1fb43d60eef0902d2a3e460e003df61980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="scroller">

<head>
	<meta http-equiv="content-type" content="text/html;charset=<?% gettext('ISO-8859-1') %?>" />
	<title>VDRAdmin-AM - <?% IF newtimer %?><?% gettext('Create New Timer') %?><?% ELSE %?><?% gettext('Edit Timer') %?><?% END %?></title>
	<link href="style.css" rel="stylesheet" media="screen" type="text/css" />
	<?% IF usercss %?>
		<link href="user.css" rel="stylesheet" media="screen" type="text/css" />
	<?% END %?>
	<script type="text/javascript" language="JavaScript1.2" src="library.js"></script>
	<script type="text/javascript" language="JavaScript1.2">
	<!--
			var defaultDate = "";

      function cTimer(idx) {
        var Timer = "";
        var dor = document.form.dor.value;
        var StartDay = dor.indexOf('@') > 0 ? dor.substring(dor.indexOf('@')) : "";
        Days = new Array("M", "T", "W", "T", "F", "S", "S");
        for(var i = 0; i <= 6; i++) {
          Status = eval("document.form.D" + i + ".checked");
          if(Status == true) {
            Timer = Timer + Days[i];
          } else {
            Timer = Timer + "-";
          }
        }
				if (Timer == "-------") {
					document.form.dor.value = defaultDate;
					eCheckbox(defaultDate);
				} else {
	        document.form.dor.value = Timer + StartDay;
				}
      }
      
      function eCheckbox(complTimer) {
				defaultDate = complTimer;
        if(complTimer.length == 7 || complTimer.length == 18) {
          for(var i = 0; i <= 6; i++) {
            if(complTimer.substring(i, i + 1) != "-") {
              eval("document.form.D" + i + ".click();");
            }
          }
        }
      }
    //--> 
	</script>
</head>

<body onload='eCheckbox("<?% dor %?>")' id="timer_new">
	<form action="<?% url %?>" method="get" name="form">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" id="heading">
			<tr>
				<td class="col_title">
					<h1><?% IF newtimer %?><?% gettext('Create New Timer') %?><?% ELSE %?><?% gettext('Edit Timer') %?><?% END %?></h1>
				</td>
<?% IF help_url %?>
				<td class="col_help">
					<a href="javascript:open_help('<?% help_url %?>');"><img src="bilder/help.png" border="0" alt="help" title="<?% gettext('Help') %?>" /></a>
				</td>
<?% END %?>
			</tr>
		</table>

		<table width="100%" border="0" cellspacing="0" cellpadding="0" id="content" class="group">
			<?% tr_class = "row_odd" %?>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td class="col_label"><h5><?% gettext('Timer Active:') %?></h5></td>
				<td class="col_value">
					<input type="radio" name="active" value="1" id="active_yes" <?% IF active %?>checked="checked"<?% END %?> /><label for="active_yes"><?% gettext('Yes') %?></label>
					<input type="radio" name="active" value="0" id="active_no" <?% UNLESS active %?>checked="checked"<?% END %?> /><label for="active_no"><?% gettext('No') %?></label>
				</td>
			</tr>
<?% UNLESS hide_at_check %?>
	<?% IF features.AUTOTIMER || features.EPGSEARCH %?>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td class="col_label"><h5><?% gettext('AutoTimer Checking:') %?></h5></td>
				<td class="col_value">
					<input type="hidden" name="event_id" value="<?% event_id %?>"/>
					<?% IF at_epg == 1 %?>
						<input type="radio" name="autotimer" value="2" id="event_id" <?% IF autotimer == 2 %?>checked="checked"<?% END %?> /><label for="event_id"><?% gettext('Transmission Identification') %?> (<?% event_id %?>)</label>
					<?% END %?>
					<input type="radio" name="autotimer" value="1" id="event_time" <?% IF autotimer == 1 %?>checked="checked"<?% END %?> /><label for="event_time"><?% gettext('Time') %?></label>
					<input type="radio" name="autotimer" value="0" id="event_off" <?% IF autotimer == 0 %?>checked="checked"<?% END %?> /><label for="event_off"><?% gettext('off') %?></label>
				</td>
			</tr>
	<?% END %?>
<?% END %?>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td class="col_label"><h5><?% gettext('Channel:') %?></h5></td>
				<td class="col_value">
					<select name="channel" class="submit">
<?% FOREACH chan = channels %?>
						<option value="<?% chan.vdr_id %?>" <?% IF chan.current %?>selected="selected"<?% END %?>><?% chan.name | html %?></option>
<?% END %?>
					</select>
				</td>
			</tr>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td valign="top" class="col_label"><h5><?% gettext('Day Of Recording:') %?></h5></td>
				<td class="col_value">
					<input type="text" name="dor" value="<?% dor %?>" size="20" />
					<br />
					<input onclick="cTimer(1)" type="checkbox" name="D0" value="1" id="wday_mon" /><label for="wday_mon"><?% gettext('Monday') %?></label>
					<input onclick="cTimer(2)" type="checkbox" name="D1" value="1" id="wday_tue" /><label for="wday_tue"><?% gettext('Tuesday') %?></label>
					<input onclick="cTimer(3)" type="checkbox" name="D2" value="1" id="wday_wed" /><label for="wday_wed"><?% gettext('Wednesday') %?></label>
					<input onclick="cTimer(4)" type="checkbox" name="D3" value="1" id="wday_thu" /><label for="wday_thu"><?% gettext('Thursday') %?></label>
					<input onclick="cTimer(5)" type="checkbox" name="D4" value="1" id="wday_fri" /><label for="wday_fri"><?% gettext('Friday') %?></label>
					<input onclick="cTimer(6)" type="checkbox" name="D5" value="1" id="wday_sat" /><label for="wday_sat"><?% gettext('Saturday') %?></label>
					<input onclick="cTimer(7)" type="checkbox" name="D6" value="1" id="wday_sun" /><label for="wday_sun"><?% gettext('Sunday') %?></label>
				</td>
			</tr>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td class="col_label"><h5><?% gettext('Start Time:') %?></h5></td>
				<td class="col_value">
					<input type="text" name="starth" value="<?% starth %?>" size="2" maxlength="2" />
					<b>&nbsp;:&nbsp;</b>
					<input type="text" name="startm" value="<?% startm %?>" size="2" maxlength="2" />
					&nbsp;<?% gettext('o\'clock') %?>
					<?% IF bstart %?>
						(<?% gettext('Buffer:') %?>&nbsp;<?% bstart %?>&nbsp;<?% gettext('minutes') %?>)
					<?% END %?>
				</td>
			</tr>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td class="col_label"><h5><?% gettext('End Time:') %?></h5></td>
				<td class="col_value">
					<input type="text" name="stoph" value="<?% stoph %?>" size="2" maxlength="2" />
					<b>&nbsp;:&nbsp;</b>
					<input type="text" name="stopm" value="<?% stopm %?>" size="2" maxlength="2" />
					&nbsp;<?% gettext('o\'clock') %?>
					<?% IF bstop %?>
						(<?% gettext('Buffer:') %?>&nbsp;<?% bstop %?>&nbsp;<?% gettext('minutes') %?>)
					<?% END %?>
				</td>
			</tr>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td class="col_label"><h5><?% gettext('Use VPS:') %?></h5></td>
				<td class="col_value"><input type="checkbox" name="vps" value="1" <?% IF vps %?>checked="checked"<?% END %?> /></td>
			</tr>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td class="col_label"><h5><?% gettext('Priority:') %?></h5></td>
				<td class="col_value"><input type="text" name="prio" value="<?% prio %?>" size="2" maxlength="2" /></td>
			</tr>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td class="col_label"><h5><?% gettext('Lifetime:') %?></h5></td>
				<td class="col_value"><input type="text" name="lft" value="<?% lft %?>" size="2" maxlength="2" /></td>
			</tr>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td class="col_label"><h5><?% gettext('Title of Recording:') %?></h5></td>
				<td class="col_value"><input type="text" name="title" value="<?% title | html %?>" size="80" /></td>
			</tr>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td class="col_label" valign="top"><h5><?% gettext('Summary:') %?></h5><h6>(<?% gettext('readonly') %?>)</h6></td>
				<td class="col_value"><textarea name="summary" rows="6" cols="80" readonly="readonly"><?% summary | html %?></textarea></td>
			</tr>
<?% IF pattern %?>
			<tr class="<?% tr_class %?>">
				<?% tr_class = (tr_class == "row_odd" ? "row_even" : "row_odd") %?>
				<td class="col_label"><h5><?% gettext('Timer has been set by AutoTimer pattern:') %?></h5></td>
				<td class="col_value"><?% pattern %?></td>
			</tr>
<?% END %?>
		</table>

		<div id="buttons">
			<input type="submit" class="submit" name="save" value="<?% gettext('Save') %?>" />
			<input type="submit" class="submit" name="exit" value="<?% gettext('Cancel') %?>" />
		</div>
		<input type="hidden" name="aktion" value="timer_add" /> 
		<?% IF tool %?>
			<input type="hidden" name="tool" value="<?% tool %?>" />
		<?% END %?>
		<?% IF referer %?>
			<input type="hidden" name="referer" value="<?% referer %?>" />
		<?% END %?>
		<?% IF timer_id %?>
			<input type="hidden" name="timer_id" value="<?% timer_id %?>" /> 
		<?% END %?>
	</form>
</body>

</html>