diff options
Diffstat (limited to 'templates/web/default')
-rw-r--r-- | templates/web/default/admin/council_contacts.html | 34 | ||||
-rw-r--r-- | templates/web/default/admin/list_updates.html | 4 | ||||
-rwxr-xr-x | templates/web/default/around/display_location.html | 4 | ||||
-rw-r--r-- | templates/web/default/auth/general.html | 4 | ||||
-rw-r--r-- | templates/web/default/common_header_tags.html | 13 | ||||
-rw-r--r-- | templates/web/default/contact/index.html | 10 | ||||
-rw-r--r-- | templates/web/default/footer.html | 28 | ||||
-rw-r--r-- | templates/web/default/header.html | 7 | ||||
-rw-r--r-- | templates/web/default/js_validation_msgs.html | 20 | ||||
-rw-r--r-- | templates/web/default/report/display.html | 10 | ||||
-rw-r--r-- | templates/web/default/report/new/category_extras.html | 26 | ||||
-rw-r--r-- | templates/web/default/report/new/councils_text_none.html | 6 | ||||
-rw-r--r-- | templates/web/default/report/new/fill_in_details.html | 4 | ||||
-rw-r--r-- | templates/web/default/report/new/fill_in_details_form.html | 22 | ||||
-rw-r--r-- | templates/web/default/report/new/fill_in_details_text.html | 3 | ||||
-rw-r--r-- | templates/web/default/reports/cobrand_stats.html | 0 | ||||
-rwxr-xr-x | templates/web/default/reports/council.html | 2 |
17 files changed, 161 insertions, 36 deletions
diff --git a/templates/web/default/admin/council_contacts.html b/templates/web/default/admin/council_contacts.html index 669f137f9..75d915a29 100644 --- a/templates/web/default/admin/council_contacts.html +++ b/templates/web/default/admin/council_contacts.html @@ -12,6 +12,13 @@ <a href="[% c.uri_for( 'council_contacts', area_id, { text => 1 } ) %]">[% loc('Text only version') %]</a> </p> +[% IF open311.count > 0 %] + <h2> + Council contacts configured via Open311 + </h2> + +[% END %] + <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> <table cellspacing="0" cellpadding="2" border="1"> @@ -86,4 +93,31 @@ </div> </form> + <h2>[% loc('Configure Open311 integration') %]</h2> + <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + [% conf = open311.next %] + <p> + <label for="endpoint">Endpoint</label>: + <input type="text" name="endpoint" id="endpoint" value="[% conf.endpoint %]" size="50"> + </p> + + <p> + <label for="jurisdiction">Jurisdiction</label>: + <input type="text" name="jurisdiction" id="jurisdiction" value="[% conf.jurisdiction %]" size="50"> + </p> + + <p> + <label for="api_key">Api Key</label>: + <input type="text" name="api_key" id="api_key" value="[% conf.api_key %]" size="25"> + </p> + + <p> + <input type="hidden" name="open311_id" value="[% conf.id %]"> + <input type="hidden" name="area_id" value="[% area_id %]"> + <input type="hidden" name="posted" value="open311"> + <input type="hidden" name="token" value="[% token %]"> + <input type="submit" name="Configure Open311" value="[% loc('Configure Open311') %]"> + </p> + </form> + [% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/list_updates.html b/templates/web/default/admin/list_updates.html index 4f27b9595..0a05ba4ac 100644 --- a/templates/web/default/admin/list_updates.html +++ b/templates/web/default/admin/list_updates.html @@ -15,8 +15,8 @@ <th>*</th> </tr> [% FOREACH update IN updates -%] - <tr[% ' class="hidden"' IF update.state == 'hidden' || ( problem.state && problem.state == 'hidden' ) %]> - <td>[%- IF update.state == 'confirmed' -%] + <tr[% ' class="hidden"' IF update.state == 'hidden' || update.problem.state == 'hidden' %]> + <td>[%- IF update.state == 'confirmed' && update.problem.state != 'hidden' -%] [%- cobrand_data = update.cobrand_data %] [%- cobrand_data = c.data_for_generic_update IF !update.cobrand %] <a href="[% c.uri_for_email( '/report', update.problem.id, cobrand_data ) %]#update_[% update.id %]">[% update.id %]</a> diff --git a/templates/web/default/around/display_location.html b/templates/web/default/around/display_location.html index 8d8e1dc3c..3d9c82187 100755 --- a/templates/web/default/around/display_location.html +++ b/templates/web/default/around/display_location.html @@ -35,7 +35,7 @@ robots => 'noindex,nofollow'; %] -<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data"> +<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate"> [% IF c.req.params.map_override %] <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> [% END %] @@ -53,7 +53,7 @@ [% ELSE %] <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a> [% END %] - [% IF c.cobrand.country == 'GB' %] + [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %] | [% IF c.req.params.all_pins %] <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide stale reports') %]</a> diff --git a/templates/web/default/auth/general.html b/templates/web/default/auth/general.html index 6c9d4497a..5407e56e1 100644 --- a/templates/web/default/auth/general.html +++ b/templates/web/default/auth/general.html @@ -2,7 +2,7 @@ <h1>[% loc('Sign in') %]</h1> -<form action="[% c.uri_for() %]" method="post" name="general_auth"> +<form action="[% c.uri_for() %]" method="post" name="general_auth" class="validate"> <input type="hidden" name="r" value="[% c.req.params.r | html %]"> [% IF email_error; @@ -25,7 +25,7 @@ <div class="form-field"> <label class="n" for="email">[% loc('Your email address:') %]</label> - <input type="email" size="30" id="email" name="email" value="[% email | html %]"> + <input type="email" class="required email" size="30" id="email" name="email" value="[% email | html %]"> </div> <div id="form_sign_in"> diff --git a/templates/web/default/common_header_tags.html b/templates/web/default/common_header_tags.html index 44da6aa9b..95b59d9dd 100644 --- a/templates/web/default/common_header_tags.html +++ b/templates/web/default/common_header_tags.html @@ -1,10 +1,21 @@ +[% INCLUDE 'js_validation_msgs.html' %] + <meta http-equiv="content-type" content="text/html; charset=utf-8"> -<script type="text/javascript" src="/jslib/jquery-1.6.2.min.js"></script> +<script type="text/javascript" src="/jslib/jquery-1.7.0.min.js"></script> + +<script src="[% version('/js/jquery.validate.min.js') %]" type="text/javascript" charset="utf-8"></script> + <script type="text/javascript" src="[% version('/js/geo.min.js') %]"></script> <script type="text/javascript" src="[% version('/js/fixmystreet.js') %]"></script> [% map_js %] +[% IF category_extras_json && category_extras_json != '{}' %] +<script type="text/javascript"> + category_extras = [% category_extras_json %]; +</script> +[% END %] + [% IF robots %] <meta name="robots" content="[% robots %]"> [% ELSIF c.config.STAGING_SITE %] diff --git a/templates/web/default/contact/index.html b/templates/web/default/contact/index.html index dc64dd554..2c0c2ff02 100644 --- a/templates/web/default/contact/index.html +++ b/templates/web/default/contact/index.html @@ -5,7 +5,7 @@ <h1>[% loc('Contact the team') %]</h1> -<form method="post" action="/contact/submit"> +<form method="post" action="/contact/submit" class="validate"> [% INCLUDE 'errors.html' %] @@ -66,7 +66,7 @@ [% END %] <div class="form-field"> <label for="form_name">[% loc('Your name:') %]</label> -<input type="text" name="name" id="form_name" value="[% form_name | html %]" size="30"></div> +<input type="text" class="required" name="name" id="form_name" value="[% form_name | html %]" size="30"></div> [% IF field_errors.em %] @@ -74,14 +74,14 @@ [% END %] <div class="form-field"> <label for="form_email">[% loc('Your email:') %]</label> -<input type="text" name="em" id="form_email" value="[% em | html %]" size="30"></div> +<input type="text" class="required email" name="em" id="form_email" value="[% em | html %]" size="30"></div> [% IF field_errors.subject %] <div class="form-error">[% field_errors.subject %]</div> [% END %] <div class="form-field"> <label for="form_subject">[% loc('Subject:') %]</label> -<input type="text" name="subject" id="form_subject" value="[% subject | html %]" size="30"></div> +<input type="text" class="required" name="subject" id="form_subject" value="[% subject | html %]" size="30"></div> [% IF field_errors.message %] <div class="form-error">[% field_errors.message %]</div> @@ -89,7 +89,7 @@ <div class="form-field"> <label for="form_message">[% loc('Message:') %]</label> -<textarea name="message" id="form_message" rows="7" cols="50">[% message | html %]</textarea></div> +<textarea class="required" name="message" id="form_message" rows="7" cols="50">[% message | html %]</textarea></div> <div class="checkbox"><input type="submit" value="[% loc('Post') %]"></div> [% c.cobrand.form_elements('contactForm') %] diff --git a/templates/web/default/footer.html b/templates/web/default/footer.html index b1f22da2c..38e83c1c2 100644 --- a/templates/web/default/footer.html +++ b/templates/web/default/footer.html @@ -10,9 +10,25 @@ <li><a href="/faq">[% loc("Help") %]</a></li> </ul> -[% loc('<a href="http://www.mysociety.org/"><img id="logo" width="133" height="26" src="/i/mysociety-dark.png" alt="View mySociety.org"><span id="logoie"></span></a>') %] +[% IF ! c.cobrand.moniker %] + <!-- winter 2011 promotion for unbranded site only --> + <div id="promo"> + <a href="http://www.mysociety.org/2011/11/02/fix-before-the-freeze/" + title="Fix Before the Freeze - report those dangerous potholes and broken streetlights before winter hits"><img + src="/i/promo-fb4tf.gif" + alt="Fix Before the Freeze - report those dangerous potholes and broken streetlights before winter hits" ></a> + </div> + [% loc('<a href="http://www.mysociety.org/"><img id="logo" width="159" height="39" src="/i/mysociety-on-white.gif" alt="View mySociety.org"><span id="logoie"></span></a>') %] + +[% ELSE %] + + [% loc('<a href="http://www.mysociety.org/"><img id="logo" width="133" height="26" src="/i/mysociety-dark.png" alt="View mySociety.org"><span id="logoie"></span></a>') %] + +[% END %] + +</div> +<div id="footer"> -<div id="footer"> <p>[% loc('Built by <a href="http://www.mysociety.org/">mySociety</a>') %] | <a href="/contact">[% loc("Contact FixMyStreet") | replace(' ', ' ') %]</a></p> @@ -22,13 +38,15 @@ | <a href="https://market.android.com/details?id=com.android.fixmystreet">Android</a> | <a href="http://store.ovi.com/content/107557">Nokia</a> </p> - + <p class="l">[% loc('Are you from a council? Would you like better integration with FixMyStreet?') %] - <a href="http://www.mysociety.org/fixmystreet-for-local-council-websites/">[% loc('Find out about FixMyStreet for councils') %]</a>. - + <a href="http://www.mysociety.org/fixmystreet-for-local-council-websites/">[% loc('Find out about FixMyStreet for councils') %]</a>. + </p> + <p class="r">[% loc('Are you a developer? Would you like to contribute to FixMyStreet?') %] [% loc('Our code is open source and <a href="http://github.com/mysociety/fixmystreet">available on GitHub</a>.') %] </p> + </div> [% INCLUDE 'debug_footer.html' %] diff --git a/templates/web/default/header.html b/templates/web/default/header.html index 1aa8ce159..e3c364363 100644 --- a/templates/web/default/header.html +++ b/templates/web/default/header.html @@ -22,6 +22,7 @@ [% END %] [% INCLUDE 'tracking_code.html' %] + </head> <body> @@ -29,6 +30,7 @@ [%- loc('Fix<span id="my">My</span>Street') %] [%- IF NOT title AND NOT c.req.path %]</h1>[% ELSE %]</a></div>[% END %] + <div [% IF ! c.cobrand.moniker %]class="promo-background"[% END %] > <ul id="meta"> [% IF c.user_exists %] <li>[% tprintf(loc('Signed in as %s'), c.user.name || c.user.email) %] @@ -37,7 +39,10 @@ <li> </li> [% END %] </ul> - <div id="wrapper"><div id="mysociety"> + + [% IF ! c.cobrand.moniker %] + + [% END %] [% INCLUDE 'debug_header.html' %] diff --git a/templates/web/default/js_validation_msgs.html b/templates/web/default/js_validation_msgs.html new file mode 100644 index 000000000..2466ce175 --- /dev/null +++ b/templates/web/default/js_validation_msgs.html @@ -0,0 +1,20 @@ +<script type="text/javascript"> + validation_strings = { + update: '[% loc('Please enter a message') %]', + title: '[% loc('Please enter a subject') %]', + detail: '[% loc('Please enter some details') %]', + name: { + required: '[% loc('Please enter your name') %]', + validName: '[% loc('Please enter your full name, councils need this information - if you do not wish your name to be shown on the site, untick the box') %]', + }, + category: '[% loc('Please choose a category') %]', + rznvy: { + required: '[% loc('Please enter your email') %]', + email: '[% loc('Please enter a valid email') %]', + }, + email: { + required: '[% loc('Please enter your email') %]', + email: '[% loc('Please enter a valid email') %]', + } + }; +</script> diff --git a/templates/web/default/report/display.html b/templates/web/default/report/display.html index aeff140fe..1e320e1b4 100644 --- a/templates/web/default/report/display.html +++ b/templates/web/default/report/display.html @@ -65,7 +65,7 @@ [% INCLUDE 'errors.html' %] - <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" class="fieldset"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> + <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" class="fieldset validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> <input type="hidden" name="submit_update" value="1"> <input type="hidden" name="id" value="[% problem.id | html %]"> @@ -75,7 +75,7 @@ [% END %] <div class="form-field"> <label for="form_update">[% loc( 'Update:' ) %]</label> - <textarea name="update" id="form_update" rows="7" cols="30">[% update.text | html %]</textarea> + <textarea name="update" id="form_update" rows="7" cols="30" required>[% update.text | html %]</textarea> </div> [% IF c.user && c.user.belongs_to_council( problem.council ) %] @@ -132,7 +132,7 @@ [% END %] <div class="form-field"> <label for="form_rznvy">[% loc('Your email:' ) %]</label> - <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" size="30"> + <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" size="30" required> </div> <div id="form_sign_in"> @@ -159,7 +159,7 @@ </p> <p> - <input type="submit" name="submit_sign_in" value="[% loc('Post') %]"> + <input type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]"> </p> </div> @@ -181,7 +181,7 @@ <p style="clear:both"><small>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</small></p> <p> - <input type="submit" name="submit_register" value="[% loc('Post') %]"> + <input type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]"> </p> </div> diff --git a/templates/web/default/report/new/category_extras.html b/templates/web/default/report/new/category_extras.html new file mode 100644 index 000000000..7be69e30c --- /dev/null +++ b/templates/web/default/report/new/category_extras.html @@ -0,0 +1,26 @@ +<div id="category_meta"> + [%- IF report_meta %] + [%- category = report.category %] + <h4>Additional Information</h4> + [%- FOR meta IN category_extras.$category %] + [%- meta_name = meta.code -%] + +[% IF field_errors.$meta_name %] + <div class='form-error'>[% field_errors.$meta_name %]</div> +[% END -%] + + <div class="form-field"> + <label for="form_[% meta_name %]">[% meta.description _ ':' %]</label> + [% IF meta.exists('values') %] + <select name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> + [% FOR option IN meta.values.value.keys %] + <option value="[% meta.values.value.$option.key %]">[% option %]</option> + [% END %] + </select> + [% ELSE %] + <input type="text" value="[% report_meta.$meta_name | html %]" name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> + [% END %] + </div> + [%- END %] + [%- END %] +</div> diff --git a/templates/web/default/report/new/councils_text_none.html b/templates/web/default/report/new/councils_text_none.html index f991e031f..06a4bbe49 100644 --- a/templates/web/default/report/new/councils_text_none.html +++ b/templates/web/default/report/new/councils_text_none.html @@ -7,9 +7,11 @@ "We do not yet have details for the councils that cover this location.", all_councils.size ); - +%] +[% loc("If you submit a problem here the subject and details of the problem will be public, but the problem will <strong>not</strong> be reported to the council."); - +%] +[% tprintf( loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."), all_council_names.join( loc(' or ') ), diff --git a/templates/web/default/report/new/fill_in_details.html b/templates/web/default/report/new/fill_in_details.html index a9a113283..701a9bafa 100644 --- a/templates/web/default/report/new/fill_in_details.html +++ b/templates/web/default/report/new/fill_in_details.html @@ -4,14 +4,14 @@ %] [% IF report.used_map %] -<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> +<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %] class="validate"> [% IF c.req.params.map_override %] <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> [% END %] <input type="hidden" name="pc" value="[% pc | html %]"> [% c.cobrand.form_elements('mapForm') %] [% ELSE %] -<form action="[% c.uri_for('/report/new') %]" method="post" name="mapSkippedForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> +<form action="[% c.uri_for('/report/new') %]" method="post" name="mapSkippedForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %] class="validate"> <input type="hidden" name="pc" value="[% pc | html %]"> <input type="hidden" name="skipped" value="1"> [% c.cobrand.form_elements('mapSkippedForm') %] diff --git a/templates/web/default/report/new/fill_in_details_form.html b/templates/web/default/report/new/fill_in_details_form.html index 633dc0b11..b6b77c75a 100644 --- a/templates/web/default/report/new/fill_in_details_form.html +++ b/templates/web/default/report/new/fill_in_details_form.html @@ -50,7 +50,7 @@ <div class="form-field"> <label for="form_title">[% loc('Subject:') %]</label> - <input type="text" value="[% report.title | html %]" name="title" id="form_title" size="25"> + <input type="text" value="[% report.title | html %]" name="title" id="form_title" size="25" required> </div> [% IF field_errors.detail %] @@ -59,13 +59,13 @@ <div class="form-field"> <label for="form_detail">[% loc('Details:') %]</label> - <textarea name="detail" id="form_detail" rows="7" cols="26">[% report.detail | html %]</textarea> + <textarea name="detail" id="form_detail" rows="7" cols="26" required>[% report.detail | html %]</textarea> </div> [% IF js %] <div class="form-field" id="form_category_row"> <label for="form_category">[% loc('Category:') %]</label> - <select name="category" id="form_category"><option>[% loc('Loading...') %]</option></select> + <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select> </div> [% ELSE %] [% IF category_options.size %] @@ -79,6 +79,10 @@ [% END %] [% END %] +[%- IF category_extras %] +[% PROCESS "report/new/category_extras.html" %] +[%- END %] + [% IF c.cobrand.allow_photo_upload %] [% IF field_errors.photo %] <div class='form-error'>[% field_errors.photo %]</div> @@ -118,7 +122,7 @@ <div class="form-field"> <label for="form_email">[% loc('Your email:') %]</label> - <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" size="25"> + <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" size="25" required> </div> [% INCLUDE 'report/new/notes.html' %] @@ -132,10 +136,10 @@ <div class='form-error'>[% field_errors.password %]</div> [% END %] - <p> + <div class="form-field"> <label class="n" for="password_sign_in">[% loc('<strong>Yes</strong>, I have a password:') %]</label> <input type="password" name="password_sign_in" id="password_sign_in" value="" size="25"> - </p> + </div> <div class="fieldset"> @@ -147,7 +151,7 @@ </p> <p> - <input type="submit" name="submit_sign_in" value="[% loc('Submit') %]"> + <input type="submit" id="submit_sign_in" name="submit_sign_in" value="[% loc('Submit') %]"> </p> </div> @@ -169,7 +173,7 @@ <p style="clear:both"><small>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</small></p> <p> - <input type="submit" name="submit_register" value="[% loc('Submit') %]"> + <input type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]"> </p> </div> @@ -197,7 +201,7 @@ <div class="form-field"> <label for="form_name">[% loc('Your name:') %]</label> - <input type="text" value="[% report.name | html %]" name="name" id="form_name" size="25"> + <input type="text" class="validName" value="[% report.name | html %]" name="name" id="form_name" size="25"> </div> <div class="checkbox"> diff --git a/templates/web/default/report/new/fill_in_details_text.html b/templates/web/default/report/new/fill_in_details_text.html index 9ebb8107b..5d9716915 100644 --- a/templates/web/default/report/new/fill_in_details_text.html +++ b/templates/web/default/report/new/fill_in_details_text.html @@ -4,6 +4,9 @@ to help unless you leave as much detail as you can, so please describe the exact location of the problem (e.g. on a wall), what it is, how long it has been there, a description (and a photo of the problem if you have one), etc.'); + IF category_extras; + ' ' _ loc('Some categories may require additional information.'); + END; ELSE; loc('Please fill in details of the problem below.'); END; diff --git a/templates/web/default/reports/cobrand_stats.html b/templates/web/default/reports/cobrand_stats.html new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/templates/web/default/reports/cobrand_stats.html diff --git a/templates/web/default/reports/council.html b/templates/web/default/reports/council.html index 0739e84e8..44f0040cb 100755 --- a/templates/web/default/reports/council.html +++ b/templates/web/default/reports/council.html @@ -75,6 +75,8 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a <h2>[% name %]</h2> +[% INCLUDE 'reports/cobrand_stats.html' %] + [% IF c.cobrand.moniker == '' %] <p class="promo"> FixMyStreet is now available for local council websites. |