aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-24 12:34:42 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-24 12:34:42 +0100
commitcc8b152ee383e8b596926e3f2cab39557b353bcc (patch)
tree776bc8c296d1af57f2d481166b4166c441d4cd1d /templates/web/default
parentedf59d8605000c4363ce4d79f270559c522bc63e (diff)
Don't show email field on reporting if logged in.
Diffstat (limited to 'templates/web/default')
-rw-r--r--templates/web/default/report/display.html2
-rw-r--r--templates/web/default/report/new/fill_in_details.html18
2 files changed, 12 insertions, 8 deletions
diff --git a/templates/web/default/report/display.html b/templates/web/default/report/display.html
index 13610f132..40c5f081f 100644
--- a/templates/web/default/report/display.html
+++ b/templates/web/default/report/display.html
@@ -117,7 +117,7 @@
<small>[% loc('(we never show your email)') %]</small>
</div>
-[% IF NOT c.user %]
+[% IF NOT c.user_exists %]
[% IF field_errors.email %]
<div class='form-error'>[% field_errors.email %]</div>
diff --git a/templates/web/default/report/new/fill_in_details.html b/templates/web/default/report/new/fill_in_details.html
index 48407bb45..4a40dd707 100644
--- a/templates/web/default/report/new/fill_in_details.html
+++ b/templates/web/default/report/new/fill_in_details.html
@@ -141,14 +141,18 @@
<small>[% loc('(we never show your email address or phone number)') %]</small>
</div>
-[% IF field_errors.email %]
- <div class='form-error'>[% field_errors.email %]</div>
-[% END %]
+[% IF NOT c.user_exists %]
-<div class="form-field">
- <label for="form_email">[% loc('Email:') %]</label>
- <input type="text" value="[% report.user.email | html %]" name="email" id="form_email" size="25">
-</div>
+ [% IF field_errors.email %]
+ <div class='form-error'>[% field_errors.email %]</div>
+ [% END %]
+
+ <div class="form-field">
+ <label for="form_email">[% loc('Email:') %]</label>
+ <input type="text" value="[% report.user.email | html %]" name="email" id="form_email" size="25">
+ </div>
+
+[% END %]
<div>
<label for="form_phone">[% loc('Phone:') %]</label>