diff options
Diffstat (limited to 'tpls')
-rw-r--r-- | tpls/jobedit.tpl | 51 | ||||
-rw-r--r-- | tpls/jobs.tpl | 2 |
2 files changed, 52 insertions, 1 deletions
diff --git a/tpls/jobedit.tpl b/tpls/jobedit.tpl new file mode 100644 index 0000000..ef1d394 --- /dev/null +++ b/tpls/jobedit.tpl @@ -0,0 +1,51 @@ +{{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 /> + <input type="checkbox" name="RepetitionEnabled"{{if .RepetitionEnabled}} checked="checked"{{end}} /> + <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 /> + <input type="checkbox" name="EndEnabled"{{if .EndEnabled}} checked="checked"{{end}} /> + <strong>End:</strong> + <input type="text" name="End" value="{{.End}}" /> + </p> + {{end}} + + <h2>Save</h2> + <input type="submit" /> + </form> + {{end}} +{{end}}
\ No newline at end of file diff --git a/tpls/jobs.tpl b/tpls/jobs.tpl index 578791e..9408e48 100644 --- a/tpls/jobs.tpl +++ b/tpls/jobs.tpl @@ -23,7 +23,7 @@ <tbody> {{range .Jobs}}<tr> <td><input type="checkbox" name="Jobs" value="{{.ID}}" /></td> - <td><a href="/edit/{{.ID}}">{{.Subject}}</a></td> + <td><a href="/jobedit/{{.ID}}">{{.Subject}}</a></td> <td>{{.Excerpt}}</td> <td>{{.Next}}</td> </tr>{{end}} |