diff options
Diffstat (limited to 'templates/web/base')
22 files changed, 167 insertions, 54 deletions
diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html index ff99bb907..911f4094e 100644 --- a/templates/web/base/admin/report_edit.html +++ b/templates/web/base/admin/report_edit.html @@ -135,7 +135,9 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a> <li>[% loc('Phone:') %] [% problem.user.phone_display | html %]</li> [% END %] [% IF problem.user.email != problem.user.username %] -<li>[% loc('Email:') %] [% problem.user.email | html %]</li> +<li>[% loc('Email:') %] +<a href="mailto:[% problem.user.email | html %]">[% problem.user.email | html %]</a> +</li> [% END %] <li><label class="inline-text" for="flagged">[% loc('Flagged:') %]</label> <input type="checkbox" id="flagged" name="flagged"[% ' checked' IF problem.flagged %]></li> diff --git a/templates/web/base/admin/user-form.html b/templates/web/base/admin/user-form.html index 9a2c0b9e2..e8e647a09 100644 --- a/templates/web/base/admin/user-form.html +++ b/templates/web/base/admin/user-form.html @@ -18,20 +18,12 @@ </li> <li><label for="email">[% loc('Email:') %]</label> <input type='text' class="form-control" id='email' name='email' value='[% user.email | html %]'></li> - [% IF c.config.SMS_AUTHENTICATION %] <li><label class="inline" for="email_verified">[% loc('Email verified:') %]</label> <input type="checkbox" id="email_verified" name="email_verified" value="1" [% user.email_verified ? ' checked' : '' %]> - [% ELSE %] - <input type="hidden" name="email_verified" value="1"> - [% END %] <li><label for="phone">[% loc('Phone:') %]</label> <input type='text' class="form-control" id='phone' name='phone' value='[% user.phone | html %]'></li> - [% IF c.config.SMS_AUTHENTICATION %] <li><label class="inline" for="phone_verified">[% loc('Phone verified:') %]</label> <input type="checkbox" id="phone_verified" name="phone_verified" value="1" [% user.phone_verified ? ' checked' : '' %]> - [% ELSE %] - <input type="hidden" name="phone_verified" value="0"> - [% END %] [% IF username_in_abuse %] <li> @@ -51,23 +43,27 @@ %] </p> </div> - [% loc('Body:') %] <select class="form-control" id='body' name='body'> + <label for="body">[% loc('Body:') %]</label> + <select class="form-control" id='body' name='body'> <option value=''>[% loc('No body') %]</option> [% FOR body IN bodies %] <option value="[% body.id %]"[% ' selected data-originally-selected' IF body.id == user.from_body.id %]>[% body.name %]</option> [% END %] </select> </li> - [% ELSE %] - <li> + [% ELSE %] + <li> <div class="admin-hint"> <p> [% loc("Staff users have permission to log in to the admin.") %] </p> </div> - [% loc('Staff:') %] <input type="checkbox" id="body" name="body" value="[% c.user.from_body.id %]" [% user.from_body.id == c.user.from_body.id ? ' checked' : '' %] [% 'disabled' UNLESS c.user.has_body_permission_to('user_assign_body') %]> + <label> + [% loc('Staff:') %] + <input type="checkbox" id="body" name="body" value="[% c.user.from_body.id %]" [% user.from_body.id == c.user.from_body.id ? ' checked' : '' %] [% 'disabled' UNLESS c.user.has_body_permission_to('user_assign_body') %]> + </label> </li> - [% END %] + [% END %] [% IF areas AND c.cobrand.moniker != 'zurich' %] <li> @@ -79,7 +75,7 @@ %] </p> </div> - [% loc('Area:') %] + <label for="area_id">[% loc('Area:') %]</label> <select class="form-control" id='area_id' name='area_id' [% 'disabled' UNLESS c.user.has_permission_to('user_assign_areas', user.from_body.id) %]> <option value=''>[% loc('No area') %]</option> [% FOREACH area IN areas %] @@ -115,7 +111,10 @@ </p> </div> - [% loc('Flagged:') %] <input type="checkbox" id="flagged" name="flagged"[% user.flagged ? ' checked' : '' %]> + <label> + [% loc('Flagged:') %] + <input type="checkbox" id="flagged" name="flagged"[% user.flagged ? ' checked' : '' %]> + </label> </li> [% UNLESS user.is_superuser %] @@ -126,8 +125,8 @@ </p> </div> [% IF c.user.is_superuser %] - [% loc('Trusted by bodies:') %]<br /> - <select class="form-control js-multiple" id='body' name='trusted_bodies' multiple> + <label for="trusted_bodies">[% loc('Trusted by bodies:') %]</label> + <select class="form-control js-multiple" id='trusted_bodies' name='trusted_bodies' multiple> [% FOR body IN bodies %] <option value="[% body.id %]"[% ' selected' IF user.has_permission_to('trusted', body.id) %]>[% body.name %]</option> [% END %] @@ -148,7 +147,10 @@ [% loc("Superusers have permission to perform <strong>all actions</strong> within the admin.") %] </p> </div> - [% loc('Superuser:') %] <input type="checkbox" id="is_superuser" name="is_superuser"[% user.is_superuser ? ' checked' : '' %]> + <label> + [% loc('Superuser:') %] + <input type="checkbox" id="is_superuser" name="is_superuser"[% user.is_superuser ? ' checked' : '' %]> + </label> </li> [% END %] @@ -185,5 +187,16 @@ [% END %] [% TRY %][% INCLUDE 'admin/user-form-extra-fields.html' %][% CATCH file %][% END %] </ul> - <input type="submit" class="btn" name="Submit changes" value="[% loc('Submit changes') %]" > + <p> + <input type="submit" class="btn" name="Submit changes" value="[% loc('Submit changes') %]" > + </p> + [% IF user AND NOT user.from_body %] + <ul class="no-bullets danger-zone"> + <li><input class="btn-danger" type="submit" name="logout_everywhere" value="[% loc('Log out of all sessions') %]"> + <li><input class="btn-danger" type="submit" name="anon_everywhere" value="[% loc('Make anonymous on all reports and updates') %]"> + <li><input class="btn-danger" type="submit" name="hide_everywhere" value="[% loc('Hide all reports and updates') %]"> + <li><input class="btn-danger" type="submit" name="remove_account" value="[% loc('Remove account details') %]"> + </ul> + [% END %] + </form> diff --git a/templates/web/base/around/on_map_list_items.html b/templates/web/base/around/on_map_list_items.html index fafe7f433..e1be87754 100644 --- a/templates/web/base/around/on_map_list_items.html +++ b/templates/web/base/around/on_map_list_items.html @@ -14,7 +14,11 @@ </li> [% ELSE %] <li class="item-list__item item-list__item--empty"> - <p>[% loc('There are no reports to show.') %]</p> + [% IF c.get_param('js') %] + <p>[% loc('Loading reports…') %]</p> + [% ELSE %] + <p>[% loc('There are no reports to show.') %]</p> + [% END %] </li> [% END %] </ul> diff --git a/templates/web/base/auth/2faform.html b/templates/web/base/auth/2faform.html new file mode 100644 index 000000000..bd8d60cdb --- /dev/null +++ b/templates/web/base/auth/2faform.html @@ -0,0 +1,26 @@ +[% INCLUDE 'header.html', bodyclass = 'fullwidthpage', title = loc('Confirm account') %] + + <div class="confirmation-header confirmation-header--phone"> + [% IF incorrect_code %] + <h1>[% loc('Sorry, that wasn’t the correct code') %]</h1> + <p>[% loc('Try again') %]:</p> + [% ELSE %] + <h1>[% loc("Nearly done! Now check your phone…") %]</h1> + <p>[% loc("Please generate a two-factor code and enter it below:") %]</p> + [% END %] + <form action="/auth" method="post"> + <input type="hidden" name="username" value="[% c.get_param('username') | html %]"> + <input type="hidden" name="password_sign_in" value="[% c.get_param('password_sign_in') | html %]"> + <input type="hidden" name="r" value="[% c.get_param('r') | html %]"> + <input type="hidden" name="remember_me" value="[% c.get_param('remember_me') | html %]"> + <input type="hidden" name="token" value="[% token | html %]"> + + <label for="2fa_code">[% loc('Code') %]</label> + <div class="form-txt-submit-box"> + <input class="form-control" type="number" id="2fa_code" name="2fa_code" value="" required> + <input type="submit" value="[% loc('Submit') %]" class="btn-primary"> + </div> + </form> + </div> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/base/auth/change_password.html b/templates/web/base/auth/change_password.html index a32dbaf9c..7a38e0134 100644 --- a/templates/web/base/auth/change_password.html +++ b/templates/web/base/auth/change_password.html @@ -1,7 +1,9 @@ [% SET bclass = 'authpage'; SET bclass = 'fullwidthpage' IF password_changed; -INCLUDE 'header.html', title = loc('Change password'), bodyclass = bclass +SET title = loc('Set password'); +SET title = loc('Change password') IF c.user.password; +INCLUDE 'header.html', title = title bodyclass = bclass %] [% IF password_changed %] @@ -13,13 +15,15 @@ INCLUDE 'header.html', title = loc('Change password'), bodyclass = bclass [% ELSE %] -<h1>[% loc('Change password') %]</h1> +<h1>[% title %]</h1> <form action="[% c.uri_for_action('/auth/profile/change_password') %]" method="post" name="change_password" class="fieldset"> <input type="hidden" name="token" value="[% csrf_token %]"> <fieldset> - [% IF password_error; + [% IF password_error == 'failed' %] + <div class="form-error">[% field_errors.password_register %]</div> + [% ELSIF password_error; errors = { missing => loc('Please enter a password'), @@ -31,6 +35,14 @@ INCLUDE 'header.html', title = loc('Change password'), bodyclass = bclass <div class="form-error">[% loc_password_error %]</div> [% END %] +[% IF c.user.password %] + <div class="form-field"> + <label for="current_password">[% loc('Current password:') %]</label> + <input class="form-control" type="password" name="current_password" value="[% current_password | html %]"> + </div> + <hr> +[% END %] + <div class="form-field"> <label for="new_password">[% loc('New password:') %]</label> <input class="form-control" type="password" name="new_password" value="[% new_password | html %]"> @@ -40,7 +52,7 @@ INCLUDE 'header.html', title = loc('Change password'), bodyclass = bclass <input class="form-control" type="password" name="confirm" value="[% confirm | html %]"> </div> <div class="final-submit"> - <input type="submit" class="btn" value="[% loc('Change password') %]"> + <input type="submit" class="btn" value="[% title %]"> </div> </fieldset> diff --git a/templates/web/base/auth/change_phone.html b/templates/web/base/auth/change_phone.html index 27a2f63dd..62e9fa6d6 100644 --- a/templates/web/base/auth/change_phone.html +++ b/templates/web/base/auth/change_phone.html @@ -18,7 +18,7 @@ END [% IF c.user.phone_verified OR (c.user.phone AND NOT verifying) %] [% loc('Your phone number') %]: [% c.user.phone_display %] [% ELSIF c.user.phone %] -[% DEFAULT username = c.user.phone %] +[% DEFAULT username = c.user.phone_display %] [% END %] <form method="post" name="change_phone"> diff --git a/templates/web/base/auth/general.html b/templates/web/base/auth/general.html index 8fc5578c1..1e44bb68e 100644 --- a/templates/web/base/auth/general.html +++ b/templates/web/base/auth/general.html @@ -60,7 +60,9 @@ [% INCLUDE form_sign_in_yes %] <input type="hidden" name="oauth_need_email" value="1"> [% ELSE %] + [% IF NOT field_errors.password_register %] [% INCLUDE form_sign_in_yes %] + [% END %] [% INCLUDE form_sign_in_no %] [% END %] </div> @@ -114,14 +116,22 @@ <input class="form-control" type="text" name="name" value="" placeholder="[% loc('Your name') %]"> <label for="password_register">[% loc('Password (optional)') %]</label> + [% IF field_errors.password_register %] + <p class='form-error'>[% field_errors.password_register %]</p> + [% END %] <div class="general-notes"> <p>[% loc('Providing a name and password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p> </div> <div class="form-txt-submit-box"> - <input class="form-control" type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> + <input class="form-control js-password-validate" type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> <input class="green-btn" type="submit" name="sign_in_by_code" value="[% loc('Sign in') %]"> </div> + + <div class="general-notes"> + <p>[% tprintf(loc('Your password should include %d or more characters.'), c.cobrand.password_minimum_length) %]</p> + </div> + </div> [% END %] diff --git a/templates/web/base/auth/generate_token.html b/templates/web/base/auth/generate_token.html index 157335047..f7061be45 100644 --- a/templates/web/base/auth/generate_token.html +++ b/templates/web/base/auth/generate_token.html @@ -1,5 +1,5 @@ [% -INCLUDE 'header.html', title = loc('Generate token'), bodyclass = 'fullwidthpage' +INCLUDE 'header.html', title = loc('Security'), bodyclass = 'fullwidthpage' %] [% IF token_generated %] @@ -15,9 +15,28 @@ INCLUDE 'header.html', title = loc('Generate token'), bodyclass = 'fullwidthpage <p><a href="/my">[% loc('Your account') %]</a></p> </div> +[% ELSIF toggle_2fa_on %] + + <div class="confirmation-header"> + <h1>[% loc('Two-factor authentication has been activated') %]</h1> + + <p align="center"><img src="[% qr_code %]"></p> + <p align="center">[% secret32.replace('(....)', '$1 ') %]</p> + + <p><a href="/my">[% loc('Your account') %]</a></p> + </div> + +[% ELSIF toggle_2fa_off %] + + <div class="confirmation-header"> + <h1>[% loc('Two-factor authentication has been deactivated') %]</h1> + + <p><a href="/my">[% loc('Your account') %]</a></p> + </div> + [% ELSE %] -<h1>[% loc('Generate token') %]</h1> +<h1>[% loc('Security') %]</h1> <form action="[% c.uri_for_action('/auth/profile/generate_token') %]" method="post" name="generate_token"> <input type="hidden" name="token" value="[% csrf_token %]"> @@ -31,6 +50,9 @@ INCLUDE 'header.html', title = loc('Generate token'), bodyclass = 'fullwidthpage <p> <input name="generate_token" type="submit" class="btn" value="[% existing_token ? loc('Replace token') : loc('Generate token') %]"> + [% IF c.user.is_superuser %] + <input name="toggle_2fa" type="submit" class="btn" value="[% has_2fa ? loc('Deactivate two-factor authentication') : loc('Activate two-factor authentication') %]"> + [% END %] </p> </form> diff --git a/templates/web/base/common_header_tags.html b/templates/web/base/common_header_tags.html index 749a4f740..541bb1a56 100644 --- a/templates/web/base/common_header_tags.html +++ b/templates/web/base/common_header_tags.html @@ -14,7 +14,8 @@ <script nonce="[% csp_nonce %]"> window.Modernizr=function(e,t,n){function r(e){p.cssText=e}function o(e,t){return typeof e===t}var a,i,c,l="2.8.3",s={},u=t.documentElement,d="modernizr",f=t.createElement(d),p=f.style,m=({}.toString,{}),h=[],y=h.slice,v=function(e,n,r,o){var a,i,c,l,s=t.createElement("div"),f=t.body,p=f||t.createElement("body");if(parseInt(r,10))for(;r--;)c=t.createElement("div"),c.id=o?o[r]:d+(r+1),s.appendChild(c);return a=["­",'<style id="s',d,'">',e,"</style>"].join(""),s.id=d,(f?s:p).innerHTML+=a,p.appendChild(s),f||(p.style.background="",p.style.overflow="hidden",l=u.style.overflow,u.style.overflow="hidden",u.appendChild(p)),i=n(s,e),f?s.parentNode.removeChild(s):(p.parentNode.removeChild(p),u.style.overflow=l),!!i},g=function(t){var n=e.matchMedia||e.msMatchMedia;if(n)return n(t)&&n(t).matches||!1;var r;return v("@media "+t+" { #"+d+" { position: absolute; } }",function(t){r="absolute"==(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position}),r},b={}.hasOwnProperty;c=o(b,"undefined")||o(b.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return b.call(e,t)};for(var E in m)c(m,E)&&(i=E.toLowerCase(),s[i]=m[E](),h.push((s[i]?"":"no-")+i));return r(""),f=a=null,s._version=l,s.mq=g,s.testStyles=v,s}(this,this.document); var fixmystreet=fixmystreet||{}; - (function(b){var a=b.documentElement;a.className=a.className.replace(/\bno-js\b/,"js");var c=-1<a.className.indexOf("iel8"),c=Modernizr.mq("(min-width: 48em)")||c?"desktop":"mobile";b=b.getElementById("js-meta-data");fixmystreet.page=b.getAttribute("data-page");fixmystreet.cobrand=b.getAttribute("data-cobrand");"mobile"==c&&(a.className+=" mobile","around"==fixmystreet.page&&(a.className+=" map-fullscreen only-map map-reporting"))})(document); + (function(b){var a=b.documentElement;a.className=a.className.replace(/\bno-js\b/,"js");var c=-1<a.className.indexOf("iel8");c=Modernizr.mq("(min-width: 48em)")||c?"desktop":"mobile";b=b.getElementById("js-meta-data");"IntersectionObserver"in window&&(a.className+=" lazyload");fixmystreet.page=b.getAttribute("data-page");fixmystreet.cobrand=b.getAttribute("data-cobrand");"mobile"==c&&(a.className+=" mobile","around"==fixmystreet.page&&(a.className+=" map-fullscreen only-map map-reporting"))})(document); + </script> [% IF robots %] diff --git a/templates/web/base/dashboard/index.html b/templates/web/base/dashboard/index.html index c6902556a..cb6ca154f 100644 --- a/templates/web/base/dashboard/index.html +++ b/templates/web/base/dashboard/index.html @@ -50,6 +50,7 @@ <label for="ward">[% loc('Council:') %]</label> <select class="form-control" name="body" id="body"><option value=''>[% loc('All') %]</option> [% FOR b IN bodies %] + [% NEXT IF NOT b.get_column("area_count") %] <option value="[% b.id %]">[% b.name %]</option> [% END %] </select> @@ -101,7 +102,7 @@ <li>[% INCLUDE gb new_gb='month' text=loc('Month') %]</li> <li>[% INCLUDE gb new_gb='category+state' text=loc('Category and State') %]</li> <li>[% INCLUDE gb new_gb='device+site' text=loc('Device and Site') %]</li> - <li class="pull-right"><a href="[% c.uri_with({ csv => 1 }) %]">[% loc('Export as CSV') %]</a></li> + <li class="pull-right"><a href="[% c.uri_with({ export => 1 }) %]">[% loc('Export as CSV') %]</a></li> </ul> <table width="100%" id="overview"> diff --git a/templates/web/base/js/translation_strings.html b/templates/web/base/js/translation_strings.html index ed95335a6..a2e3c16c5 100644 --- a/templates/web/base/js/translation_strings.html +++ b/templates/web/base/js/translation_strings.html @@ -1,4 +1,7 @@ [% FILTER collapse %] +var fixmystreet = fixmystreet || {}; +fixmystreet.password_minimum_length = [% c.cobrand.password_minimum_length %]; + translation_strings = { update: '[% loc('Please enter a message') | replace("'", "\\'") %]', title: '[% loc('Please enter a subject') | replace("'", "\\'") %]', @@ -19,6 +22,9 @@ password_sign_in: { required: '[% loc('Please enter a password') | replace("'", "\\'") %]' }, + password_register: { + short: '[% tprintf(loc('Please make sure your password is at least %d characters long'), c.cobrand.password_minimum_length) | replace("'", "\\'") %]', + }, phone: { required: '[% loc('Please enter your phone number') | replace("'", "\\'") %]' }, diff --git a/templates/web/base/my/my.html b/templates/web/base/my/my.html index e10dd96c8..459fa5266 100644 --- a/templates/web/base/my/my.html +++ b/templates/web/base/my/my.html @@ -62,7 +62,7 @@ li .my-account-buttons a { <p class="my-account-buttons"> <a href="/auth/change_password">[% loc('Change password') %]</a> [% IF c.user AND (c.user.from_body OR c.user.is_superuser) %] - <a href="/auth/generate_token">[% loc('Generate token') %]</a> + <a href="/auth/generate_token">[% loc('Security') %]</a> [% END %] <a href="/auth/sign_out">[% loc('Sign out') %]</a> </p> diff --git a/templates/web/base/open311/index.html b/templates/web/base/open311/index.html index 2a8044a54..68f83c445 100644 --- a/templates/web/base/open311/index.html +++ b/templates/web/base/open311/index.html @@ -40,8 +40,8 @@ about future-proofing your communication channels in an easy and economical way [% IF c.cobrand.moniker == 'fixmystreet' %] <p>You may be interested to know about <a -href="https://www.fixmystreet.com/about/professional">FixMyStreet -Professional</a>, our hosted service which sits seamlessly on your council +href="https://www.fixmystreet.com/pro/">FixMyStreet +Pro</a>, our hosted service which sits seamlessly on your council website.</p> <p>We can integrate it with any council back-end system, but if you use diff --git a/templates/web/base/questionnaire/index.html b/templates/web/base/questionnaire/index.html index 84a9d7efd..12ca36cf2 100644 --- a/templates/web/base/questionnaire/index.html +++ b/templates/web/base/questionnaire/index.html @@ -101,9 +101,9 @@ <p>[% loc('Would you like to receive another questionnaire in 4 weeks, reminding you to check the status?') %]</p> <p class="segmented-control segmented-control--radio"> <input type="radio" name="another" id="another_yes" value="Yes"[% ' checked' IF another == 'Yes' %]> - <label for="another_yes">[% loc('Yes') %]</label> + <label class="btn" for="another_yes">[% loc('Yes') %]</label> <input type="radio" name="another" id="another_no" value="No"[% ' checked' IF another == 'No' %]> - <label for="another_no">[% loc('No') %]</label> + <label class="btn" for="another_no">[% loc('No') %]</label> </p> </div> diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html index 5088332ce..1893826de 100644 --- a/templates/web/base/report/_inspect.html +++ b/templates/web/base/report/_inspect.html @@ -17,7 +17,7 @@ [% IF permissions.report_inspect AND problem.user.phone %] <p> <strong>[% loc('Phone Reporter:') %]</strong> - <a href="tel:[% problem.user.phone | html %]">[% problem.user.phone | html %]</a> + <a href="tel:[% problem.user.phone | html %]">[% problem.user.phone_display | html %]</a> </p> [% END %] <p> @@ -65,9 +65,9 @@ data-defect-types='[% category_defect_types.$cat_name %]' data-templates='[% templates_by_category.$cat_name %]'> [% IF cat_name == problem.category %] - [% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category %] + [% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$cat_name hide_notices=1 %] [% ELSE %] - [% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$category report_meta='' %] + [% INCLUDE 'report/new/category_extras_fields.html' report_meta='' metas=category_extras.$cat_name hide_notices=1 %] [% END %] </p> [% END %] diff --git a/templates/web/base/report/new/category_extras_fields.html b/templates/web/base/report/new/category_extras_fields.html index 9c2731730..5cbdcc524 100644 --- a/templates/web/base/report/new/category_extras_fields.html +++ b/templates/web/base/report/new/category_extras_fields.html @@ -5,7 +5,7 @@ <input type="hidden" value="" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"> - [% ELSE %] + [% ELSIF meta.variable != 'false' || NOT hide_notices %] <label for="[% cat_prefix %]form_[% meta_name %]">[% meta.description %]</label> [% IF field_errors.$meta_name %] diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html index bd4ce1cf7..ad74a5654 100644 --- a/templates/web/base/report/new/form_user_loggedin.html +++ b/templates/web/base/report/new/form_user_loggedin.html @@ -31,11 +31,11 @@ [% IF c.user.phone_verified %] <label for="form_phone">[% loc('Phone number') %]</label> - <input class="form-control" id="form_phone" name="phone" disabled type="text" value="[% c.user.phone | html %]"> + <input class="form-control" id="form_phone" name="phone" disabled type="text" value="[% c.user.phone_display | html %]"> [% END %] [% IF c.user.email_verified %] - <label for="form_username">[% loc('Email address') %]</label> + <label for="form_username">[% loc('Email address') %]<span class="hidden"> [% loc('(optional)') %]</span></label> <input class="form-control" id="form_username" name="username" [%- IF NOT can_contribute_as_another_user -%] disabled @@ -65,7 +65,7 @@ [% IF NOT c.user.phone_verified %] <label for="form_phone">[% loc('Phone number (optional)') %]</label> - <input class="form-control" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone"> + <input class="form-control" type="text" value="[% report.user.phone_display | html %]" name="phone" id="form_phone"> [% END %] [% IF NOT c.user.email_verified %] <label for="form_username">[% loc('Email address (optional)') %]</label> diff --git a/templates/web/base/report/new/form_user_loggedout_by_email.html b/templates/web/base/report/new/form_user_loggedout_by_email.html index e9519f573..975dbe704 100644 --- a/templates/web/base/report/new/form_user_loggedout_by_email.html +++ b/templates/web/base/report/new/form_user_loggedout_by_email.html @@ -36,13 +36,20 @@ </div> <label class="form-focus-hidden" for="password_register">[% loc('Password (optional)') %]</label> - + [% IF field_errors.password_register %] + <p class='form-error'>[% field_errors.password_register %]</p> + [% END %] <div class="general-notes form-focus-hidden"> <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p> </div> <div class="form-txt-submit-box form-focus-hidden"> - <input class="form-control" type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> + <input class="form-control js-password-validate" type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]"> </div> + + <div class="general-notes"> + <p>[% tprintf(loc('Your password should include %d or more characters.'), c.cobrand.password_minimum_length) %]</p> + </div> + </div> diff --git a/templates/web/base/report/photo.html b/templates/web/base/report/photo.html index aa82baef6..5474fad28 100644 --- a/templates/web/base/report/photo.html +++ b/templates/web/base/report/photo.html @@ -1,13 +1,15 @@ -[% IF c.cobrand.allow_photo_display(object) && object.photo %] +[% IF object.photo %] [% IF object.photos.size > 1 %] <div class="update-img-set"> [% END %] [% FOR photo IN object.photos %] - <div class="update-img"> - <a href="[% photo.url_full %]" rel="fancy"> - <img alt="Photo of this report" src="[% photo.url %]"> - <span>zoom</span></a> - </div> + [% IF c.cobrand.allow_photo_display(object, photo.idx) %] + <div class="update-img"> + <a href="[% photo.url_full %]" rel="fancy"> + <img alt="Photo of this report" src="[% photo.url %]"> + <span>zoom</span></a> + </div> + [% END %] [% END %] [% IF object.photos.size > 1 %] </div> diff --git a/templates/web/base/report/update.html b/templates/web/base/report/update.html index 6dca226fe..100deb1ea 100644 --- a/templates/web/base/report/update.html +++ b/templates/web/base/report/update.html @@ -69,7 +69,7 @@ <label for="moderation_reason">[% loc('Moderation reason:') %]</label> <input type="text" class="form-control" name="moderation_reason" placeholder="[% loc('Describe why you are moderating this') %]"> - <input type="submit" class="red-btn" value="[% loc('Save changes') %]"> + <input type="submit" class="green-btn" value="[% loc('Save changes') %]"> <input type="button" class="btn cancel" value="[% loc('Discard changes') %]"> </div> </form> diff --git a/templates/web/base/report/update/form_user_loggedout_by_email.html b/templates/web/base/report/update/form_user_loggedout_by_email.html index 7d10fe391..d038cdb23 100644 --- a/templates/web/base/report/update/form_user_loggedout_by_email.html +++ b/templates/web/base/report/update/form_user_loggedout_by_email.html @@ -8,14 +8,21 @@ [% INCLUDE 'report/update/form_name.html' %] <label for="password_register">[% loc('Password (optional)') %]</label> + [% IF field_errors.password_register %] + <p class='form-error'>[% field_errors.password_register %]</p> + [% END %] <div class="general-notes"> <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p> </div> <div class="form-txt-submit-box"> - <input type="password" class="form-control" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> + <input type="password" class="form-control js-password-validate" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]"> </div> + <div class="general-notes"> + <p>[% tprintf(loc('Your password should include %d or more characters.'), c.cobrand.password_minimum_length) %]</p> + </div> + </div> diff --git a/templates/web/base/reports/index.html b/templates/web/base/reports/index.html index 70f4b3929..9fcf0b4c5 100755 --- a/templates/web/base/reports/index.html +++ b/templates/web/base/reports/index.html @@ -30,7 +30,7 @@ data-values-fixed="[[% problems_fixed_by_period.join(',') %]]" ></canvas> <span class="label" data-datasetindex="0"><strong style="color: #F4A140">[% tprintf(nget("%s problem reported", "%s problems reported", problems_reported_by_period.last), decode(problems_reported) _ '</strong>') %]</span> - <span class="label" data-datasetindex="1"><strong style="color: #62B356">[% tprintf(nget("%s report marked as fixed", "%s reports marked as fixed", problems_fixed_by_period.last), decode(problems_fixed) _ '</strong>') %]</span> + <span class="label" data-datasetindex="1"><strong style="color: #62B356">[% tprintf(nget("%s problem marked as fixed", "%s problems marked as fixed", problems_fixed_by_period.last), decode(problems_fixed) _ '</strong>') %]</span> </div> </div> </div> |