oef/templates/questions_add_update.html.tpl
2019-11-04 15:00:46 +01:00

57 lines
1.8 KiB
Smarty

{{ define "content" }}
<div class="container">
<nav aria-label="breadcrumb">
{{if .Options.Get "update"}}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/Questions?{{query "tpl_layout" "base" "tpl_content" "Questions"}}">Question</a></li>
<li class="breadcrumb-item active"><a href="#">Aggiorna Question</a></li>
</ol>
</nav>
{{else}}
<ol class="breadcrumb">
<li><a href="/Questions?{{query "tpl_layout" "base" "tpl_content" "Questions"}}">Question</a></li>
<li class="active"><a href="#">Aggiungi</a></li>
</ol>
{{end}}
{{if .Options.Get "update"}}
<div class="karmen-info-header">
<div class="row">
<div class="col-md-8">
<h1>Aggiorna Question</h1>
</div>
</div>
</div>
{{else}}
<h1 class="karmen-info-header">Crea nuovo Question</h1>
{{end}}
{{if .Options.Get "update"}}
<form id="form_Questions_add_update" action="/Questions/{{.Data.ID}}/update" method="POST" role="form" data-toggle="validator">
{{else}}
<form id="form_Questions_add_update" action="/Questions/add/" method="POST" role="form" data-toggle="validator">
{{end}}
<div class="form-group has-feedback">
<label class="control-label" for="Question_name">Nome</label>
<input type="text" name="Name" class="form-control" id="Question_name" placeholder="Nome" {{if .Options.Get "update"}} value="{{.Data.Name}}" {{end}} required>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Salva</button>
{{if .Options.Get "update"}}
<a href="/Questions/{{.Data.ID}}?{{query "tpl_layout" "base" "tpl_content" "Questions_show"}}" class="btn btn-default">Annulla</a>
{{else}}
<a href="/Questions?{{query "tpl_layout" "base" "tpl_content" "Questions"}}" class="btn btn-default">Annulla</a>
{{end}}
</div>
</form>
</div>
{{ end }}