aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/web/fixmystreet/auth/change_password.html39
-rw-r--r--templates/web/fixmystreet/auth/general.html70
-rw-r--r--templates/web/fixmystreet/auth/sign_out.html8
-rw-r--r--templates/web/fixmystreet/auth/token.html27
4 files changed, 144 insertions, 0 deletions
diff --git a/templates/web/fixmystreet/auth/change_password.html b/templates/web/fixmystreet/auth/change_password.html
new file mode 100644
index 000000000..c10560c3e
--- /dev/null
+++ b/templates/web/fixmystreet/auth/change_password.html
@@ -0,0 +1,39 @@
+[% INCLUDE 'header.html', title = loc('Change Password') %]
+
+<h1>[% loc('Change Password') %]</h1>
+
+[% IF password_changed %]
+ <p id="fixed">[% loc('Your password has been changed') %]</p>
+[% END %]
+
+
+<form action="[% c.uri_for('change_password') %]" method="post" name="change_password" class="fieldset">
+
+ [% IF password_error;
+
+ errors = {
+ missing => loc('Please enter a password'),
+ mismatch => loc('The passwords do not match'),
+ other => loc('Please check the passwords and try again'),
+ };
+
+ loc_password_error = errors.$password_error || errors.other; %]
+ <div class="form-error">[% loc_password_error %]</div>
+ [% END %]
+
+ <div class="form-field">
+ <label for="new_password">[% loc('Password:') %]</label>
+ <input type="password" name="new_password" value="[% new_password | html %]">
+ </div>
+ <div class="form-field">
+ <label for="confirm">[% loc('Again:') %]</label>
+ <input type="password" name="confirm" value="[% confirm | html %]">
+ </div>
+ <div class="checkbox">
+ <input type="submit" value="[% loc('Change Password') %]">
+ </div>
+
+</form>
+
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/fixmystreet/auth/general.html b/templates/web/fixmystreet/auth/general.html
new file mode 100644
index 000000000..8b7b5639a
--- /dev/null
+++ b/templates/web/fixmystreet/auth/general.html
@@ -0,0 +1,70 @@
+[% INCLUDE 'header.html', title = loc('Sign in or create an account') %]
+
+<h1>[% loc('Sign in') %]</h1>
+
+<form action="[% c.uri_for() %]" method="post" name="general_auth" class="validate">
+ <fieldset>
+ <input type="hidden" name="r" value="[% c.req.params.r | html %]">
+
+ [% IF email_error;
+
+ # other keys include fqdn, mxcheck if you'd like to write a custom error message
+
+ errors = {
+ missing => loc('Please enter your email'),
+ other => loc('Please check your email address is correct')
+ };
+
+ loc_email_error = errors.$email_error || errors.other;
+ END %]
+
+ [% IF loc_email_error %]
+ <div class="form-error">[% loc_email_error %]</div>
+ [% ELSIF sign_in_error %]
+ <div class="form-error">[% loc('There was a problem with your email/password combination. Passwords and user accounts are a brand <strong>new</strong> service, so you probably do not have one yet &ndash; please fill in the right hand side of this form to get one.') %]</div>
+ [% END %]
+
+ <label class="hidden n" for="email">[% loc('Your email address') %]</label>
+ <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]">
+
+ <div id="form_sign_in">
+ <h3>[% loc("Do you have a FixMyStreet password?") %]</h3>
+
+ <div id="form_sign_in_yes" class="form-box">
+ <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>
+
+ <label class="hidden n" for="password_sign_in">[% loc('<strong>Yes</strong>, I have a password') %]</label>
+
+ <div class="form-txt-submit-box">
+ <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
+ <input class="green-btn" type="submit" name="sign_in" value="[% loc('Sign in') %]">
+ </div>
+
+ <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
+ <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
+
+ </div>
+ <div id="form_sign_in_no" class="form-box">
+ <h5>[% loc('<strong>No</strong> let me sign in by email') %]</h5>
+
+ <div class="general-sidebar-notes">
+ <p>Providing a name and password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.</p>
+ </div>
+
+ <label class="hidden" for="name">[% loc('Your name') %]</label>
+ <input type="text" name="name" value="" placeholder="[% loc('Your name') %]">
+
+ <label class="hidden" for="password_register">[% loc('Enter a new password (optional)') %]</label>
+
+ <div class="form-txt-submit-box">
+ <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a new password (optional)') %]">
+ <input class="green-btn" type="submit" name="email_sign_in" value="[% loc('Sign in') %]">
+ </div>
+ </div>
+
+ </div>
+ </fieldset>
+</form>
+
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/fixmystreet/auth/sign_out.html b/templates/web/fixmystreet/auth/sign_out.html
new file mode 100644
index 000000000..3d8df60e4
--- /dev/null
+++ b/templates/web/fixmystreet/auth/sign_out.html
@@ -0,0 +1,8 @@
+[% INCLUDE 'header.html', title => loc('Sign out') %]
+
+<h1>[% loc('You have been signed out') %]</h1>
+
+<p>Please feel free to <a href="[% c.uri_for('/auth') %]">sign in again</a>.</p>
+
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/fixmystreet/auth/token.html b/templates/web/fixmystreet/auth/token.html
new file mode 100644
index 000000000..0f44d1074
--- /dev/null
+++ b/templates/web/fixmystreet/auth/token.html
@@ -0,0 +1,27 @@
+[% INCLUDE 'header.html', title => loc('Confirm account') %]
+
+[% IF token_not_found %]
+
+<h1>[% loc('Error') %]</h1>
+
+<p>We have not been able to confirm your account - sorry. This may be because:</p>
+
+<ul>
+ <li>Link too old or already used</li>
+ <li>URL not copied correctly</li>
+ [%# FIXME - add more reasons here %]
+</ul>
+
+[% ELSE %]
+
+<h1>[% loc('Please check your email') %]</h1>
+
+<p>[% loc("We have sent you an email containing a link to confirm your account.") %]</p>
+
+<p>[% loc("The confirmation email <strong>may</strong> take a few minutes to arrive &mdash; <em>please</em> be patient.") %]</p>
+
+<p>[% loc("If you use web-based email or have 'junk mail' filters, you may wish to check your bulk/spam mail folders: sometimes, our messages are marked that way.") %]</p>
+
+[% END %]
+
+[% INCLUDE 'footer.html' %]