mark_all_input_fields_valid(); <%= render :partial => "auth/modals/resource_errors.js.erb", locals: {resource: resource} %> <% if resource.errors.size == 0 %> var resource_active = "<%= resource.authentication_keys_confirmed? %>"; var additional_login_param_status_pending = "<%= resource.additional_login_param_status == 1 %>"; var email_changed = "<%= !resource.previous_changes['unconfirmed_email'].nil? %>"; //if something else is changed then that has to be handled seperately. if(resource_active === "true"){ $("#login_title").html("Account Settings Successfully Updated!"); $("#login_content").html("<%= escape_javascript(render partial:'auth/modals/edit_account_success_content.html.erb', locals: {resource: resource} ) %>"); hide_oauth(); $("#login_footer").hide(); } else{ //this needs to be written in the dummy app, //depending on what is the additional-login_param $("#login_title").html("Verify your Account"); if(additional_login_param_status_pending === "true"){ $("#login_content").html("<%= escape_javascript(render partial: Auth.configuration.auth_resources[resource.class.to_s.capitalize][:additional_login_param_new_otp_partial], locals: {resource: resource}) %>").show(); //$("#sign_up_inputs").hide(); $("#login_footer").html("<%= escape_javascript(render partial: 'auth/modals/login_navigation_options.html.erb', locals: {resource: resource}) %>").show(); $("#show_sign_up").hide(); $("#forgot_password").hide(); $("#resend_confirmation_email").hide(); } else if(email_changed === "true") { $("#login_content").html("<%= escape_javascript(render partial: 'auth/modals/sign_up_success_inactive_content.html.erb', locals: {resource: resource}) %>").show(); $("#login_footer").html("<%= escape_javascript(render partial: 'auth/modals/login_navigation_options.html.erb') %>").show(); $("#show_sign_up").hide(); $("#forgot_password").hide(); $("#resend_confirmation_email").show(); } else{ $("#login_title").html("Account Settings Successfully Updated!").show(); $("#login_content").html("<%= escape_javascript(render partial:'auth/modals/edit_account_success_content.html.erb', locals: {resource: resource} ) %>").show(); hide_oauth(); $("#login_footer").hide(); } } open_sign_in_modal_if_closed(); <% end %>