From d9ec686462f6232480300324e81413602dc872af Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 14 Nov 2014 10:45:00 +0000 Subject: [Zurich] Show "new category" errors in admin. Error handling and changes to the base template were added in f0621930, so an error would cause the form to reshow in the cobrand, but not display the errors. --- templates/web/zurich/admin/body.html | 38 ++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/templates/web/zurich/admin/body.html b/templates/web/zurich/admin/body.html index 764ad9bd8..4cedc9838 100644 --- a/templates/web/zurich/admin/body.html +++ b/templates/web/zurich/admin/body.html @@ -2,12 +2,13 @@ [% PROCESS 'admin/report_blocks.html' %] [% IF updated %] -

-[% updated %] -

+

+ [% updated %] +

[% END %] [% IF admin_type == 'super' AND body.parent AND NOT body.parent.parent # A division %] + [% IF NOT errors %] @@ -16,29 +17,34 @@ - [% WHILE ( contact = contacts.next ) %] - - - - - - + [% WHILE ( cat = contacts.next ) %] + + + + + + [% END %]
[% loc('Category') %][% loc('Note') %] [% loc('When edited') %]
[% contact.category %][% contact.email | html %][% contact.editor %][% contact.note | html %][% PROCESS format_date this_date=contact.whenedited %][% cat.category %][% cat.email | html %][% cat.editor %][% cat.note | html %][% PROCESS format_date this_date=cat.whenedited %]

[% loc('Add new category') %]

+ [% END %][%# Only show all the above if no errors with below form %] + + [% IF errors %] +
+ [% errors.values.join('
') %] +
+ [% END %]
- [% IF c.cobrand.moniker != 'emptyhomes' %]

- [% loc('Category:') %] + [% loc('Category:') %]

- [% END %]

- [% loc('Email:') %] + [% loc('Email:') %]

@@ -50,7 +56,7 @@

- +

@@ -61,7 +67,9 @@ [% END %] +[% IF NOT errors %]

[% loc('Edit body details') %]

[% INCLUDE 'admin/body-form.html' %] +[% END %] [% INCLUDE 'admin/footer.html' %] -- cgit v1.2.3