diff options
Diffstat (limited to 'templates/web')
21 files changed, 543 insertions, 398 deletions
diff --git a/templates/web/base/auth/general.html b/templates/web/base/auth/general.html index 6e1db86fe..d856dc19a 100644 --- a/templates/web/base/auth/general.html +++ b/templates/web/base/auth/general.html @@ -2,11 +2,28 @@ <h1>[% loc('Sign in') %]</h1> +[% IF oauth_need_email %] + <p class="form-error">[% loc('We need your email address, please give it below.') %]</p> +[% END %] +[% IF oauth_failure %] + <p class="form-error">[% loc('Sorry, we could not log you in. Please fill in the form below.') %]</p> +[% END %] + <form action="[% c.uri_for() %]" method="post" name="general_auth" class="validate"> <fieldset> <input type="hidden" name="r" value="[% c.req.params.r | html %]"> +[% IF NOT oauth_need_email AND c.config.FACEBOOK_APP_ID %] + <div class="form-box"> + <button name="facebook_sign_in" id="facebook_sign_in" value="facebook_sign_in" class="btn btn--block btn--social btn--facebook"> + <img alt="" src="/i/facebook-icon-32.png" width="17" height="32"> + Log in with Facebook + </button> + </div> + <div id="js-social-email-hide"> +[% END %] + [% IF email_error; # other keys include fqdn, mxcheck if you'd like to write a custom error message @@ -29,43 +46,58 @@ <div id="form_sign_in"> <h3>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h3> + [% IF oauth_need_email %] + [% INCLUDE form_sign_in_no %] + [% INCLUDE form_sign_in_yes %] + <input type="hidden" name="oauth_need_email" value="1"> + [% ELSE %] + [% INCLUDE form_sign_in_yes %] + [% INCLUDE form_sign_in_no %] + [% END %] + </div> - <div id="form_sign_in_yes" class="form-box"> - <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> +[% IF NOT oauth_need_email AND c.config.FACEBOOK_APP_ID %] + </div> +[% END %] - <label class="hidden-js n" for="password_sign_in">[% loc('Password:') %]</label> + </fieldset> +</form> - <div class="form-txt-submit-box"> - <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]"> - <input class="green-btn" type="submit" name="sign_in" value="[% loc('Sign in') %]"> - </div> +[% INCLUDE 'footer.html' %] - <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> - <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label> +[% BLOCK form_sign_in_yes %] + <div id="form_sign_in_yes" class="form-box"> + <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> - </div> - <div id="form_sign_in_no" class="form-box"> - <h5>[% loc('<strong>No</strong> let me sign in by email') %]</h5> + <label class="hidden-js n" for="password_sign_in">[% loc('Password:') %]</label> - <label for="name">[% loc('Name') %]</label> - <input type="text" name="name" value="" placeholder="[% loc('Your name') %]"> + <div class="form-txt-submit-box"> + <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]"> + <input class="green-btn" type="submit" name="sign_in" value="[% loc('Sign in') %]"> + </div> - <label for="password_register">[% loc('Password (optional)') %]</label> + <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> + <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label> - <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> +[% END %] - <div class="form-txt-submit-box"> - <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> - <input class="green-btn" type="submit" name="email_sign_in" value="[% loc('Sign in') %]"> - </div> - </div> +[% BLOCK form_sign_in_no %] + <div id="form_sign_in_no" class="form-box"> + <h5>[% loc('<strong>No</strong> let me sign in by email') %]</h5> - </div> + <label for="name">[% loc('Name') %]</label> + <input type="text" name="name" value="" placeholder="[% loc('Your name') %]"> - </fieldset> -</form> + <label for="password_register">[% loc('Password (optional)') %]</label> + <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> -[% INCLUDE 'footer.html' %] + <div class="form-txt-submit-box"> + <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> + <input class="green-btn" type="submit" name="email_sign_in" value="[% loc('Sign in') %]"> + </div> + </div> +[% END %] diff --git a/templates/web/base/js/validation_rules.html b/templates/web/base/js/validation_rules.html index 409d0971f..5295a53ca 100644 --- a/templates/web/base/js/validation_rules.html +++ b/templates/web/base/js/validation_rules.html @@ -1,7 +1,5 @@ validation_rules = { title: { required: true }, detail: { required: true }, - email: { required: true }, - update: { required: true }, - rznvy: { required: true } + update: { required: true } }; diff --git a/templates/web/base/questionnaire/index.html b/templates/web/base/questionnaire/index.html index 2c7761d5d..c8b6907a1 100644 --- a/templates/web/base/questionnaire/index.html +++ b/templates/web/base/questionnaire/index.html @@ -11,7 +11,7 @@ <h1>[% loc('Questionnaire') %]</h1> -<h2 class="questionnaire-report-header">Your report</h2> +<h2 class="questionnaire-report-header">[% loc('Your report') %]</h2> <div class="questionnaire-report-reminder"> [% INCLUDE 'report/photo.html' object=problem %] <h3 class="questionnaire-report-reminder__report-title"> diff --git a/templates/web/base/report/display.html b/templates/web/base/report/display.html index 5f499dd6e..05e07d501 100644 --- a/templates/web/base/report/display.html +++ b/templates/web/base/report/display.html @@ -15,64 +15,30 @@ [% IF login_success %] <p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p> + [% INCLUDE 'report/update-form.html' %] + [% SET shown_form = 1 %] +[% ELSIF oauth_failure %] + <p class="form-error">[% loc('Sorry, we could not log you in. Please fill in the form below.') %]</p> + [% INCLUDE 'report/update-form.html' %] + [% SET shown_form = 1 %] +[% ELSIF oauth_need_email %] + <p class="form-error"> + [% loc('Please note your update has <strong>not yet been posted</strong>.') %] + [% loc('We need your email address, please give it below.') %] + </p> + [% INCLUDE 'report/update-form.html' %] + [% SET shown_form = 1 %] [% END %] [% INCLUDE 'report/banner.html' %] - [% INCLUDE 'report/_main.html' %] [% TRY %][% INCLUDE 'report/_message_manager.html' %][% CATCH file %][% END %] +[% INCLUDE 'report/display_tools.html' %] +[% TRY %][% INCLUDE 'report/sharing.html' %][% CATCH file %][% END %] +[% INCLUDE 'report/updates.html' %] -<div class="shadow-wrap"> - <ul id="key-tools"> - [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_body( c.cobrand.council_id ) %] - <li><form method="post" action="/report/delete/[% problem.id %]" id="remove-from-site-form"> - <input type="submit" id="key-tool-report-abuse" class="abuse" value="Remove from site"> - </form></li> - [% ELSIF c.cobrand.moniker != 'zurich' %] - <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li> - [% END %] - [% IF c.cobrand.moniker != 'zurich' %] - <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li> - [% END %] - [% IF c.cobrand.moniker == 'fixmystreet' %] - <li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li> - [% END %] - [% IF c.cobrand.moniker == 'zurich' %] - <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems on the map' ) %]</a></li> - [% ELSE %] - <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li> - [% END %] - </ul> - -[% IF c.cobrand.moniker == 'fixmystreet' %] - <div id="report-share" class="hidden-js" align="center"> - <a href="https://twitter.com/share" class="twitter-share-button" data-text="I just reported ‘[% problem.title_safe | html %]’" data-via="fixmystreet" data-related="mysociety" data-count="none" data-dnt="true">Tweet</a> -<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> - <iframe src="//www.facebook.com/plugins/like.php?href=[% c.req.uri | uri %]&send=false&layout=button_count&width=90&show_faces=false&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe> - </div> +[% IF NOT shown_form %] + [% INCLUDE 'report/update-form.html' %] [% END %] -<div id="report-updates-data" class="hidden-js"> - <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post"> - <a href="[% c.uri_for( '/rss', problem.id ) %]"> - <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0"> - </a> - <p>[% loc('Receive email when updates are left on this problem.' ) %]</p> - <fieldset> - <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label> - <div class="form-txt-submit-box"> - <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]"> - <input class="green-btn" type="submit" value="[% loc('Subscribe') %]"> - </div> - <input type="hidden" name="id" value="[% problem.id %]"> - <input type="hidden" name="type" value="updates"> - </fieldset> - </form> -</div> - -</div> - -[% TRY %][% INCLUDE 'report/sharing.html' %][% CATCH file %][% END %] -[% INCLUDE 'report/updates.html' %] -[% INCLUDE 'report/update-form.html' %] [% INCLUDE 'footer.html' %] diff --git a/templates/web/base/report/display_tools.html b/templates/web/base/report/display_tools.html new file mode 100644 index 000000000..004ae29e5 --- /dev/null +++ b/templates/web/base/report/display_tools.html @@ -0,0 +1,49 @@ +<div class="shadow-wrap"> + <ul id="key-tools"> + [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_body( c.cobrand.council_id ) %] + <li><form method="post" action="/report/delete/[% problem.id %]" id="remove-from-site-form"> + <input type="submit" id="key-tool-report-abuse" class="abuse" value="Remove from site"> + </form></li> + [% ELSIF c.cobrand.moniker != 'zurich' %] + <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li> + [% END %] + [% IF c.cobrand.moniker != 'zurich' %] + <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li> + [% END %] + [% IF c.cobrand.moniker == 'fixmystreet' %] + <li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li> + [% END %] + [% IF c.cobrand.moniker == 'zurich' %] + <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems on the map' ) %]</a></li> + [% ELSE %] + <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li> + [% END %] + </ul> + +[% IF c.cobrand.moniker == 'fixmystreet' %] + <div id="report-share" class="hidden-js" align="center"> + <a href="https://twitter.com/share" class="twitter-share-button" data-text="I just reported ‘[% problem.title_safe | html %]’" data-via="fixmystreet" data-related="mysociety" data-count="none" data-dnt="true">Tweet</a> +<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + <iframe src="//www.facebook.com/plugins/like.php?href=[% c.req.uri | uri %]&send=false&layout=button_count&width=90&show_faces=false&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe> + </div> +[% END %] + +<div id="report-updates-data" class="hidden-js"> + <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post"> + <a href="[% c.uri_for( '/rss', problem.id ) %]"> + <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0"> + </a> + <p>[% loc('Receive email when updates are left on this problem.' ) %]</p> + <fieldset> + <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label> + <div class="form-txt-submit-box"> + <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]"> + <input class="green-btn" type="submit" value="[% loc('Subscribe') %]"> + </div> + <input type="hidden" name="id" value="[% problem.id %]"> + <input type="hidden" name="type" value="updates"> + </fieldset> + </form> +</div> + +</div> diff --git a/templates/web/base/report/new/fill_in_details.html b/templates/web/base/report/new/fill_in_details.html index 9d3f52041..55b3a5207 100644 --- a/templates/web/base/report/new/fill_in_details.html +++ b/templates/web/base/report/new/fill_in_details.html @@ -33,11 +33,15 @@ <div id="skipped-map"> [% END %] - [% IF login_success %] - <p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p> - [% END %] - - [% PROCESS 'report/new/fill_in_details_form.html' %] + <div id="report-a-problem-main"> + [% IF login_success %] + [% PROCESS 'report/new/login_success_form.html' %] + [% ELSIF oauth_need_email %] + [% PROCESS 'report/new/oauth_email_form.html' %] + [% ELSE %] + [% PROCESS 'report/new/fill_in_details_form.html' %] + [% END %] + </div> </div> </form> diff --git a/templates/web/base/report/new/fill_in_details_form.html b/templates/web/base/report/new/fill_in_details_form.html index 9c42f4696..f9da3753f 100644 --- a/templates/web/base/report/new/fill_in_details_form.html +++ b/templates/web/base/report/new/fill_in_details_form.html @@ -1,11 +1,10 @@ -<div id="report-a-problem-main"> - <h1>[% loc('Report your problem') %]</h1> +<h1>[% loc('Report your problem') %]</h1> - [% IF report.used_map %] +[% IF report.used_map %] <p class="change_location">[% loc('Wrong location? Just click again on the map.') %]</p> - [% END %] +[% END %] - [% IF js %] +[% IF js %] <p id="councils_text"> [% tprintf( loc('All the information you provide here will be sent to <strong>%s</strong>.'), @@ -13,94 +12,28 @@ ); %] [% loc('The summary and description will also be made public (see our <a href="/privacy">privacy policy</a>).') %] </p> - [% ELSE %] - [% PROCESS 'report/new/councils_text.html' %] - [% END %] +[% ELSE %] + [% PROCESS 'report/new/councils_text.html' %] +[% END %] - [% IF report.used_map && partial_token %] +[% IF report.used_map && partial_token %] <p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p> - [% END %] - - [% TRY %][% PROCESS 'report/new/sidebar.html' %][% CATCH file %][% END %] - - [% INCLUDE 'errors.html' %] - - <fieldset> - <div id="problem_form"> - - [% INCLUDE 'report/new/form_heading.html' %] - - [% IF field_errors.bodies %] - <p class='form-error'>[% field_errors.bodies %]</p> - [% END %] - - [% TRY %] - [%# Useful for amending form contents based on category selection %] - [% PROCESS 'report/new/category_at_top.html' %] - [% need_to_show_category_selector = 0 %] - [% CATCH file %] - [% need_to_show_category_selector = 1 %] - [% END %] - - <label for="form_title">[% loc('One-line summary') %] [% INCLUDE 'report/public_label.html' %]</label> - [% IF field_errors.title %] - <p class='form-error'>[% field_errors.title %]</p> - [% END %] - <input type="text" value="[% report.title | html %]" name="title" id="form_title" placeholder="[% loc('What’s the issue, and where is it?') %]" required> - - [% IF c.cobrand.allow_photo_upload %] - <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> - <label for="form_photo">[% loc('Photo') %] - [% INCLUDE 'report/public_label.html' %]</label> - - [% IF field_errors.photo %] - <p class='form-error'>[% field_errors.photo %]</p> - [% END %] - - <div id="form_photos"> - [% IF upload_fileid %] - <script> - var fixmystreet = fixmystreet || {}; - fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); - </script> - <p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p> - [% FOREACH id IN upload_fileid.split(',') %] - <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> - [% END %] - [% END %] - <input type="file" name="photo1" id="form_photo"> - <input type="file" name="photo2" id="form_photo2"> - <input type="file" name="photo3" id="form_photo3"> - </div> - [% END %] - - [% TRY %][% PROCESS 'report/new/after_photo.html' %][% CATCH file %][% END %] - - <label for="form_detail">[% loc('Description') %] [% INCLUDE 'report/public_label.html' %]</label> - [% IF field_errors.detail %] - <p class='form-error'>[% field_errors.detail %]</p> - [% END %] - <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Explain what’s wrong, exactly where it is, and how long it’s been there…') %]" required>[% report.detail | html %]</textarea> - - [% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %] - - [% IF need_to_show_category_selector %] - [% PROCESS "report/new/category_wrapper.html" %] - [% END %] - - [% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %] - - [% IF c.user_exists %] - [% PROCESS "report/new/form_user_loggedin.html" %] - [% ELSE %] - [% PROCESS "report/new/form_user_loggedout.html" %] - [% END %] - </div> - </fieldset> - - [% IF partial_token %] - <input type="hidden" name="partial" value="[% partial_token.token %]"> - [% END %] - - <input type="hidden" name="submit_problem" value="1"> -</div> +[% END %] +[% IF oauth_failure %] + <p class="form-error">[% loc('Sorry, we could not log you in. Please fill in the form below.') %]</p> +[% END %] + +[% TRY %][% PROCESS 'report/new/sidebar.html' %][% CATCH file %][% END %] + +[% INCLUDE 'errors.html' %] + +<fieldset> + <div id="problem_form"> + [% PROCESS 'report/new/form_report.html' %] + [% IF c.user_exists %] + [% PROCESS "report/new/form_user_loggedin.html" %] + [% ELSE %] + [% PROCESS "report/new/form_user_loggedout.html" %] + [% END %] + </div> +</fieldset> diff --git a/templates/web/base/report/new/form_report.html b/templates/web/base/report/new/form_report.html new file mode 100644 index 000000000..a236b6a1f --- /dev/null +++ b/templates/web/base/report/new/form_report.html @@ -0,0 +1,67 @@ +[% INCLUDE 'report/new/form_heading.html' %] + +[% IF field_errors.bodies %] + <p class='form-error'>[% field_errors.bodies %]</p> +[% END %] + +[% TRY %] + [%# Useful for amending form contents based on category selection %] + [% PROCESS 'report/new/category_at_top.html' %] + [% need_to_show_category_selector = 0 %] +[% CATCH file %] + [% need_to_show_category_selector = 1 %] +[% END %] + + <label for="form_title">[% loc('One-line summary') %] [% INCLUDE 'report/public_label.html' %]</label> +[% IF field_errors.title %] + <p class='form-error'>[% field_errors.title %]</p> +[% END %] + <input type="text" value="[% report.title | html %]" name="title" id="form_title" placeholder="[% loc('What’s the issue, and where is it?') %]" required> + +[% IF c.cobrand.allow_photo_upload %] + <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> + <label for="form_photo">[% loc('Photo') %] + [% INCLUDE 'report/public_label.html' %]</label> + + [% IF field_errors.photo %] + <p class='form-error'>[% field_errors.photo %]</p> + [% END %] + + <div id="form_photos"> + [% IF upload_fileid %] + <script> + var fixmystreet = fixmystreet || {}; + fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); + </script> + <p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p> + [% FOREACH id IN upload_fileid.split(',') %] + <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> + [% END %] + [% END %] + <input type="file" name="photo1" id="form_photo"> + <input type="file" name="photo2" id="form_photo2"> + <input type="file" name="photo3" id="form_photo3"> + </div> +[% END %] + +[% TRY %][% PROCESS 'report/new/after_photo.html' %][% CATCH file %][% END %] + + <label for="form_detail">[% loc('Description') %] [% INCLUDE 'report/public_label.html' %]</label> +[% IF field_errors.detail %] + <p class='form-error'>[% field_errors.detail %]</p> +[% END %] + <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Explain what’s wrong, exactly where it is, and how long it’s been there…') %]" required>[% report.detail | html %]</textarea> + +[% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %] + +[% IF need_to_show_category_selector %] + [% PROCESS "report/new/category_wrapper.html" %] +[% END %] + +[% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %] + +[% IF partial_token %] + <input type="hidden" name="partial" value="[% partial_token.token %]"> +[% END %] + + <input type="hidden" name="submit_problem" value="1"> diff --git a/templates/web/base/report/new/form_user_loggedout.html b/templates/web/base/report/new/form_user_loggedout.html index c5a58e8a9..6657c87a1 100644 --- a/templates/web/base/report/new/form_user_loggedout.html +++ b/templates/web/base/report/new/form_user_loggedout.html @@ -1,79 +1,25 @@ -<label for="form_email">[% loc('Your email') %] - <span class="muted">([% loc('We never show your email') %])</span> -</label> -[% IF field_errors.email %] - <p class='form-error'>[% field_errors.email %]</p> -[% END %] -<input type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" required> - -<div id="form_sign_in"> +[% IF c.config.FACEBOOK_APP_ID %] <h3>[% loc("Now to submit your report…") %]</h3> - <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2> - - <div id="form_sign_in_yes" class="form-box"> - - <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> - - <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label> - [% IF field_errors.password %] - <p class='form-error'>[% field_errors.password %]</p> - [% END %] - <div class="form-txt-submit-box"> - <input type="password" name="password_sign_in" id="password_sign_in" placeholder="[% loc('Your password') %]" value=""> - <input class="green-btn" type="submit" id="submit_sign_in" name="submit_sign_in" value="[% loc('Submit') %]"> - </div> - - <div class="checkbox-group"> - <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> - <label class="n inline" for="remember_me">[% loc('Keep me signed in on this computer') %]</label> - </div> - - <div class="general-notes"> - <p><strong>[% loc('Forgotten your password?') %]</strong> - [% loc('Confirm by email below, providing a new password at that point. When you confirm, your password will be updated.') %]</p> - </div> + <div class="form-box"> + <button name="facebook_sign_in" id="facebook_sign_in" value="facebook_sign_in" class="btn btn--block btn--social btn--facebook"> + <img alt="" src="/i/facebook-icon-32.png" width="17" height="32"> + Log in with Facebook + </button> </div> + <div id="js-social-email-hide"> + [% PROCESS 'report/new/form_user_loggedout_email.html' required = 0 %] +[% ELSE %] + [% PROCESS 'report/new/form_user_loggedout_email.html' required = 1 %] + <h3>[% loc("Now to submit your report…") %]</h3> +[% END %] - <div id="form_sign_in_no" class="form-box"> - <h5>[% loc('<strong>No</strong> Let me confirm my report by email') %]</h5> - - [% INCLUDE 'report/new/extra_name.html' %] - - [% name_public = report.anonymous==0 OR (c.cobrand.default_show_name AND report.anonymous=='') %] - <label for="form_name">[% loc('Name') %] - [% TRY %] - [% INCLUDE 'report/new/after_name.html' %] - [% CATCH file %] - [% END %] - </label> - [% IF field_errors.name %] - <p class='form-error'>[% field_errors.name %]</p> - [% END %] - - <input type="text" class="form-focus-trigger validName" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]"> - - [%# if there is nothing in the name field then set check box as default on form %] - <div class="checkbox-group"> - <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]> - <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> - </div> - - <label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label> - <input class="form-focus-hidden" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]"> - <div class="general-notes form-focus-hidden"> - <p>[% loc('We never show your email address or phone number.') %]</p> - </div> - - <label class="form-focus-hidden" for="password_register">[% loc('Password (optional)') %]</label> - - <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 id="form_sign_in"> + <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2> + [% PROCESS 'report/new/form_user_loggedout_password.html' %] + [% PROCESS 'report/new/form_user_loggedout_by_email.html' %] +</div> - <div class="form-txt-submit-box form-focus-hidden"> - <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> - <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]"> - </div> +[% IF c.config.FACEBOOK_APP_ID %] </div> -</div> +[% END %] 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 new file mode 100644 index 000000000..a3e36dfa3 --- /dev/null +++ b/templates/web/base/report/new/form_user_loggedout_by_email.html @@ -0,0 +1,41 @@ +<div id="form_sign_in_no" class="form-box"> + <h5>[% loc('<strong>No</strong> Let me confirm my report by email') %]</h5> + + [% INCLUDE 'report/new/extra_name.html' %] + + [% name_public = report.anonymous==0 OR (c.cobrand.default_show_name AND report.anonymous=='') %] + <label for="form_name">[% loc('Name') %] + [% TRY %] + [% INCLUDE 'report/new/after_name.html' %] + [% CATCH file %] + [% END %] + </label> + [% IF field_errors.name %] + <p class='form-error'>[% field_errors.name %]</p> + [% END %] + + <input type="text" class="form-focus-trigger validName" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]"> + + [%# if there is nothing in the name field then set check box as default on form %] + <div class="checkbox-group"> + <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]> + <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> + </div> + + <label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label> + <input class="form-focus-hidden" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]"> + <div class="general-notes form-focus-hidden"> + <p>[% loc('We never show your email address or phone number.') %]</p> + </div> + + <label class="form-focus-hidden" for="password_register">[% loc('Password (optional)') %]</label> + + <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 type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> + <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]"> + </div> +</div> diff --git a/templates/web/base/report/new/form_user_loggedout_email.html b/templates/web/base/report/new/form_user_loggedout_email.html new file mode 100644 index 000000000..4f816f8cc --- /dev/null +++ b/templates/web/base/report/new/form_user_loggedout_email.html @@ -0,0 +1,9 @@ +<label for="form_email">[% loc('Your email') %] + <span class="muted">([% loc('We never show your email') %])</span> +</label> +[% IF field_errors.email %] + <p class='form-error'>[% field_errors.email %]</p> +[% END %] +<input type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" + [% IF required %]required[% END %] + class="required"> diff --git a/templates/web/base/report/new/form_user_loggedout_password.html b/templates/web/base/report/new/form_user_loggedout_password.html new file mode 100644 index 000000000..c9d65e43e --- /dev/null +++ b/templates/web/base/report/new/form_user_loggedout_password.html @@ -0,0 +1,24 @@ +<div id="form_sign_in_yes" class="form-box"> + + <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> + + <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label> + [% IF field_errors.password %] + <p class='form-error'>[% field_errors.password %]</p> + [% END %] + <div class="form-txt-submit-box"> + <input type="password" name="password_sign_in" id="password_sign_in" placeholder="[% loc('Your password') %]" value=""> + <input class="green-btn" type="submit" id="submit_sign_in" name="submit_sign_in" value="[% loc('Submit') %]"> + </div> + + <div class="checkbox-group"> + <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> + <label class="n inline" for="remember_me">[% loc('Keep me signed in on this computer') %]</label> + </div> + + <div class="general-notes"> + <p><strong>[% loc('Forgotten your password?') %]</strong> + [% loc('Confirm by email instead, providing a new password at that point. When you confirm, your password will be updated.') %]</p> + </div> + +</div> diff --git a/templates/web/base/report/new/login_success_form.html b/templates/web/base/report/new/login_success_form.html new file mode 100644 index 000000000..45d0221a7 --- /dev/null +++ b/templates/web/base/report/new/login_success_form.html @@ -0,0 +1,18 @@ +<h1>[% loc('Report your problem') %]</h1> + +<p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p> + +[% TRY %][% PROCESS 'report/new/sidebar.html' %][% CATCH file %][% END %] + +[% INCLUDE 'errors.html' %] + +<fieldset> + <div id="problem_form"> + [% IF c.user_exists %] + [% PROCESS "report/new/form_user_loggedin.html" %] + [% ELSE %] + [% PROCESS "report/new/form_user_loggedout.html" %] + [% END %] + [% PROCESS 'report/new/form_report.html' %] + </div> +</fieldset> diff --git a/templates/web/base/report/new/oauth_email_form.html b/templates/web/base/report/new/oauth_email_form.html new file mode 100644 index 000000000..c897aaeea --- /dev/null +++ b/templates/web/base/report/new/oauth_email_form.html @@ -0,0 +1,26 @@ +<h1>[% loc('Report your problem') %]</h1> + +<p class="form-error"> + [% loc('Please note your report has <strong>not yet been sent</strong>.') %] + [% loc('We need your email address, please give it below.') %] +</p> + +[% TRY %][% PROCESS 'report/new/sidebar.html' %][% CATCH file %][% END %] + +[% INCLUDE 'errors.html' %] + +<fieldset> + <div id="problem_form"> + [% PROCESS 'report/new/form_user_loggedout_email.html' required=1 %] + + <div id="form_sign_in"> + <h3>[% loc("Now to submit your report…") %]</h3> + <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2> + [% PROCESS 'report/new/form_user_loggedout_by_email.html' %] + [% PROCESS 'report/new/form_user_loggedout_password.html' %] + </div> + + <input type="hidden" name="oauth_need_email" value="1"> + [% PROCESS 'report/new/form_report.html' %] + </div> +</fieldset> diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html index adf1130bf..3e0ac890b 100644 --- a/templates/web/base/report/update-form.html +++ b/templates/web/base/report/update-form.html @@ -1,6 +1,8 @@ [% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %] -[% IF allow_creation %] +[% RETURN IF NOT allow_creation %] + <div id="update_form"> + [% IF NOT login_success AND NOT oauth_need_email %] <h2>[% loc( 'Provide an update') %]</h2> [% IF c.cobrand.moniker != 'emptyhomes' AND c.cobrand.moniker != 'stevenage' %] @@ -8,157 +10,33 @@ [% INCLUDE 'report/updates-sidebar-notes.html' %] </div> [% END %] + [% END %] [% INCLUDE 'errors.html' %] <form method="post" action="[% c.uri_for( '/report/update' ) %]" id="form_update_form" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> <fieldset> - <input type="hidden" name="submit_update" value="1"> - <input type="hidden" name="id" value="[% problem.id | html %]"> - - [% IF c.cobrand.allow_photo_upload %] - <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> - <label for="form_photo">[% loc('Photo') %]</label> - - [% IF field_errors.photo %] - <p class='form-error'>[% field_errors.photo %]</p> - [% END %] - - <div id="form_photos"> - [% IF upload_fileid %] - <script> - var fixmystreet = fixmystreet || {}; - fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); - </script> - <p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p> - [% FOREACH id IN upload_fileid.split(',') %] - <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> - [% END %] - [% END %] - <input type="file" name="photo1" id="form_photo"> - <input type="file" name="photo2" id="form_photo2"> - <input type="file" name="photo3" id="form_photo3"> - </div> - [% END %] - - <label for="form_update">[% loc( 'Update' ) %]</label> - [% IF field_errors.update %] - <div class='form-error'>[% field_errors.update %]</div> - [% END %] - <textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea> - - [% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %] - <label for="form_state">[% loc( 'State' ) %]</label> - <select name="state" id="form_state"> - [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating', - loc('Investigating')], ['action scheduled', loc('Action Scheduled')], - ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')], - ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')], - ['fixed', loc('Fixed')] ] %] - <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option> - [% END %] - </select> - [% ELSE %] - [% IF problem.is_fixed AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %] - - <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]> - <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label> - - [% ELSIF !problem.is_fixed %] - - <div class="checkbox-group"> - <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]> - <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label> - </div> - - [% END %] - [% END %] - - [% IF c.user_exists %] - - [% INCLUDE name %] - - <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]"> - - - [% ELSE %] - - <label for="form_rznvy">[% loc('Your email' ) %] - <span class="muted">([% loc('We never show your email') %])</span> - </label> - [% IF field_errors.email %] - <p class='form-error'>[% field_errors.email %]</p> - [% END %] - <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required> - + [% IF NOT login_success AND NOT oauth_need_email %] + [% INCLUDE 'report/update/form_update.html' %] + [% END %] + [% IF c.user_exists %] + [% INCLUDE 'report/update/form_name.html' %] + <div class="cf"><input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]"></div> + [% ELSIF oauth_need_email %] + [% INCLUDE 'report/update/form_user_loggedout_email.html' required = 1 %] <div id="form_sign_in"> <h3>[% loc("Now to submit your update…") %]</h3> <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2> - - <div id="form_sign_in_yes" class="form-box"> - <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> - - <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label> - [% IF field_errors.password %] - <p class='form-error'>[% field_errors.password %]</p> - [% END %] - <div class="form-txt-submit-box"> - <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]"> - <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]"> - </div> - - <div class="checkbox-group"> - <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> - <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label> - </div> - - <div class="general-notes"> - <p><strong>[% loc('Forgotten your password?') %]</strong> - [% loc('Confirm by email below, providing a new password at that point. When you confirm, your password will be updated.') %]</p> - </div> - - </div> - <div id="form_sign_in_no" class="form-box"> - <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5> - - [% INCLUDE name %] - - <label for="password_register">[% loc('Password (optional)') %]</label> - - <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" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> - <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]"> - </div> - - </div> + [% INCLUDE 'report/update/form_user_loggedout_by_email.html' %] + [% INCLUDE 'report/update/form_user_loggedout_password.html' %] + <input type="hidden" name="oauth_need_email" value="1"> </div> - - [% END %] + [% ELSE %] + [% INCLUDE 'report/update/form_user_loggedout.html' %] + [% END %] + [% IF login_success OR oauth_need_email %] + [% INCLUDE 'report/update/form_update.html' %] + [% END %] </fieldset> </form> </div> -[% END %] - -[% BLOCK name %] - [% INCLUDE 'report/new/extra_name.html' %] - <label for="form_name">[% loc('Name') %]</label> - [% IF field_errors.name %] - <p class='form-error'>[% field_errors.name %]</p> - [% END %] - <input type="text" - [%- IF c.cobrand.moniker.match('fixmystreet|bromley') AND problem.bodies_str == '2482' %]class="validName" [% END -%] - name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]"> - - <div class="checkbox-group"> - <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF update.anonymous==0 OR (c.cobrand.default_show_name AND update.anonymous=='') %]> - <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> - </div> - <div class="checkbox-group"> - <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]> - <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label> - </div> -[% END %] diff --git a/templates/web/base/report/update/form_name.html b/templates/web/base/report/update/form_name.html new file mode 100644 index 000000000..8311922e3 --- /dev/null +++ b/templates/web/base/report/update/form_name.html @@ -0,0 +1,21 @@ +[% INCLUDE 'report/new/extra_name.html' %] + +[% name_public = update.anonymous==0 OR (c.cobrand.default_show_name AND update.anonymous=='') %] +<label for="form_name">[% loc('Name') %]</label> +[% IF field_errors.name %] + <p class='form-error'>[% field_errors.name %]</p> +[% END %] + +<input type="text" + [%- IF c.cobrand.moniker.match('fixmystreet|bromley') AND problem.bodies_str == '2482' %]class="validName" [% END -%] + name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]"> + +<div class="checkbox-group"> + <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]> + <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> +</div> + +<div class="checkbox-group"> + <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]> + <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label> +</div> diff --git a/templates/web/base/report/update/form_update.html b/templates/web/base/report/update/form_update.html new file mode 100644 index 000000000..3a46694cf --- /dev/null +++ b/templates/web/base/report/update/form_update.html @@ -0,0 +1,60 @@ +<input type="hidden" name="submit_update" value="1"> +<input type="hidden" name="id" value="[% problem.id | html %]"> + +[% IF c.cobrand.allow_photo_upload %] + <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> + <label for="form_photo">[% loc('Photo') %]</label> + + [% IF field_errors.photo %] + <p class='form-error'>[% field_errors.photo %]</p> + [% END %] + + <div id="form_photos"> + [% IF upload_fileid %] + <script> + var fixmystreet = fixmystreet || {}; + fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); + </script> + <p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p> + [% FOREACH id IN upload_fileid.split(',') %] + <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> + [% END %] + [% END %] + <input type="file" name="photo1" id="form_photo"> + <input type="file" name="photo2" id="form_photo2"> + <input type="file" name="photo3" id="form_photo3"> + </div> +[% END %] + +<label for="form_update">[% loc( 'Update' ) %]</label> +[% IF field_errors.update %] + <div class='form-error'>[% field_errors.update %]</div> +[% END %] +<textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea> + +[% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %] + <label for="form_state">[% loc( 'State' ) %]</label> + <select name="state" id="form_state"> + [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating', + loc('Investigating')], ['action scheduled', loc('Action Scheduled')], + ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')], + ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')], + ['fixed', loc('Fixed')] ] %] + <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option> + [% END %] + </select> +[% ELSE %] + [% IF problem.is_fixed AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %] + + <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]> + <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label> + + [% ELSIF !problem.is_fixed %] + + <div class="checkbox-group"> + <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]> + <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label> + </div> + + [% END %] +[% END %] diff --git a/templates/web/base/report/update/form_user_loggedout.html b/templates/web/base/report/update/form_user_loggedout.html new file mode 100644 index 000000000..4176633f1 --- /dev/null +++ b/templates/web/base/report/update/form_user_loggedout.html @@ -0,0 +1,24 @@ +[% IF c.config.FACEBOOK_APP_ID %] + <h3>[% loc("Now to submit your update…") %]</h3> + <div class="form-box"> + <button name="facebook_sign_in" id="facebook_sign_in" value="facebook_sign_in" class="btn btn--block btn--social btn--facebook"> + <img alt="" src="/i/facebook-icon-32.png" width="17" height="32"> + Log in with Facebook + </button> + </div> + <div id="js-social-email-hide"> + [% INCLUDE 'report/update/form_user_loggedout_email.html' required=0 %] +[% ELSE %] + [% INCLUDE 'report/update/form_user_loggedout_email.html' required=1 %] + <h3>[% loc("Now to submit your update…") %]</h3> +[% END %] + +<div id="form_sign_in"> + <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2> + [% INCLUDE 'report/update/form_user_loggedout_password.html' %] + [% INCLUDE 'report/update/form_user_loggedout_by_email.html' %] +</div> + +[% IF c.config.FACEBOOK_APP_ID %] + </div> +[% END %] 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 new file mode 100644 index 000000000..672f76ed9 --- /dev/null +++ b/templates/web/base/report/update/form_user_loggedout_by_email.html @@ -0,0 +1,17 @@ +<div id="form_sign_in_no" class="form-box"> + <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5> + + [% INCLUDE 'report/update/form_name.html' %] + + <label for="password_register">[% loc('Password (optional)') %]</label> + + <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" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> + <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]"> + </div> + +</div> diff --git a/templates/web/base/report/update/form_user_loggedout_email.html b/templates/web/base/report/update/form_user_loggedout_email.html new file mode 100644 index 000000000..95a3b5578 --- /dev/null +++ b/templates/web/base/report/update/form_user_loggedout_email.html @@ -0,0 +1,9 @@ +<label for="form_rznvy">[% loc('Your email' ) %] +<span class="muted">([% loc('We never show your email') %])</span> +</label> +[% IF field_errors.email %] + <p class='form-error'>[% field_errors.email %]</p> +[% END %] +<input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" + [% IF required %]required[% END %] + class="required"> diff --git a/templates/web/base/report/update/form_user_loggedout_password.html b/templates/web/base/report/update/form_user_loggedout_password.html new file mode 100644 index 000000000..cd4433c47 --- /dev/null +++ b/templates/web/base/report/update/form_user_loggedout_password.html @@ -0,0 +1,23 @@ +<div id="form_sign_in_yes" class="form-box"> + <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> + + <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label> + [% IF field_errors.password %] + <p class='form-error'>[% field_errors.password %]</p> + [% END %] + <div class="form-txt-submit-box"> + <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]"> + <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]"> + </div> + + <div class="checkbox-group"> + <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> + <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label> + </div> + + <div class="general-notes"> + <p><strong>[% loc('Forgotten your password?') %]</strong> + [% loc('Confirm by email below, providing a new password at that point. When you confirm, your password will be updated.') %]</p> + </div> + +</div> |