diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-10-18 15:32:44 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-12-04 18:05:01 +0000 |
commit | 34ed0ace89eba2ad31c57f63d226edc6bf78d7f6 (patch) | |
tree | 44364e988232cfc6428ad8dbbcacd03cedb67fad /templates | |
parent | 580f66bd3e92a4649e98c42a736ccdaddcd6449e (diff) |
Tweak update templates to better match reporting.
Remove update/form_name.html template.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/base/report/update-form.html | 3 | ||||
-rw-r--r-- | templates/web/base/report/update/form_user_loggedin.html (renamed from templates/web/base/report/update/form_name.html) | 11 | ||||
-rw-r--r-- | templates/web/base/report/update/form_user_loggedout_by_email.html | 10 | ||||
-rw-r--r-- | templates/web/base/report/update/form_user_name.html | 7 | ||||
-rw-r--r-- | templates/web/bromley/report/update-form.html | 3 | ||||
-rw-r--r-- | templates/web/bromley/report/update/form_name.html | 29 | ||||
-rw-r--r-- | templates/web/bromley/report/update/form_user_loggedout_by_email.html | 10 | ||||
-rw-r--r-- | templates/web/bromley/report/update/form_user_name.html | 19 |
8 files changed, 49 insertions, 43 deletions
diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html index a68ce117f..65262cd30 100644 --- a/templates/web/base/report/update-form.html +++ b/templates/web/base/report/update-form.html @@ -25,8 +25,7 @@ [% INCLUDE 'report/update/form_update.html' %] [% END %] [% IF c.user_exists %] - [% INCLUDE 'report/update/form_name.html' %] - <div class="clearfix"><input class="final-submit green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]"></div> + [% PROCESS "report/update/form_user_loggedin.html" %] [% ELSIF oauth_need_email %] [% INCLUDE 'report/update/form_user_loggedout_email.html' required = 1 %] <div id="form_sign_in"> diff --git a/templates/web/base/report/update/form_name.html b/templates/web/base/report/update/form_user_loggedin.html index fa6595d74..928cabbe9 100644 --- a/templates/web/base/report/update/form_name.html +++ b/templates/web/base/report/update/form_user_loggedin.html @@ -24,17 +24,12 @@ <input class="form-control" name="username" id="form_username" type="text" value="[% c.user.email | html %]"> [% END %] -<label for="form_name">[% loc('Your name') %]</label> -[% IF field_errors.name %] - <p class='form-error'>[% field_errors.name %]</p> -[% END %] - -<input type="text" class="form-control validNameU js-form-name" - name="name" id="form_name" value="[% update.name || c.user.name | html %]"> - +[% INCLUDE 'report/update/form_user_name.html' %] [% INCLUDE 'report/_show_name_label.html' %] <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> + +<div class="clearfix"><input class="final-submit green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]"></div> 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 63e6e3e4f..d97a6affb 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 @@ -5,7 +5,15 @@ <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5> [% END %] - [% INCLUDE 'report/update/form_name.html' %] + [% INCLUDE 'report/new/extra_name.html' %] + [% PROCESS 'user/_anonymity.html' anonymous = update.anonymous %] + [% INCLUDE 'report/update/form_user_name.html' %] + [% INCLUDE 'report/_show_name_label.html' %] + + <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> <label for="password_register">[% loc('Password (optional)') %]</label> [% IF field_errors.password_register %] diff --git a/templates/web/base/report/update/form_user_name.html b/templates/web/base/report/update/form_user_name.html new file mode 100644 index 000000000..577f8de69 --- /dev/null +++ b/templates/web/base/report/update/form_user_name.html @@ -0,0 +1,7 @@ +<label for="form_name">[% loc('Your name') %]</label> +[% IF field_errors.name %] + <p class='form-error'>[% field_errors.name %]</p> +[% END %] + +<input type="text" class="form-control validNameU js-form-name" + name="name" id="form_name" value="[% update.name || c.user.name | html %]"> diff --git a/templates/web/bromley/report/update-form.html b/templates/web/bromley/report/update-form.html index 6c3ca9298..0222ec2a4 100644 --- a/templates/web/bromley/report/update-form.html +++ b/templates/web/bromley/report/update-form.html @@ -15,8 +15,7 @@ [% INCLUDE 'report/update/form_update.html' %] [% END %] [% IF c.user_exists %] - [% INCLUDE 'report/update/form_name.html' %] - <div class="clearfix"><input class="final-submit green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]"></div> + [% PROCESS 'report/update/form_user_loggedin.html' %] [% ELSIF oauth_need_email %] [% INCLUDE 'report/update/form_user_loggedout_email.html' required = 1 %] <div id="form_sign_in"> diff --git a/templates/web/bromley/report/update/form_name.html b/templates/web/bromley/report/update/form_name.html deleted file mode 100644 index 07166a431..000000000 --- a/templates/web/bromley/report/update/form_name.html +++ /dev/null @@ -1,29 +0,0 @@ -[% INCLUDE 'report/new/extra_name.html' %] - -[% PROCESS 'user/_anonymity.html' anonymous = update.anonymous %] - -[% IF c.user_exists %] - [% names = c.user.split_name %] -[% END %] - -<label for="form_first_name">[% loc('First Name') %]</label> -[% IF field_errors.first_name %] - <p class='form-error'>[% field_errors.first_name %]</p> -[% END %] -<input class="js-form-name form-control" type="text" value="[% names.first || first_name | html %]" name="first_name" id="form_first_name"> - -<label for="form_last_name">[% loc('Last Name') %]</label> -[% IF field_errors.last_name %] - <p class='form-error'>[% field_errors.last_name %]</p> -[% END %] -<input class="js-form-name form-control" type="text" value="[% names.last || last_name | html %]" name="last_name" id="form_last_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/bromley/report/update/form_user_loggedout_by_email.html b/templates/web/bromley/report/update/form_user_loggedout_by_email.html index b70749d87..e19013f3b 100644 --- a/templates/web/bromley/report/update/form_user_loggedout_by_email.html +++ b/templates/web/bromley/report/update/form_user_loggedout_by_email.html @@ -1,7 +1,15 @@ <div id="form_sign_in_no" class="form-box"> <h5>Confirm my report by email</h5> - [% INCLUDE 'report/update/form_name.html' %] + [% INCLUDE 'report/new/extra_name.html' %] + [% PROCESS 'user/_anonymity.html' anonymous = update.anonymous %] + [% INCLUDE 'report/update/form_user_name.html' %] + [% INCLUDE 'report/_show_name_label.html' %] + + <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> <label for="password_register">[% loc('Password (optional)') %]</label> [% IF field_errors.password_register %] diff --git a/templates/web/bromley/report/update/form_user_name.html b/templates/web/bromley/report/update/form_user_name.html new file mode 100644 index 000000000..93b103cc9 --- /dev/null +++ b/templates/web/bromley/report/update/form_user_name.html @@ -0,0 +1,19 @@ +[% IF c.user_exists %] + [% names = c.user.split_name %] +[% END %] + +<label for="form_first_name">[% loc('First Name') %]</label> +[% IF field_errors.first_name %] + <p class='form-error'>[% field_errors.first_name %]</p> +[% END %] +<input class="js-form-name form-control" type="text" + name="first_name" id="form_first_name" + value="[% first_name || names.first | html %]"> + +<label for="form_last_name">[% loc('Last Name') %]</label> +[% IF field_errors.last_name %] + <p class='form-error'>[% field_errors.last_name %]</p> +[% END %] +<input class="js-form-name form-control" type="text" + name="last_name" id="form_last_name" + value="[% last_name || names.last | html %]"> |