diff options
-rw-r--r-- | .cypress/cypress/integration/simple_spec.js | 1 | ||||
-rw-r--r-- | templates/web/base/report/update-form.html | 16 | ||||
-rw-r--r-- | templates/web/base/report/update/form_user.html | 7 |
3 files changed, 12 insertions, 12 deletions
diff --git a/.cypress/cypress/integration/simple_spec.js b/.cypress/cypress/integration/simple_spec.js index 48c80840b..faf24f70e 100644 --- a/.cypress/cypress/integration/simple_spec.js +++ b/.cypress/cypress/integration/simple_spec.js @@ -32,7 +32,6 @@ describe('Leaving updates', function() { cy.get('[name=password_sign_in]:last').type('password'); cy.get('[name=password_sign_in]:last').parents('form:first').submit(); cy.get('#map_sidebar').should('contain', 'check and confirm your details'); - cy.get('.js-new-report-user-show').click(); // Should not have to do this, #2340 cy.get('[name=submit_register]').parents('form').submit(); cy.get('body').should('contain', 'Thank you for updating this issue'); } diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html index 9a3717ed9..afa110280 100644 --- a/templates/web/base/report/update-form.html +++ b/templates/web/base/report/update-form.html @@ -21,16 +21,20 @@ <form method="post" action="[% c.uri_for( '/report/update' ) %]" id="form_update_form" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> <input type="hidden" name="token" value="[% csrf_token %]"> <fieldset> - [% IF NOT login_success AND NOT oauth_need_email %] - <div class="js-new-report-user-hidden"> - [% INCLUDE 'report/update/form_update.html' %] + [% IF login_success %] + [% PROCESS "report/update/form_user_loggedin.html" %] + [% INCLUDE 'report/update/form_update.html' %] + [% ELSIF oauth_need_email %] + <div id="form_sign_in"> + [% PROCESS "report/form/user_loggedout_by_email.html" object=update type='update' valid_class='validNameU' email_required=1 %] + <input type="hidden" name="oauth_need_email" value="1"> </div> - [% END %] - [% PROCESS "report/update/form_user.html" %] - [% IF login_success OR oauth_need_email %] + [% INCLUDE 'report/update/form_update.html' %] + [% ELSE %] <div class="js-new-report-user-hidden"> [% INCLUDE 'report/update/form_update.html' %] </div> + [% PROCESS "report/update/form_user.html" %] [% END %] </fieldset> </form> diff --git a/templates/web/base/report/update/form_user.html b/templates/web/base/report/update/form_user.html index 65d15e22f..d9a181e26 100644 --- a/templates/web/base/report/update/form_user.html +++ b/templates/web/base/report/update/form_user.html @@ -1,3 +1,4 @@ +<!-- report/update/form_user.html --> [% PROCESS 'report/form/user.html' %] <div class="hidden-js js-new-report-user-shown"> @@ -9,13 +10,9 @@ [% IF c.user_exists %] [% PROCESS "report/update/form_user_loggedin.html" type='update' %] - [% ELSIF oauth_need_email %] - <div id="form_sign_in"> - [% PROCESS 'report/form/user_loggedout_by_email.html' object=update type='update' valid_class='validNameU' email_required=1 %] - <input type="hidden" name="oauth_need_email" value="1"> - </div> [% ELSE %] [% PROCESS "report/form/user_loggedout.html" type='update' object=update %] [% END %] </div> +<!-- /report/update/form_user.html --> |