73 lines
No EOL
2.1 KiB
Text
73 lines
No EOL
2.1 KiB
Text
extends layout
|
|
block content
|
|
- void showerror(string field = null)
|
|
- if (_error.msg && _error.field == field)
|
|
td.error= _error.msg
|
|
form(action="/createevent", method="post")
|
|
fieldset(name="eventFields")
|
|
table
|
|
tbody#fieldTable
|
|
tr
|
|
td
|
|
label(for="name") Ereignisname
|
|
td
|
|
input#name(value="", name="name", type="text")
|
|
- showerror("name");
|
|
tr
|
|
td
|
|
label(for="description") Beschreibung
|
|
td
|
|
textarea#description(value="", name="description", cols="40", rows="5")
|
|
- showerror("description");
|
|
tr
|
|
td
|
|
label(for="multiday") Mehrtägig
|
|
td
|
|
input#multiday(name="multiday", type="checkbox")
|
|
tr
|
|
td
|
|
label#beginLabel(for="begin") Datum
|
|
td
|
|
input#begin(value="", name="begin", type="date")
|
|
- showerror("begin");
|
|
- showerror("end");
|
|
tr
|
|
td
|
|
label(for="type") Typ
|
|
td
|
|
select#type(name="type")
|
|
option(value="Holiday") Feiertag
|
|
option(value="Birthday") Geburtstag
|
|
option(value="FSI_Event") FSI Ereignis
|
|
option(value="General_University_Event") Allgemeines Universitäts Ereignis
|
|
option(value="Any") Sonstiges
|
|
- showerror("type");
|
|
tr
|
|
td
|
|
label(for="shout") Shout
|
|
td
|
|
input#shout(name="shout", type="checkbox")
|
|
- showerror("shout");
|
|
|
|
tfoot
|
|
tr
|
|
td(colspan="2")
|
|
input#submitButton(type="submit", value="Ereignis erstellen")
|
|
- if (_error.msg && _error.field == "")
|
|
p.error= _error.msg
|
|
script(type="text/javascript").
|
|
document.getElementById('multiday').onclick = function() {
|
|
var table = document.getElementById("fieldTable");
|
|
var beginLabel = document.getElementById("beginLabel");
|
|
if ( this.checked ) {
|
|
var row = table.insertRow(4);
|
|
var cell1 = row.insertCell(0);
|
|
var cell2 = row.insertCell(1);
|
|
cell1.innerHTML = "<label for='end'>Bis</label>";
|
|
cell2.innerHTML = "<input id='end' value='' name='end' type='date'>";
|
|
beginLabel.innerHTML = "Von";
|
|
} else {
|
|
table.deleteRow(4);
|
|
beginLabel.innerHTML = "Datum";
|
|
}
|
|
}; |