{{ define "content" }}
{{$update := .Options.Get "update"}} {{if $update}} {{template "breadcrumb" toSlice "Docenti" (all "Teacher") (.Data|string) (.Data.ID|show "Teacher") "Aggiorna" "current"}} {{else}} {{template "breadcrumb" toSlice "Docenti" (all "Teacher") "Aggiungi" "current"}} {{end}} {{template "add_update_header" dict "update" $update "addTitle" "Crea nuovo docente" "updateTitle" (printf "Aggiorna docente %s" (.Data|string))}} {{if $update}}
{{else}} {{end}} {{$options := ` { name: "Name",id: "teacher_name",label: "Nome",placeholder: "Nome",type: "text" } `}} {{template "input" dict "options" ($options|yaml) "value" (.Data|field "Name") "update" $update}} {{$options := ` { name: "Surname",id: "teacher_surname",label: "Cognome",placeholder: "Cognome",type: "text" } `}} {{template "input" dict "options" ($options|yaml) "value" (.Data|field "Surname") "update" $update}} {{$options := ` { name: "Hours",id: "teacher_hours",label: "Numero di ore",placeholder: "",type: "number" } `}} {{template "input" dict "options" ($options|yaml) "value" (.Data|field "Hours") "update" $update}} {{$options := ` { name: "AltEmail",id: "teacher_altemail",label: "Email alternativa",placeholder: "Inserire indirizzo email",type: "email" } `}} {{template "input" dict "options" ($options|yaml) "value" (.Data|field "AltEmail") "update" $update}}
{{if .Options.Get "update"}} Annulla {{else}} Annulla {{end}}
{{ end }}