29 lines
938 B
Smarty
29 lines
938 B
Smarty
|
{{ define "content" }}
|
||
|
<div class="container">
|
||
|
|
||
|
{{$update := .Options.Get "update"}}
|
||
|
|
||
|
{{if $update}}
|
||
|
|
||
|
{{template "breadcrumb" toSlice "Participants" (all "Participant") (.Data|string) (.Data.ID|show "Participant") "Aggiorna" "current"}}
|
||
|
{{else}}
|
||
|
{{template "breadcrumb" toSlice "Participants" (all "Participant") "Aggiungi" "current"}}
|
||
|
{{end}}
|
||
|
|
||
|
{{template "add_update_header" dict "update" $update "addTitle" "Crea nuovo ELEMENTO" "updateTitle" (printf "Aggiorna ELEMENTO %s" (.Data|string))}}
|
||
|
{{$form := "form_add_update"}}
|
||
|
<form
|
||
|
class="needs-validation"
|
||
|
action="{{if $update}}{{.Data.ID|update "Participant"}}{{else}}{{create "Participant"}}{{end}}"
|
||
|
method="POST"
|
||
|
role="form"
|
||
|
id={{$form}}>
|
||
|
|
||
|
{{$options := ` { cancelTitle: "Annulla", saveTitle: "Salva", model: "Participant" } `}}
|
||
|
{{template "submit_cancel_buttons" dict "options" ($options|yaml) "id" (.Data|field "ID") "update" $update}}
|
||
|
|
||
|
</form>
|
||
|
|
||
|
</div>
|
||
|
{{ end }}
|