summaryrefslogtreecommitdiffstats
path: root/ogcp
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp')
-rw-r--r--ogcp/templates/actions/client_details.html67
1 files changed, 11 insertions, 56 deletions
diff --git a/ogcp/templates/actions/client_details.html b/ogcp/templates/actions/client_details.html
index 070e4d6..a718450 100644
--- a/ogcp/templates/actions/client_details.html
+++ b/ogcp/templates/actions/client_details.html
@@ -13,68 +13,23 @@
<h2 class="mx-5 subhead-heading">{{_('Client details')}}</h2>
-<div class="container mt-5">
- <form method="POST">
+<div class="container mx-5">
+ <form class="form" method="POST">
{{ form.hidden_tag() }}
{{ form.server() }}
{{ form.folder_id() }}
- <div class="form-group row">
- <label for="name" class="col-sm-2 col-form-label">{{ form.name.label }}</label>
- <div class="col-sm-9">
- {{ form.name(class="form-control") }}
+ {% for field in form if field.type != 'CSRFToken' and field.name not in ['submit', 'remote', 'maintenance'] %}
+ {% if not field.flags.hidden %}
+ <div class="form-group row">
+ <label for="{{ field.id }}" class="col-sm-2 col-form-label">{{ field.label.text }}</label>
+ <div class="col-sm-9">
+ {{ field(class="form-control") }}
+ </div>
</div>
- </div>
-
- <div class="form-group row">
- <label for="ip" class="col-sm-2 col-form-label">{{ form.ip.label }}</label>
- <div class="col-sm-9">
- {{ form.ip(class="form-control") }}
- </div>
- </div>
-
- <div class="form-group row">
- <label for="mac" class="col-sm-2 col-form-label">{{ form.mac.label }}</label>
- <div class="col-sm-9">
- {{ form.mac(class="form-control") }}
- </div>
- </div>
-
- <div class="form-group row">
- <label for="serial_number" class="col-sm-2 col-form-label">{{ form.serial_number.label }}</label>
- <div class="col-sm-9">
- {{ form.serial_number(class="form-control") }}
- </div>
- </div>
-
- <div class="form-group row">
- <label for="livedir" class="col-sm-2 col-form-label">{{ form.livedir.label }}</label>
- <div class="col-sm-9">
- {{ form.livedir(class="form-control") }}
- </div>
- </div>
-
- <div class="form-group row">
- <label for="repo" class="col-sm-2 col-form-label">{{ form.repo.label }}</label>
- <div class="col-sm-9">
- {{ form.repo(class="form-control") }}
- </div>
- </div>
-
- <div class="form-group row">
- <label for="room" class="col-sm-2 col-form-label">{{ form.room.label }}</label>
- <div class="col-sm-9">
- {{ form.room(class="form-control") }}
- </div>
- </div>
-
- <div class="form-group row">
- <label for="boot" class="col-sm-2 col-form-label">{{ form.boot.label }}</label>
- <div class="col-sm-9">
- {{ form.boot(class="form-control") }}
- </div>
- </div>
+ {% endif %}
+ {% endfor %}
<div class="form-group">
{{ form.submit(class="btn btn-primary") }}