From d2b298ffbd8d74f3998d58d3d2c9ca679594b850 Mon Sep 17 00:00:00 2001 From: tomtom5152 Date: Wed, 5 Nov 2014 15:57:34 +0000 Subject: [PATCH] Updated organisation templates. Render improvements to forms Fixed organisation url --- RIGS/templates/RIGS/organisation_detail.html | 2 +- RIGS/templates/RIGS/organisation_form.html | 103 ++++++++++++------- RIGS/templates/RIGS/organisation_list.html | 5 +- RIGS/templates/RIGS/person_form.html | 93 ++++++++++------- RIGS/urls.py | 2 +- db.sqlite3 | Bin 855040 -> 875520 bytes 6 files changed, 122 insertions(+), 83 deletions(-) diff --git a/RIGS/templates/RIGS/organisation_detail.html b/RIGS/templates/RIGS/organisation_detail.html index c5d54ad0..952664d2 100644 --- a/RIGS/templates/RIGS/organisation_detail.html +++ b/RIGS/templates/RIGS/organisation_detail.html @@ -31,7 +31,7 @@
{{ object.notes|linebreaksbr }}
Union Account
-
{{ object.unionAccount|yesno }}
+
{{ object.union_account|yesno|capfirst }}
diff --git a/RIGS/templates/RIGS/organisation_form.html b/RIGS/templates/RIGS/organisation_form.html index f1161571..3ac87195 100644 --- a/RIGS/templates/RIGS/organisation_form.html +++ b/RIGS/templates/RIGS/organisation_form.html @@ -5,49 +5,74 @@ {% block content %}
-

Add Person

-
-
{% csrf_token %} - {% include 'form_errors.html' %} -
- -
- {% render_field form.name class+="form-control" placeholder=form.name.label %} +

{{ object.pk|yesno:"Edit,Add" }} Organisation

+ + {% csrf_token %} +
+
+ {% include 'form_errors.html' %} +
+ + +
+ {% render_field form.name class+="form-control" placeholder=form.name.label %} +
+
+ +
+ + +
+ {% render_field form.phone class+="form-control" type="tel" placeholder=form.phone.label %} +
+
+ + +
+ + +
+ {% render_field form.email class+="form-control" type="email" placeholder=form.email.label %} +
+
+ +
+ + +
+ {% render_field form.address class+="form-control" placeholder=form.address.label %} +
-
- -
- {% render_field form.phone class+="form-control" type="tel" placeholder=form.phone.label %} +
+
+ + +
+ {% render_field form.notes class+="form-control" placeholder=form.notes.label %} +
+
+ +
+
+
+ +
+
- -
- -
- {% render_field form.email class+="form-control" type="email" placeholder=form.email.label %} -
-
- -
- -
- {% render_field form.address class+="form-control" placeholder=form.address.label %} -
-
- -
- -
- {% render_field form.notes class+="form-control" placeholder=form.notes.label %} -
-
- -
- -
- -
+
+
+ +
+
{% endblock %} \ No newline at end of file diff --git a/RIGS/templates/RIGS/organisation_list.html b/RIGS/templates/RIGS/organisation_list.html index ca0c26c1..cddd4580 100644 --- a/RIGS/templates/RIGS/organisation_list.html +++ b/RIGS/templates/RIGS/organisation_list.html @@ -35,7 +35,6 @@ Email Phone Notes - l Union Account @@ -48,7 +47,7 @@ {{ object.email }} {{ object.phone }} {{ object.notes|yesno|capfirst }} - {{ object.unionAccount|yesno|capfirst }} + {{ object.union_account|yesno|capfirst }} @@ -60,7 +59,7 @@ {% empty %} - No people stored + No organisations found {% endfor %} diff --git a/RIGS/templates/RIGS/person_form.html b/RIGS/templates/RIGS/person_form.html index f1161571..ae980d3f 100644 --- a/RIGS/templates/RIGS/person_form.html +++ b/RIGS/templates/RIGS/person_form.html @@ -5,49 +5,64 @@ {% block content %}
-

