summaryrefslogtreecommitdiff
path: root/tpls/jobedit.tpl
blob: 5896db9415ddd77ffc67bdfdc2b5ff54a8275f76 (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
{{define "title"}}{{if .JobID}}Edit Job{{else}}Create Job{{end}}{{end}}

{{define "content"}}
	{{if .Error}}
		<div class="error">{{.Error}}</div>
	{{end}}
	
	{{if not .Fatal}}
		{{if .Success}}
			<div class="success">{{.Success}}</div>
		{{end}}
		
		<form action="/jobedit{{if .JobID}}/{{.JobID}}{{end}}" method="post" accept-charset="UTF-8">
			<h2>Mail</h2>
			<p>
				<strong>Subject:</strong><br />
				<input type="text" name="Subject" value="{{.Subject}}" />
			</p>
			<p>
				<strong>Content:</strong><br />
				<textarea name="Content" cols="80" rows="20">{{.Content}}</textarea>
			</p>
			
			<h2>Schedule</h2>
			{{range .Schedules}}
				<p>
					<strong>Start:</strong>
						<input type="text" name="Start" value="{{.Start}}" /><br />
					<select name="RepetitionEnabled" size="0">
						<option value="no"{{if not .RepetitionEnabled}} selected="selected"{{end}}>Off</option>
						<option value="yes"{{if .RepetitionEnabled}} selected="selected"{{end}}>On</option>
					</select>
					<strong>Repetition:</strong>
						<input type="text" name="Count" value="{{.Count}}" />
						<select name="Unit" size="0">
							<option value="Minute"{{if .UnitIsMinute}} selected="selected"{{end}}>Minute(s)</option>
							<option value="Hour"{{if .UnitIsHour}} selected="selected"{{end}}>Hour(s)</option>
							<option value="Day"{{if .UnitIsDay}} selected="selected"{{end}}>Day(s)</option>
							<option value="Week"{{if .UnitIsWeek}} selected="selected"{{end}}>Week(s)</option>
							<option value="Month"{{if .UnitIsMonth}} selected="selected"{{end}}>Month(s)</option>
							<option value="Year"{{if .UnitIsYear}} selected="selected"{{end}}>Year(s)</option>
						</select>
						<br />
					<select name="EndEnabled" size="0">
						<option value="no"{{if not .EndEnabled}} selected="selected"{{end}}>Off</option>
						<option value="yes"{{if .EndEnabled}} selected="selected"{{end}}>On</option>
					</select>
					<strong>End:</strong>
						<input type="text" name="End" value="{{.End}}" />
				</p>
			{{end}}
			
			<h2>Save</h2>
			<input type="submit" />
		</form>
	{{end}}
{{end}}