diff --git a/app/controllers/registrar/sessions_controller.rb b/app/controllers/registrar/sessions_controller.rb index 1a8b195ee..11841481d 100644 --- a/app/controllers/registrar/sessions_controller.rb +++ b/app/controllers/registrar/sessions_controller.rb @@ -91,7 +91,7 @@ class Registrar @user = find_user_by_idc_and_allowed(response.user_id_code) else @user = find_user_by_idc(response.user_id_code) - end + end if @user.persisted? session[:user_id_code] = response.user_id_code diff --git a/app/views/application/_flash_messages.html.erb b/app/views/application/_flash_messages.html.erb index 9b31f0d3f..364e3e5ca 100644 --- a/app/views/application/_flash_messages.html.erb +++ b/app/views/application/_flash_messages.html.erb @@ -1,24 +1,8 @@ -<% if flash[:notice] %> -
- - <% if flash[:notice].respond_to?(:join) %> -

<%= flash[:notice].join('
').html_safe %>

- <% else %> -

<%= flash[:notice] %>

- <% end %> +<% display = (flash[:notice] || flash[:alert] || flash[:warning]) ? 'block' : 'none' %> +
+ <% type = (flash[:notice]) ? 'bg-success' : 'bg-danger' %> + <% type = 'bg-warning' if flash[:warning] %> +
+ <%= flash[:notice] || flash[:alert] || flash[:warning] %>
-<% end %> - -<% if flash[:alert] %> -
- -

<%= flash[:alert] %>

-
-<% end %> - -<% if flash[:info] %> -
- -

<%= flash[:info] %>

-
-<% end %> +
diff --git a/app/views/layouts/registrant/application.html.erb b/app/views/layouts/registrant/application.html.erb index 075ac4652..b5ddb5f0f 100644 --- a/app/views/layouts/registrant/application.html.erb +++ b/app/views/layouts/registrant/application.html.erb @@ -65,7 +65,7 @@
- <%= render 'shared/flash' %> + <%= render 'flash_messages' %> <%= yield %>
+ <%= javascript_include_tag 'registrar-manifest', async: true %> + diff --git a/app/views/layouts/registrar/sessions.html.erb b/app/views/layouts/registrar/sessions.html.erb index 904388155..4632e477c 100644 --- a/app/views/layouts/registrar/sessions.html.erb +++ b/app/views/layouts/registrar/sessions.html.erb @@ -51,4 +51,4 @@ - \ No newline at end of file +