@@ -0,0 +1,2 @@
|
||||
{{define "title"}}{{if .LocationID}}Zuordnung bearbeiten{{else}}Ort zuordnen{{end}}{{end}}
|
||||
{{define "main"}}{{$editable := canGarden .Garden "content:write"}}<section class='panel narrow'><h2>{{(index .Plants 0).Name}}: Ort {{if .LocationID}}bearbeiten{{else}}zuordnen{{end}}</h2>{{$form:=.Form}}<form method='POST'><input type='hidden' name='csrf_token' value='{{.CSRFToken}}'><label for='location_id'>Ort</label><select id='location_id' name='location_id' required><option value='0'>Bitte wählen</option>{{range .Locations}}<option value='{{.ID}}' {{if eqInt $form.LocationID .ID}}selected{{end}}>{{.Name}}</option>{{end}}</select>{{with index $form.Errors "location_id"}}<p class='field-error'>{{.}}</p>{{end}}<label for='quantity'>Anzahl</label><input id='quantity' type='number' min='1' name='quantity' value='{{$form.Quantity}}' required><label for='planted_at'>Gepflanzt am</label><input id='planted_at' type='date' name='planted_at' value='{{$form.PlantedAt}}'><label for='notes'>Notizen</label><textarea id='notes' name='notes'>{{$form.Notes}}</textarea><div class='actions'>{{if $editable}}<button>Speichern</button>{{end}}<a href='{{webPath "plants" .Garden.ID}}'>{{if $editable}}Abbrechen{{else}}Zurück{{end}}</a></div></form></section>{{end}}
|
||||
Reference in New Issue
Block a user