diff options
Diffstat (limited to 'templates/web/base')
-rw-r--r-- | templates/web/base/report/new/fill_in_details_form.html | 252 | ||||
-rw-r--r-- | templates/web/base/report/new/form_user_loggedin.html | 38 | ||||
-rw-r--r-- | templates/web/base/report/new/form_user_loggedout.html | 79 | ||||
-rw-r--r-- | templates/web/base/report/new/sidebar.html | 14 | ||||
-rw-r--r-- | templates/web/base/report/public_label.html | 1 |
5 files changed, 207 insertions, 177 deletions
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 ee219d563..82b1097b7 100644 --- a/templates/web/base/report/new/fill_in_details_form.html +++ b/templates/web/base/report/new/fill_in_details_form.html @@ -1,203 +1,101 @@ -<h1>[% loc('Report your problem') %]</h1> +<div id="report-a-problem-main"> + <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 %] - -[% IF 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 %] - -[% IF js %] - <p id="councils_text">[% - tprintf( - loc('All the information you provide here will be sent to <strong>%s</strong>.'), - loc('the local council') - ); - %] - [% loc('The summary and description will also be made public (see our <a href="/privacy">privacy policy</a>).') %] + [% END %] + + [% IF js %] + <p id="councils_text"> + [% tprintf( + loc('All the information you provide here will be sent to <strong>%s</strong>.'), + loc('the local council') + ); %] + [% 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 %] - -<p> -[% IF report.used_map %] - [% INCLUDE 'report/new/fill_in_details_text.html' %] -[% ELSE %] - [% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %] -[% END %] -</p> - -[% INCLUDE 'errors.html' %] - -<div id="problem_form"> - -[% INCLUDE 'report/new/form_heading.html' %] - -<div class="fieldset"> - - - + [% ELSE %] + [% PROCESS 'report/new/councils_text.html' %] + [% END %] + [% 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 %] -[% IF field_errors.bodies %] - <div class='form-error'>[% field_errors.bodies %]</div> -[% END %] - -[% IF field_errors.title %] - <div class='form-error'>[% field_errors.title %]</div> -[% END %] - -<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" required> -</div> - -[% IF field_errors.detail %] - <div class='form-error'>[% field_errors.detail %]</div> -[% END %] - -<div class="form-field"> - <label for="form_detail">[% loc('Details:') %]</label> - <textarea name="detail" id="form_detail" rows="7" cols="26" required>[% report.detail | html %]</textarea> -</div> - -[% PROCESS "report/new/category_wrapper.html" %] - -[% IF c.cobrand.allow_photo_upload %] - [% IF field_errors.photo %] - <div class='form-error'>[% field_errors.photo %]</div> - [% END %] - - <div class='form-field'> - [% IF upload_fileid || report.photo %] - <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p> - [% IF upload_fileid %] - <input type="hidden" name="upload_fileid" value="[% upload_fileid %]" /> - [% END %] - [% IF report.photo %] - <img align="right" src="/photo/[% report.id %].jpeg" hspace="5"> - [% END %] - [% END %] - - <label for="form_photo">[% loc('Photo:') %]</label> - <input type="file" name="photo" id="form_photo" style="width:20em"> - </div> -[% END %] - -[% IF c.user_exists %] - - [% INCLUDE name_phone %] - - [% INCLUDE 'report/new/notes.html' %] - - <p id="problem_submit"> - <input type="submit" value="[% loc('Submit') %]"> - </p> - -[% ELSE %] - - [% IF field_errors.email %] - <div class='form-error'>[% field_errors.email %]</div> - [% END %] + [% TRY %][% PROCESS 'report/new/sidebar.html' %][% CATCH file %][% END %] - <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" required> - </div> + [% INCLUDE 'errors.html' %] -[% INCLUDE 'report/new/notes.html' %] + <fieldset> + <div id="problem_form"> -<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> + [% INCLUDE 'report/new/form_heading.html' %] - <div id="form_sign_in_yes"> + [% IF field_errors.bodies %] + <p class='form-error'>[% field_errors.bodies %]</p> + [% END %] - [% IF field_errors.password %] - <div class='form-error'>[% field_errors.password %]</div> - [% 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 %] - <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"> - </div> + <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> - <div class="fieldset"> + <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> - <p> - <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> - <label class="n" for="remember_me"> - [% loc('Keep me signed in on this computer') %] - </label> - </p> + [% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %] - <p> - <input type="submit" id="submit_sign_in" name="submit_sign_in" value="[% loc('Submit') %]"> - </p> - - </div> + [% IF need_to_show_category_selector %] + [% PROCESS "report/new/category_wrapper.html" %] + [% END %] - </div> - <div id="form_sign_in_no"> + [% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %] - <p>[% loc('<strong>No</strong>, let me confirm my report by email:') %]</p> + [% IF c.cobrand.allow_photo_upload %] + <label for="form_photo">[% loc('Photo') %]</label> + [% IF upload_fileid || report.photo %] + [% IF upload_fileid %] + <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt=""> + <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> + [% END %] - <div class="fieldset"> + <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p> - [% INCLUDE name_phone %] + [% IF report.photo %] + <img align="right" src="/photo/[% report.id %].jpeg"> + [% END %] + [% END %] - <div class="form-field"> - <label for="password_register">[% loc('Enter a new password:') %]</label> - <input type="password" name="password_register" id="password_register" value="" size="25"> - </div> + [% IF field_errors.photo %] + <p class='form-error'>[% field_errors.photo %]</p> + [% END %] + <input type="file" name="photo" id="form_photo"> + [% END %] - <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" id="submit_register" name="submit_register" value="[% loc('Submit') %]"> - </p> + [% TRY %][% PROCESS 'report/new/after_photo.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> - </div> - -</div> - -[% END %] - -[% IF partial_token %] + [% IF partial_token %] <input type="hidden" name="partial" value="[% partial_token.token %]"> -[% END %] - -<input type="hidden" name="submit_problem" value="1"> + [% END %] + <input type="hidden" name="submit_problem" value="1"> </div> -</div> - - -[% BLOCK name_phone %] - [% IF field_errors.name %] - <div class='form-error'>[% field_errors.name %]</div> - [% END %] - - <div class="form-field"> - <label for="form_name">[% loc('Your name:') %]</label> - <input type="text" class="validName" value="[% report.name | html %]" name="name" id="form_name" size="25"> - </div> - - <div class="checkbox"> - [%# if there is nothing in the name field then set check box as default on form %] - <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF report.anonymous==0 OR (c.cobrand.default_show_name AND report.anonymous=='') %]> - <label for="form_may_show_name">[% loc('Show my name publicly') %]</label> - <br><small>[% loc('(we never show your email address or phone number)') %]</small> - </div> - - <div> - <label for="form_phone">[% loc('Phone:') %]</label> - <input type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" size="15"> - <small>[% loc('(optional)') %]</small> - </div> -[% END %] - diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html new file mode 100644 index 000000000..848d331d4 --- /dev/null +++ b/templates/web/base/report/new/form_user_loggedin.html @@ -0,0 +1,38 @@ +<div class="form-box" id="form-box--logged-in-name"> + + <label for="form_email">[% loc('Your email') %]</label> + <input disabled type="text" value="[% c.user.email | html %]"> + + [% 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="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 for="form_phone">[% loc('Phone number (optional)') %]</label> + <input class="" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]"> + + [% IF c.cobrand.moniker != 'fixmybarangay' || c.user.from_body %] + <div class="general-notes"> + <p>[% loc('We never show your email address or phone number.') %]</p> + </div> + [% END %] + + <div class="form-txt-submit-box"> + <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.html b/templates/web/base/report/new/form_user_loggedout.html new file mode 100644 index 000000000..c5a58e8a9 --- /dev/null +++ b/templates/web/base/report/new/form_user_loggedout.html @@ -0,0 +1,79 @@ +<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"> + <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> + + <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> +</div> diff --git a/templates/web/base/report/new/sidebar.html b/templates/web/base/report/new/sidebar.html new file mode 100644 index 000000000..083c7db70 --- /dev/null +++ b/templates/web/base/report/new/sidebar.html @@ -0,0 +1,14 @@ +<div id="report-a-problem-sidebar"> + <div class="sidebar-tips"> + <p> + [% IF report.used_map %] + [% INCLUDE 'report/new/fill_in_details_text.html' %] + [% ELSE %] + [% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %] + [% END %] + </p> + </div> + <div class="sidebar-notes"> + [% INCLUDE 'report/new/notes.html' %] + </div> +</div> diff --git a/templates/web/base/report/public_label.html b/templates/web/base/report/public_label.html new file mode 100644 index 000000000..2e00a79d2 --- /dev/null +++ b/templates/web/base/report/public_label.html @@ -0,0 +1 @@ +<span class="muted label-warning public-warning">[% loc('(public)') %]</span> |