aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2014-10-17 15:51:17 +0100
committerMatthew Somerville <matthew@mysociety.org>2014-10-17 17:36:07 +0100
commit980eaf37f0c680fad7433d645324c6c5054b84a3 (patch)
tree9b0da4076d922ff65c2ba693684324ef413cf341
parent11690f70ab8da3c66b80294c622295bda7667d25 (diff)
[fixmystreet.com] Remove login content experiment.
This gave no conclusive results, which was interesting.
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm6
-rw-r--r--perllib/FixMyStreet/TestMech.pm4
-rw-r--r--templates/web/fixmystreet.com/header_extra.html33
-rw-r--r--templates/web/fixmystreet.com/report/new/form_user_loggedout.html96
-rw-r--r--web/js/fixmystreet.js4
5 files changed, 1 insertions, 142 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index c885e1a8a..1e9f83aec 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -719,8 +719,7 @@ sub process_user : Private {
# Extract all the params to a hash to make them easier to work with
my %params = map { $_ => scalar $c->req->param($_) }
- ( 'email', 'name', 'phone', 'password_register', 'fms_extra_title',
- 'email_y', 'email_n' );
+ ( 'email', 'name', 'phone', 'password_register', 'fms_extra_title' );
my $user_title = Utils::trim_text( $params{fms_extra_title} );
@@ -745,9 +744,6 @@ sub process_user : Private {
# cleanup the email address
my $email = $params{email} ? lc $params{email} : '';
- my $email_y = $params{email_y} ? lc $params{email_y} : '';
- my $email_n = $params{email_n} ? lc $params{email_n} : '';
- $email = $email || $email_y || $email_n;
$email =~ s{\s+}{}g;
$report->user( $c->model('DB::User')->find_or_new( { email => $email } ) )
diff --git a/perllib/FixMyStreet/TestMech.pm b/perllib/FixMyStreet/TestMech.pm
index 5b3cc39a7..5b063ebe5 100644
--- a/perllib/FixMyStreet/TestMech.pm
+++ b/perllib/FixMyStreet/TestMech.pm
@@ -482,10 +482,6 @@ sub visible_form_values {
my %params = map { $_ => $form->value($_) } @visible_field_names;
- # Ignore content experiment fields
- delete $params{email_y};
- delete $params{email_n};
-
return \%params;
}
diff --git a/templates/web/fixmystreet.com/header_extra.html b/templates/web/fixmystreet.com/header_extra.html
index 38208277c..27ffc12a1 100644
--- a/templates/web/fixmystreet.com/header_extra.html
+++ b/templates/web/fixmystreet.com/header_extra.html
@@ -1,36 +1,3 @@
<script src="[% start %][% version('/js/jquery.cookie.min.js') %]" type="text/javascript" charset="utf-8"></script>
-[%# We are conducting an A/B experiment on people not logged in, on the new report form %]
-[% IF ( NOT c.user_exists ) AND ( page == 'around' OR page == 'new' ) %]
-<script src="//www.google-analytics.com/cx/api.js?experiment=Ln84qfBuQc6X51-kLqy5YA"></script>
-<script>
-var variation = cxApi.chooseVariation(),
- docElement = document.documentElement,
- className = docElement.className;
-docElement.className = className + ' ' + 'variant' + variation;
-
-if (variation == 2 || variation == 3) {
- $(function(){
- $('h5.variant-click').click(function(){
- $(this).next().show();
- });
- [%- IF field_errors AND field_errors.size %]
- $('h5.variant-click').click();
- [%- END %]
- });
-}
-</script>
-<style>
-html.variant0 .variant1, html.variant0 .variant2, html.variant0 .variant3 { display: none; }
-html.variant0 .variant0 { display: block; }
-html.variant1 .variant0, html.variant1 .variant2, html.variant1 .variant3 { display: none; }
-html.variant1 .variant1 { display: block; }
-html.variant2 .variant0, html.variant2 .variant1, html.variant2 .variant3 { display: none; }
-html.variant2 .variant2 { display: block; }
-html.variant3 .variant0, html.variant3 .variant1, html.variant3 .variant2 { display: none; }
-html.variant3 .variant3 { display: block; }
-html.variant2 .variant-click, html.variant3 .variant-click { cursor: pointer; }
-</style>
-[% END %]
-
[% INCLUDE 'tracking_code.html' %]
diff --git a/templates/web/fixmystreet.com/report/new/form_user_loggedout.html b/templates/web/fixmystreet.com/report/new/form_user_loggedout.html
deleted file mode 100644
index 05d485818..000000000
--- a/templates/web/fixmystreet.com/report/new/form_user_loggedout.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<div class="variant0 variant2">
-<label for="form_email">[% loc('Your email') %]
- <span class="muted">([% loc('We never show your email') %])</span>
-</label>
-[% IF field_errors.email %]
- <p class='form-error'>[% field_errors.email %]</p>
-[% END %]
-<input type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" required>
-</div>
-
-<div id="form_sign_in">
- <h3>[% loc("Now to submit your report&hellip;") %]</h3>
- <h2>[% loc("Do you have a FixMyStreet password?") %]</h2>
-
- <div id="form_sign_in_yes" class="form-box">
-
- <h5 class="variant-click">[% loc('<strong>Yes</strong> I have a password') %]</h5>
-
- <div class="variant0 variant1">
- <div class="variant1 variant3">
- <label for="form_email_y">[% loc('Your email') %]</label>
- [% IF field_errors.email %]
- <p class='form-error'>[% field_errors.email %]</p>
- [% END %]
- <input type="email" value="[% report.user.email | html %]" name="email_y" id="form_email_y" placeholder="[% loc('Please enter your email address') %]">
- </div>
-
- <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
- [% IF field_errors.password %]
- <p class='form-error'>[% field_errors.password %]</p>
- [% END %]
- <div class="form-txt-submit-box">
- <input type="password" name="password_sign_in" id="password_sign_in" placeholder="[% loc('Your password') %]" value="">
- <input class="green-btn" type="submit" id="submit_sign_in" name="submit_sign_in" value="[% loc('Submit') %]">
- </div>
-
- <div class="checkbox-group">
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="n inline" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
- </div>
-
- <div class="general-notes">
- <p><strong>[% loc('Forgotten your password?') %]</strong>
- [% loc('Confirm by email below, providing a new password at that point. When you confirm, your password will be updated.') %]</p>
- </div>
-
- </div>
- </div>
-
- <div id="form_sign_in_no" class="form-box">
- <h5 class="variant-click">[% loc('<strong>No</strong> Let me confirm my report by email') %]</h5>
-
- <div class="variant0 variant1">
- <div class="variant1 variant3">
- <label for="form_email_n">[% loc('Your email') %]</label>
- [% IF field_errors.email %]
- <p class='form-error'>[% field_errors.email %]</p>
- [% END %]
- <input type="email" class="form-focus-trigger" value="[% report.user.email | html %]" name="email_n" id="form_email_n" placeholder="[% loc('Please enter your email address') %]">
- </div>
-
- [% INCLUDE 'report/new/extra_name.html' %]
-
- <label for="form_name">[% loc('Name') %]</label>
- [% IF field_errors.name %]
- <p class='form-error'>[% field_errors.name %]</p>
- [% END %]
-
- <input type="text" class="form-focus-trigger validName" 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 report.anonymous==0 OR (c.cobrand.default_show_name AND report.anonymous=='') %]>
- <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
- </div>
-
- <label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label>
- <input class="form-focus-hidden" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]">
-
- <div class="general-notes form-focus-hidden">
- <p>[% loc('We never show your email address or phone number.') %]</p>
- </div>
-
- <label class="form-focus-hidden" for="password_register">[% loc('Password (optional)') %]</label>
-
- <div class="general-notes form-focus-hidden">
- <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
- </div>
-
- <div class="form-txt-submit-box form-focus-hidden">
- <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
- <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]">
- </div>
- </div>
- </div>
-</div>
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index 158ba8bb4..7d75c8b65 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -104,8 +104,6 @@ $(function(){
$('#form_first_name').removeClass();
$('#form_last_name').removeClass();
$('#form_fms_extra_title').removeClass();
- $('#form_email_y').addClass('required');
- $('#form_email_n').removeClass();
} );
$('#submit_register').click( function(e) {
@@ -117,8 +115,6 @@ $(function(){
$('#form_first_name').addClass('required');
$('#form_last_name').addClass('required');
$('#form_fms_extra_title').addClass('required');
- $('#form_email_y').removeClass();
- $('#form_email_n').addClass('required');
} );
$('#problem_submit > input[type="submit"]').click( function(e) {