offices_add_update.html.tpl 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {{ define "content" }}
  2. <div class="container">
  3. {{if .Options.Get "update"}}
  4. <nav aria-label="breadcrumb">
  5. <ol class="breadcrumb">
  6. <li class="breadcrumb-item"><a href="/offices?{{query "tpl_layout" "base" "tpl_content" "offices"}}">Segreteria</a></li>
  7. <li class="breadcrumb-item active"><a href="#">Aggiorna la segreteria</a></li>
  8. </ol>
  9. </nav>
  10. {{else}}
  11. <nav aria-label="breadcrumb">
  12. <ol class="breadcrumb">
  13. <li class="breadcrumb-item"><a href="/offices?{{query "tpl_layout" "base" "tpl_content" "offices"}}">Segreteria</a></li>
  14. <li class="breadcrumb-item active"><a href="#">Aggiungi</a></li>
  15. </ol>
  16. </nav>
  17. {{end}}
  18. {{if .Options.Get "update"}}
  19. <div class="karmen-info-header">
  20. <div class="row">
  21. <div class="col-md-8">
  22. <h1>Aggiorna la segreteria</h1>
  23. </div>
  24. </div>
  25. </div>
  26. {{else}}
  27. <h1 class="karmen-info-header">Crea nuova segreteria</h1>
  28. {{end}}
  29. {{if .Options.Get "update"}}
  30. <form id="form_offices_add_update" action="/offices/{{.Data.Office.ID}}/update" method="POST" role="form" class="needs-validation">
  31. {{else}}
  32. <form id="form_offices_add_update" action="/offices/add/" method="POST" role="form" class="needs-validation">
  33. {{end}}
  34. <div class="form-group">
  35. <label class="control-label" for="office_name">Nome</label>
  36. <input type="text" name="Name" class="form-control" id="office_name" placeholder="Nome" {{if .Options.Get "update"}} value="{{.Data.Office.Name}}" {{end}} required>
  37. </div>
  38. <div class="form-group">
  39. <label class="control-label" for="office_name">Email</label>
  40. <input type="text" name="Email" class="form-control" id="office_email" placeholder="Email dell'ufficio" {{if .Options.Get "update"}} value="{{.Data.Office.Email}}" {{end}} required>
  41. </div>
  42. <div class="form-group">
  43. <button type="submit" class="btn btn-primary">Salva</button>
  44. {{if .Options.Get "update"}}
  45. <a href="/offices/{{.Data.Office.ID}}?{{query "tpl_layout" "base" "tpl_content" "offices_show"}}" class="btn btn-default">Annulla</a>
  46. {{else}}
  47. <a href="/offices?{{query "tpl_layout" "base" "tpl_content" "offices"}}" class="btn btn-default">Annulla</a>
  48. {{end}}
  49. </div>
  50. </form>
  51. </div>
  52. {{ end }}