Add Person

-
-
{% csrf_token %} - {% include 'form_errors.html' %} -
- -
- {% render_field form.name class+="form-control" placeholder=form.name.label %} +

{{ object.pk|yesno:"Edit,Add" }} Person

+ + {% csrf_token %} +
+
+ {% include 'form_errors.html' %} +
+ + +
+ {% render_field form.name class+="form-control" placeholder=form.name.label %} +
+
+ +
+ + +
+ {% render_field form.phone class+="form-control" type="tel" placeholder=form.phone.label %} +
+
+ + +
+ + +
+ {% render_field form.email class+="form-control" type="email" placeholder=form.email.label %} +
+
+ +
+ + +
+ {% render_field form.address class+="form-control" placeholder=form.address.label %} +
-
- -
- {% render_field form.phone class+="form-control" type="tel" placeholder=form.phone.label %} +
+
+ + +
+ {% render_field form.notes class+="form-control" placeholder=form.notes.label %} +
- -
- -
- {% render_field form.email class+="form-control" type="email" placeholder=form.email.label %} -
-
- -
- -
- {% render_field form.address class+="form-control" placeholder=form.address.label %} -
-
- -
- -
- {% render_field form.notes class+="form-control" placeholder=form.notes.label %} -
-
- -
- -
- -
+
+
+ +
+
{% endblock %} \ No newline at end of file diff --git a/RIGS/urls.py b/RIGS/urls.py index 0350888e..eecc025d 100644 --- a/RIGS/urls.py +++ b/RIGS/urls.py @@ -35,7 +35,7 @@ urlpatterns = patterns('', url(r'^organisations/(?P\d+)/$', permission_required_with_403('RIGS.view_organisation')(views.OrganisationDetail.as_view()), name='organisation_detail'), - url(r'^organisation/(?P\d+)/edit/$', + url(r'^organisations/(?P\d+)/edit/$', permission_required_with_403('RIGS.change_organisation')(views.OrganisationUpdate.as_view()), name='organisation_update'), ) diff --git a/db.sqlite3 b/db.sqlite3 index 9818e75fad4b581d2e847a03f07ee647bf965fdf..ea2de57c8a12602c7e6d85de4230803ffac57f05 100644 GIT binary patch delta 4348 zcmZ8l33wFc8UBxi%kFazX^EkQ+!s$a1L&44cVjV2`+m7-I_)m3mc4 zV*R}y#RHG_X+cqfHG$Nt)u*kRSdVHgy=+lyIc!TY+I};ef#5vP_wVk1efRr)v%BxD z-hHHIuPgO9LUaQ{BpD%;2~;yUzjBu2I4b>Q)-zrEsDt505d8(chbpv+d_#UoZYQgW z1OFcL)X(Gh4okgXE?vyxQRb56ohzE%<>loIx5&{*a7$%*MRi3*dCiuJnwl#8M`=Yx zX?cxQQM0(FYH>wXSe}i{%;57)Sns=%M)0 zKae1F!nyv9(+o1e zJS{*`pl5)_fPMiq0rWedzXF{E`U>cOU`_^<2IK^q4O9YD4pa-Y421Y6uzHFPmB)?5 zEfuEza4};^Ja>Sn&8KCDq}~Z?$nuW(&70OZxg&HoZ2FiE=~Lsz)aUVc!PGUesn6LIyKqjI zYl_X3OLy6P>p9!Sds?g@K;?C~7cSZxGk6b7UD%{^yTv*+<5)x(5gxamoiU>`8^7q( zUSM|IdJc4Zh0KGif2&{pd|cubv&Mrb(&)V~(hb~tBw-Hl+D>=T^*6d;YTb<%7}pM5 z52Jg)3uEW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