From 2db2cc6659e1e78cd0cfdb0849f1bf07a4ce49cf Mon Sep 17 00:00:00 2001 From: FreneticScribbler Date: Wed, 7 Oct 2020 17:05:51 +0100 Subject: [PATCH] Template improvements --- RIGS/templates/event_detail.html | 12 +-- RIGS/templates/partials/auth_details.html | 8 +- users/templates/profile_form.html | 93 +++++++++-------------- 3 files changed, 47 insertions(+), 66 deletions(-) diff --git a/RIGS/templates/event_detail.html b/RIGS/templates/event_detail.html index d9536ede..1eb13133 100644 --- a/RIGS/templates/event_detail.html +++ b/RIGS/templates/event_detail.html @@ -20,7 +20,7 @@ {% endif %} {% if object.is_rig and perms.RIGS.view_event %} {# only need contact details for a rig #} -
+
{% if event.person %}
Contact Details
@@ -67,18 +67,18 @@ {% endif %}
{% endif %} -
+
{% include 'partials/event_details.html' %}
{% if event.is_rig and not event.dry_hire %} -
+
{% include 'partials/hs_details.html' %} -
+
{% endif %} {% if event.is_rig and event.internal and perms.RIGS.view_event %} -
+
{% include 'partials/auth_details.html' %} -
+
{% endif %} {% if not request.is_ajax and perms.RIGS.view_event %}
diff --git a/RIGS/templates/partials/auth_details.html b/RIGS/templates/partials/auth_details.html index fbc07d11..b788ba48 100644 --- a/RIGS/templates/partials/auth_details.html +++ b/RIGS/templates/partials/auth_details.html @@ -8,8 +8,8 @@ {% endif %} ">
Client Authorisation
-
-
+
+
Authorisation Request
{{ object.auth_request_to|yesno:"Yes,No" }}
@@ -22,8 +22,8 @@
To
{{ object.auth_request_to }}
-
 
-
+
 
+
Authorised
{{ object.authorised|yesno:"Yes,No" }}
diff --git a/users/templates/profile_form.html b/users/templates/profile_form.html index b8426875..e92aa573 100644 --- a/users/templates/profile_form.html +++ b/users/templates/profile_form.html @@ -5,67 +5,48 @@ {% block content %}
-
+
{% include 'form_errors.html' %} -

Update Profile

-
-
{% csrf_token %} -
- +

Update Profile {{object.name}}

+
+
+ {% csrf_token %} +
+ {% include 'partials/form_field.html' with field=form.first_name %} +
+
+ {% include 'partials/form_field.html' with field=form.last_name %} +
-
- {% render_field form.first_name class+="form-control" placeholder=form.first_name.label %} -
-
+
+ + {% render_field form.email type="email" class+="form-control" placeholder=form.email.label %} +
-
- +
+ {% include 'partials/form_field.html' with field=form.initials %} +
-
- {% render_field form.last_name class+="form-control" placeholder=form.last_name.label %} -
-
+
+ + {% render_field form.phone type="tel" class+="form-control" placeholder=form.phone.label %} +
-
- +
+ +
+ +
-
- {% render_field form.email type="email" class+="form-control" placeholder=form.email.label %} -
-
- -
- - -
- {% render_field form.initials class+="form-control" placeholder=form.initials.label %} -
-
- -
- - -
- {% render_field form.phone type="tel" class+="form-control" placeholder=form.phone.label %} -
-
- -
- -
- -
- - + +
-{% endblock %} \ No newline at end of file +{% endblock %}