aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/web/base/auth/general.html2
-rw-r--r--templates/web/borsetshire/around/postcode_form.html26
-rw-r--r--templates/web/borsetshire/auth/_general_top.html27
-rw-r--r--templates/web/borsetshire/footer_extra_js.html5
-rw-r--r--web/cobrands/borsetshire/js.js9
5 files changed, 69 insertions, 0 deletions
diff --git a/templates/web/base/auth/general.html b/templates/web/base/auth/general.html
index 41ff3a2e1..2a8bea402 100644
--- a/templates/web/base/auth/general.html
+++ b/templates/web/base/auth/general.html
@@ -2,6 +2,8 @@
<h1>[% loc('Sign in') %]</h1>
+[% TRY %][% INCLUDE 'auth/_general_top.html' %][% CATCH file %][% END %]
+
[% IF oauth_need_email %]
<p class="form-error">[% loc('We need your email address, please give it below.') %]</p>
[% END %]
diff --git a/templates/web/borsetshire/around/postcode_form.html b/templates/web/borsetshire/around/postcode_form.html
new file mode 100644
index 000000000..bb4accf26
--- /dev/null
+++ b/templates/web/borsetshire/around/postcode_form.html
@@ -0,0 +1,26 @@
+<div id="front-main">
+ <div id="front-main-container">
+ [% INCLUDE 'around/intro.html' %]
+
+ [%
+ question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area');
+ %]
+
+ <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm">
+ <label for="pc">[% question %]:</label>
+ <div>
+ <input type="hidden" name="pc" value="[% c.cobrand.problems.first.postcode | html %]">
+ <input type="text" name="_pc" value="[% pc | html %]" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ā€˜%s’ or ā€˜%s’'), c.cobrand.example_places) %]">
+ <input type="submit" value="[% loc('Go') %]" id="sub">
+ </div>
+
+ [% IF partial_token %]
+ <input type="hidden" name="partial" value="[% partial_token.token %]">
+ [% END %]
+
+ [% IF c.user_exists AND c.user.categories.size %]
+ <input type="hidden" name="filter_category" value="[% c.user.categories.join(",") | html %]">
+ [% END %]
+ </form>
+ </div>
+</div>
diff --git a/templates/web/borsetshire/auth/_general_top.html b/templates/web/borsetshire/auth/_general_top.html
new file mode 100644
index 000000000..efff99018
--- /dev/null
+++ b/templates/web/borsetshire/auth/_general_top.html
@@ -0,0 +1,27 @@
+<p>The following users exist, all with password <kbd>password</kbd>:</p>
+<style>
+#demo-user-list dt {
+ padding: 0 0.5em;
+}
+#demo-user-list dd {
+ color: #666;
+ font-size: 87.5%;
+ padding: 0 0.5em;
+}
+.js #demo-user-list dt:hover {
+ background-color: #faebac;
+ cursor: pointer;
+}
+</style>
+
+<dl id='demo-user-list'>
+ <dt>inspector@example.org</dt>
+ <dd>an inspector, who can shortlist and inspect reports.</dd>
+ <dt>cs@example.org</dt>
+ <dd>a customer service rep, who can create reports as the council or another user, and moderate reports.</dd>
+ <dt>super@example.org</dt>
+ <dd>a council super user, who can do all the above, plus also edit users, templates, priorities, and more.</dd>
+ <dt>user@example.org</dt>
+ <dd>a normal user, who has created the example reports on the site.</dd>
+</dl>
+
diff --git a/templates/web/borsetshire/footer_extra_js.html b/templates/web/borsetshire/footer_extra_js.html
new file mode 100644
index 000000000..a1f790e18
--- /dev/null
+++ b/templates/web/borsetshire/footer_extra_js.html
@@ -0,0 +1,5 @@
+[% scripts.push(
+ version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js')
+ version('/cobrands/fixmystreet-uk-councils/js.js'),
+ version('/cobrands/borsetshire/js.js'),
+) %]
diff --git a/web/cobrands/borsetshire/js.js b/web/cobrands/borsetshire/js.js
new file mode 100644
index 000000000..b612c3a8b
--- /dev/null
+++ b/web/cobrands/borsetshire/js.js
@@ -0,0 +1,9 @@
+(function(){
+ $('#demo-user-list dt').click(function(){
+ var form = document.forms.general_auth;
+ form.email.value = $(this).text();
+ form.password_sign_in.value = 'password';
+ form.r.value = 'admin';
+ form.submit();
+ });
+})();