diff options
4 files changed, 8 insertions, 14 deletions
diff --git a/templates/web/base/report/_show_name_label.html b/templates/web/base/report/_show_name_label.html new file mode 100644 index 000000000..1e62b5fc0 --- /dev/null +++ b/templates/web/base/report/_show_name_label.html @@ -0,0 +1,5 @@ +[%# 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> diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html index efe19864c..b82be3202 100644 --- a/templates/web/base/report/new/form_user_loggedin.html +++ b/templates/web/base/report/new/form_user_loggedin.html @@ -57,11 +57,7 @@ [% END %] <input type="text" class="form-control validName js-form-name" value="[% report.name | html %]" name="name" id="form_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> + [% INCLUDE 'report/_show_name_label.html' %] [% IF NOT c.user.phone_verified AND NOT c.cobrand.call_hook('disable_phone_number_entry') %] <label for="form_phone">[% loc('Phone number (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 334bb0552..6ec0278ce 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 @@ -20,11 +20,7 @@ <input type="text" class="form-control form-focus-trigger validName js-form-name" 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> + [% INCLUDE 'report/_show_name_label.html' %] [% UNLESS c.cobrand.call_hook('disable_phone_number_entry') %] <div id="js-hide-if-username-phone"> diff --git a/templates/web/base/report/update/form_name.html b/templates/web/base/report/update/form_name.html index f366895a5..218ce4149 100644 --- a/templates/web/base/report/update/form_name.html +++ b/templates/web/base/report/update/form_name.html @@ -32,10 +32,7 @@ <input type="text" class="form-control validNameU js-form-name" 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> +[% 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 %]> |