Skip to content

Commit

Permalink
adapt reset password page to new styles; upgrade devise; remove unuse…
Browse files Browse the repository at this point in the history
…d devise views (registrations)
  • Loading branch information
markets committed Sep 1, 2018
1 parent f7e4537 commit d0cfee8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 122 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
34 changes: 16 additions & 18 deletions app/views/devise/passwords/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
<div class="row">
<div class="col-sm-4">
<%= render "devise/shared/links" %>
</div>
<div class="col-sm-8">
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">
<%= t(".change_password") %>
</h2>
</div>
<div class="col-sm-6 col-sm-offset-3">
<div class="panel panel-primary" id="login-box">
<div class="panel-body">
<h2><%= t(".change_password") %></h2>
<%= 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 %>
<div class="form-group">
<%= f.label :password, t(".new_password"), class: "control-label" %>
<%= f.password_field :password, required: true, autofocus: true, class: "form-control", ng_model: "password" %>
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">lock</i>
</span>
<%= f.password_field :password, required: true, autofocus: true, placeholder: t(".new_password"), class: "form-control input-lg" %>
</div>
</div>
<div class="form-group" ng_class="{ 'has-error': password != password_confirmation %>">
<%= f.label :password_confirmation, t(".confirm_password"), class: "control-label" %>
<%= f.password_field :password_confirmation, required: true, class: "form-control", ng_model: "password_confirmation" %>
<div class="help-block" ng_if="password && password_confirmation && password != password_confirmation">
<%= t ".passwords_not_match" %>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<i class="material-icons">lock</i>
</span>
<%= 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" %>
</div>
</div>
<div class="form-group">
<%= 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" %>
</div>
<% end %>
</div>
Expand Down
61 changes: 0 additions & 61 deletions app/views/devise/registrations/edit.html.erb

This file was deleted.

39 changes: 0 additions & 39 deletions app/views/devise/registrations/new.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/statistics/statistics_global_activity.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%= t 'global.statistics' %>: <%= t '.global_activity' %>
</h1>
<div>
<div class="panel panel-default" ng_controller="">
<div class="panel panel-default">
<div class="panel-body">
<ul class="nav nav-pills statistics">
<li>
Expand Down

0 comments on commit d0cfee8

Please # to comment.