diff --git a/Gemfile b/Gemfile index e386d1131..ef1ede456 100644 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,7 @@ gem 'pundit' gem 'pg', '0.17.1' gem 'hstore_translate' gem 'dalli' -gem 'devise', '~> 4.4.1' +gem 'devise', '~> 4.5.0' gem "http_accept_language", '~> 2.1.1' gem 'unicorn' gem 'kaminari', '~> 1.1.1' diff --git a/Gemfile.lock b/Gemfile.lock index ffea63e66..f0f0778ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -117,7 +117,7 @@ GEM dalli (2.7.2) database_cleaner (1.6.2) debug_inspector (0.0.3) - devise (4.4.3) + devise (4.5.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0, < 6.0) @@ -411,7 +411,7 @@ DEPENDENCIES coffee-rails dalli database_cleaner (= 1.6.2) - devise (~> 4.4.1) + devise (~> 4.5.0) dotenv-rails (= 1.0.2) elasticsearch-model elasticsearch-rails diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index 3a0625faf..98cda8bae 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -1,32 +1,30 @@
-
- <%= render "devise/shared/links" %> -
-
-
-
-

- <%= t(".change_password") %> -

-
+
+
+

<%= t(".change_password") %>

<%= render 'layouts/messages' %> <%= show_error_messages!(resource) %> <%= form_for resource, url: password_path(resource_name), html: { method: :put } do |f| %> <%= f.hidden_field :reset_password_token %>
- <%= f.label :password, t(".new_password"), class: "control-label" %> - <%= f.password_field :password, required: true, autofocus: true, class: "form-control", ng_model: "password" %> +
+ + lock + + <%= f.password_field :password, required: true, autofocus: true, placeholder: t(".new_password"), class: "form-control input-lg" %> +
-
- <%= f.label :password_confirmation, t(".confirm_password"), class: "control-label" %> - <%= f.password_field :password_confirmation, required: true, class: "form-control", ng_model: "password_confirmation" %> -
- <%= t ".passwords_not_match" %> +
+
+ + lock + + <%= f.password_field :password_confirmation, required: true, placeholder: t(".confirm_password"), oninput: "this.setCustomValidity(this.value != form.user_password.value ? 'Password must be matching' : '')", class: "form-control input-lg" %>
- <%= f.submit t(".change_password"), class: "btn btn-primary", ng_disabled: "!password || password != password_confirmation" %> + <%= f.submit t(".change_password"), class: "btn btn-primary btn-lg col-xs-12" %>
<% end %>
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb deleted file mode 100644 index 0f578e621..000000000 --- a/app/views/devise/registrations/edit.html.erb +++ /dev/null @@ -1,61 +0,0 @@ -
-
-
-
-

- <%= t(".edit_user") %> -

-
-
- <%= render 'layouts/messages' %> - <%= show_error_messages!(resource) %> - <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> -
- <%= f.label :email, class: "control-label" %> - <%= f.text_field :email, required: true, autofocus: true, class: "form-control" %> - <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> -

- Currently waiting confirmation for: - <%= resource.unconfirmed_email %> -

- <% end %> -
-
- <%= f.label t(".password"), class: "control-label" %> - <%= f.password_field :password, required: true, autocomplete: "off", class: "form-control" %> -

- <%= t(".help_password") %> -

-
-
- <%= f.label t(".password_confirmation"), class: "control-label" %> - <%= f.password_field :password_confirmation, required: true, class: "form-control" %> -
-
- <%= f.label t(".current_password"), class: "control-label" %> - <%= f.password_field :current_password, required: true, class: "form-control" %> -

- <%= t(".help_current_password") %> -

-
-
- <%= f.submit t(".update"), class: "btn btn-primary" %> -
- <% end %> -
-
-
-
-

- <%= t(".cancel_account") %> -

-
-
-

- <%= t(".unhappy") %> - <%= link_to t(".cancel_account"), registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %> -

-
-
-
-
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb deleted file mode 100644 index 2c9e7ef31..000000000 --- a/app/views/devise/registrations/new.html.erb +++ /dev/null @@ -1,39 +0,0 @@ -
-
- <%= render "devise/shared/links" %> -
-
-
-
-

- <%= t(".sign_up") %> -

-
-
- <%= render 'layouts/messages' %> - <%= show_error_messages!(resource) %> - <%= form_for resource, url: registration_path(resource_name) do |f| %> -
- <%= f.label :username, class: "control-label" %> - <%= f.text_field :username, required: true, autofocus: true, class: "form-control" %> -
-
- <%= f.label :email, class: "control-label" %> - <%= f.text_field :email, required: true, autofocus: true, class: "form-control" %> -
-
- <%= f.label t(".password"), class: "control-label" %> - <%= f.password_field :password, required: true, class: "form-control" %> -
-
- <%= f.label t(".password_confirmation"), class: "control-label" %> - <%= f.password_field :password_confirmation, required: true, class: "form-control" %> -
-
- <%= f.submit t(".sign_me_up"), class: "btn btn-primary" %> -
- <% end %> -
-
-
-
diff --git a/app/views/statistics/statistics_global_activity.html.erb b/app/views/statistics/statistics_global_activity.html.erb index d1da298c8..4d58e288f 100644 --- a/app/views/statistics/statistics_global_activity.html.erb +++ b/app/views/statistics/statistics_global_activity.html.erb @@ -2,7 +2,7 @@ <%= t 'global.statistics' %>: <%= t '.global_activity' %>
-
+