aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/email/default/other-reported.html30
-rw-r--r--templates/email/default/other-reported.txt27
-rw-r--r--templates/email/default/other-updated.html26
-rw-r--r--templates/email/default/other-updated.txt16
-rw-r--r--templates/web/base/report/new/form_user_loggedin.html30
-rw-r--r--templates/web/base/report/update/form_name.html18
6 files changed, 143 insertions, 4 deletions
diff --git a/templates/email/default/other-reported.html b/templates/email/default/other-reported.html
new file mode 100644
index 000000000..5435e735a
--- /dev/null
+++ b/templates/email/default/other-reported.html
@@ -0,0 +1,30 @@
+[%
+
+email_summary = "Thanks for logging your report";
+email_columns = 2;
+
+PROCESS '_email_settings.html';
+INCLUDE '_email_top.html';
+
+%]
+
+<th style="[% td_style %][% primary_column_style %]" id="primary_column">
+ [% start_padded_box %]
+ <h1 style="[% h1_style %]">Your report has been&nbsp;logged</h1>
+ <p style="[% p_style %]">Your report to [% report.body %] has been logged on [% site_name %].
+[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
+Please note that [% c.cobrand.council_name %] is not responsible for this type
+of report, so it will instead be sent to [% report.body %].
+[% END %]
+ </p>
+ <p style="margin: 20px auto; text-align: center">
+ <a style="[% button_style %]" href="[% cobrand.base_url_for_report(report) %][% report.url %]">View my report</a>
+ </p>
+ [% end_padded_box %]
+</th>
+[% WRAPPER '_email_sidebar.html' object = report %]
+ <h2 style="[% h2_style %]">[% report.title | html %]</h2>
+ <p style="[% secondary_p_style %]">[% report.detail | html %]</p>
+[% END %]
+
+[% INCLUDE '_email_bottom.html' %]
diff --git a/templates/email/default/other-reported.txt b/templates/email/default/other-reported.txt
new file mode 100644
index 000000000..b626e56d9
--- /dev/null
+++ b/templates/email/default/other-reported.txt
@@ -0,0 +1,27 @@
+Subject: Your report has been logged: [% report.title %]
+
+Hello [% report.name %],
+
+Your report to [% report.body %] has been logged on [% site_name %].
+
+[% IF c.cobrand.is_council && !c.cobrand.owns_problem( report ) %]
+Please note that [% c.cobrand.council_name %] is not responsible for this type
+of report, so it will instead be sent to [% report.body %].
+[% END %]
+
+It is available to view at:
+
+[% cobrand.base_url_for_report(report) %][% report.url %]
+
+Your report has the title:
+
+[% report.title %]
+
+And details:
+
+[% report.detail %]
+
+[% INCLUDE 'signature.txt' %]
+
+This email was sent automatically, from an unmonitored email account - so
+please do not reply to it.
diff --git a/templates/email/default/other-updated.html b/templates/email/default/other-updated.html
new file mode 100644
index 000000000..fbae37268
--- /dev/null
+++ b/templates/email/default/other-updated.html
@@ -0,0 +1,26 @@
+[%
+
+email_summary = "Thanks for logging your update";
+email_columns = 2;
+
+PROCESS '_email_settings.html';
+INCLUDE '_email_top.html';
+
+%]
+
+<th style="[% td_style %][% primary_column_style %]" id="primary_column">
+ [% start_padded_box %]
+ <h1 style="[% h1_style %]">Your update has been&nbsp;logged</h1>
+ <p style="[% p_style %]">Your update has been logged on [% site_name %]:</p>
+ <p style="margin: 20px auto; text-align: center">
+ <a style="[% button_style %]" href="[% cobrand.base_url_for_report(problem) %][% problem.url %]#update_[% update.id %]">View my update</a>
+ </p>
+ [% end_padded_box %]
+</th>
+[% WRAPPER '_email_sidebar.html'
+ object = update
+ report = problem %]
+ <p style="[% secondary_p_style %]">[% update.text | html %]</p>
+[% END %]
+
+[% INCLUDE '_email_bottom.html' %]
diff --git a/templates/email/default/other-updated.txt b/templates/email/default/other-updated.txt
new file mode 100644
index 000000000..4900f6c29
--- /dev/null
+++ b/templates/email/default/other-updated.txt
@@ -0,0 +1,16 @@
+Subject: Your update has been logged
+
+Hello [% update.name %],
+
+Your update has been logged on [% site_name %]:
+
+[% cobrand.base_url_for_report(problem) %][% problem.url %]#update_[% update.id %]
+
+Your update reads:
+
+[% update.text %]
+
+[% INCLUDE 'signature.txt' %]
+
+This email was sent automatically, from an unmonitored email account - so
+please do not reply to it.
diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html
index 75ff76204..79b8d866e 100644
--- a/templates/web/base/report/new/form_user_loggedin.html
+++ b/templates/web/base/report/new/form_user_loggedin.html
@@ -1,7 +1,29 @@
<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 %]">
+ [% can_contribute_as_another_user = c.user.has_permission_to("contribute_as_another_user", bodies.keys.join(",")) %]
+ [% can_contribute_as_body = c.user.from_body AND c.user.has_permission_to("contribute_as_body", bodies.keys.join(",")) %]
+
+ [% IF can_contribute_as_another_user OR can_contribute_as_body %]
+ <label for="form_as">[% loc('Report as') %]</label>
+ <select id="form_as" class="js-contribute-as" name="form_as">
+ <option value="myself" selected>[% loc('Yourself') %]</option>
+ [% IF can_contribute_as_another_user %]
+ <option value="another_user">[% loc('Another user') %]</option>
+ [% END %]
+ [% IF can_contribute_as_body %]
+ <option value="body">[% c.user.from_body.name %]</option>
+ [% END %]
+ </select>
+ [% END %]
+
+ <label for="form_email">[% loc('Email address') %]</label>
+ <input id="form_email"
+ [%- IF can_contribute_as_another_user OR can_contribute_as_body -%]
+ name="email"
+ [%- ELSE -%]
+ disabled
+ [%- END -%]
+ type="text" value="[% c.user.email | html %]">
[% INCLUDE 'report/new/extra_name.html' %]
[% PROCESS 'user/_anonymity.html' anonymous = report.anonymous %]
@@ -15,7 +37,7 @@
[% 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') %]">
+ <input type="text" class="validName" 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">
@@ -24,7 +46,7 @@
</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') %]">
+ <input class="" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone">
<div class="general-notes">
<p>[% loc('We never show your email address or phone number.') %]</p>
diff --git a/templates/web/base/report/update/form_name.html b/templates/web/base/report/update/form_name.html
index 4cb3e516c..e65ab1790 100644
--- a/templates/web/base/report/update/form_name.html
+++ b/templates/web/base/report/update/form_name.html
@@ -2,6 +2,24 @@
[% PROCESS 'user/_anonymity.html' anonymous = update.anonymous %]
+ [% can_contribute_as_another_user = c.user.has_permission_to("contribute_as_another_user", problem.bodies_str) %]
+ [% can_contribute_as_body = c.user.from_body AND c.user.has_permission_to("contribute_as_body", problem.bodies_str) %]
+
+ [% IF can_contribute_as_another_user OR can_contribute_as_body %]
+ <label for="form_as">[% loc('Provide update as') %]</label>
+ <select id="form_as" class="js-contribute-as" name="form_as">
+ <option value="myself" selected>[% loc('Yourself') %]</option>
+ [% IF can_contribute_as_another_user %]
+ <option value="another_user">[% loc('Another user') %]</option>
+ [% END %]
+ [% IF can_contribute_as_body %]
+ <option value="body">[% c.user.from_body.name %]</option>
+ [% END %]
+ </select>
+ <label for="form_email">[% loc('Email address') %]</label>
+ <input name="rznvy" id="form_email" type="text" value="[% c.user.email | html %]">
+ [% END %]
+
<label for="form_name">[% loc('Name') %]</label>
[% IF field_errors.name %]
<p class='form-error'>[% field_errors.name %]</p>