From f062193076b5caaceebd9f1dae62c01234c3f3b1 Mon Sep 17 00:00:00 2001
From: Matthew Somerville
[% IF example_pc %]
[% tprintf( loc('Example postcode %s'), example_pc ) | html %] |
@@ -61,18 +63,18 @@
test2 note' );
$mech->content_contains( ' Public' );
+ $mech->get_ok('/admin/body_edit/2650/test%20category');
$mech->submit_form_ok( { with_fields => {
email => 'test2@example.com',
note => 'test2 note',
diff --git a/templates/web/base/admin/body.html b/templates/web/base/admin/body.html
index b207d18ca..bc815ae62 100644
--- a/templates/web/base/admin/body.html
+++ b/templates/web/base/admin/body.html
@@ -6,6 +6,8 @@
[% END %]
+[% IF NOT errors %]
+
[% loc('When edited') %]
[% loc('Confirm') %]
- [% WHILE ( contact = contacts.next ) %]
-
- [% contact.category %]
- [% contact.email | html %]
- [% IF contact.confirmed %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]
- [% IF contact.deleted %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]
- [% IF body.can_be_devolved && contact.send_method %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]
- [% contact.editor %]
- [% contact.note | html %]
- [% contact.non_public ? loc('Non Public') : loc('Public') %]
- [% contact.whenedited.ymd _ ' ' _ contact.whenedited.hms %]
-
+ [% WHILE ( cat = contacts.next ) %]
+
+
[% END %]
@@ -84,14 +86,25 @@
[% cat.category %]
+ [% cat.email | html %]
+ [% IF cat.confirmed %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]
+ [% IF cat.deleted %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]
+ [% IF body.can_be_devolved && cat.send_method %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]
+ [% cat.editor %]
+ [% cat.note | html %]
+ [% cat.non_public ? loc('Non Public') : loc('Public') %]
+ [% cat.whenedited.ymd _ ' ' _ cat.whenedited.hms %]
+
+
[% loc("Each contact for the body has a category, which is displayed to the public. Different categories can have the same contact (email address). This means you can add many categories even if you only have one contact for the body. ") %] -
+ + +[% END %][%# Only show all the above if no errors with below form %] + +- [% loc('Category:') %] + [% loc('Category:') %]
[% END %] @@ -123,7 +136,7 @@- [% loc('Email address:') %] + [% loc('Email address:') %]
- +
@@ -144,7 +157,7 @@- +
@@ -169,14 +182,14 @@- +
- +
[% loc('Note:') %] +
[% loc('Note:') %] [% IF body.can_be_devolved %]