diff options
| author | Luc Donnet | 2014-12-03 17:41:38 +0100 |
|---|---|---|
| committer | Luc Donnet | 2014-12-03 17:41:38 +0100 |
| commit | be9c3db94a9cde7b889b6303007542c8d4179b16 (patch) | |
| tree | 64d0b06f20fa6b8c6777e69dbe71cd1670ce71a3 | |
| parent | 6416c3e42fc826facc80945b7b43d5d6c8085f36 (diff) | |
| download | chouette-core-be9c3db94a9cde7b889b6303007542c8d4179b16.tar.bz2 | |
Fix devise design for invitation edit and password edit
| -rw-r--r-- | app/views/devise/invitations/edit.html.erb | 26 | ||||
| -rw-r--r-- | app/views/devise/invitations/new.html.erb | 24 | ||||
| -rw-r--r-- | app/views/devise/passwords/edit.html.erb | 33 | ||||
| -rw-r--r-- | config/locales/devise.fr.yml | 1 |
4 files changed, 48 insertions, 36 deletions
diff --git a/app/views/devise/invitations/edit.html.erb b/app/views/devise/invitations/edit.html.erb index becfb8efc..a03b1ee7e 100644 --- a/app/views/devise/invitations/edit.html.erb +++ b/app/views/devise/invitations/edit.html.erb @@ -1,14 +1,18 @@ -<h2><%= t 'devise.invitations.edit.header' %></h2> +<div class="col-md-offset-2 col-md-8"> + <div class="panel panel-default"> + <div class="panel-heading"><%= t "devise.invitations.edit.header" %></div> + <div class="panel-body"> -<%= form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => { :method => :put } do |f| %> - <%= devise_error_messages! %> - <%= f.hidden_field :invitation_token %> + <%= simple_form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => { :method => :put } do |form| %> + <%= form.hidden_field :invitation_token %> - <p><%= f.label :password %><br /> - <%= f.password_field :password %></p> + <%= form.input :password, :as => :password %> + <%= form.input :password_confirmation, :as => :password %> - <p><%= f.label :password_confirmation %><br /> - <%= f.password_field :password_confirmation %></p> - - <p><%= f.submit t("devise.invitations.edit.submit_button") %></p> -<% end %> + <div class="col-md-offset-2"> + <%= form.button :submit, :value => t("devise.invitations.edit.submit_button"), :class => "btn-info" %> + </div> + <% end %> + </div> + </div> +</div> diff --git a/app/views/devise/invitations/new.html.erb b/app/views/devise/invitations/new.html.erb index b5acf475a..2232020c9 100644 --- a/app/views/devise/invitations/new.html.erb +++ b/app/views/devise/invitations/new.html.erb @@ -1,12 +1,18 @@ -<h2><%= t "devise.invitations.new.header" %></h2> +<div class="col-md-offset-2 col-md-8"> + <div class="panel panel-default"> + <div class="panel-heading"><%= t "devise.invitations.new.header" %></div> + <div class="panel-body"> -<%= form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :post} do |f| %> - <%= devise_error_messages! %> + <%= simple_form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :post} do |form| %> -<% resource.class.invite_key_fields.each do |field| -%> - <p><%= f.label field %><br /> - <%= f.text_field field %></p> -<% end -%> + <% resource.class.invite_key_fields.each do |field| -%> + <%= form.input field %> + <% end -%> - <p><%= f.submit t("devise.invitations.new.submit_button") %></p> -<% end %> + <div class="col-md-offset-2"> + <%= form.button :submit, :value => t("devise.invitations.new.submit_button"), :class => "btn-info" %> + </div> + <% end %> + </div> + </div> +</div> diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index 421339b5d..7b408a149 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -1,17 +1,18 @@ -<%= title_tag t('.title') %> +<div class="col-md-offset-2 col-md-8"> + <div class="panel panel-default"> + <div class="panel-heading"><%= t('.title') %></div> + <div class="panel-body"> + <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %> -<%= semantic_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %> - - <%= f.inputs do %> - <%= f.input :reset_password_token, :as => :hidden %> - <%= f.input :password, :as => :password %> - <%= f.input :password_confirmation, :as => :password %> - <% end %> - - <%= f.actions do %> - <%= f.action :submit, :as => :button, :label => t('.commit') %> - <%= f.action :cancel, :as => :link %> - <% end %> -<% end %> - -<%= render "links" %> + <%= f.input :reset_password_token, :as => :hidden %> + <%= f.input :password, :as => :password %> + <%= f.input :password_confirmation, :as => :password %> + + <div class="col-md-offset-2"> + <%= link_to t("cancel"), root_path, :class => "btn btn-default" %> + <%= f.button :submit, :value => t("devise.passwords.edit.commit"), :class => "btn-info" %> + </div> + <% end %> + </div> + </div> +</div> diff --git a/config/locales/devise.fr.yml b/config/locales/devise.fr.yml index e824acf49..929aa682a 100644 --- a/config/locales/devise.fr.yml +++ b/config/locales/devise.fr.yml @@ -5,6 +5,7 @@ fr: attributes: user: password: Mot de passe + password_confirmation: Confirmation du mot de passe devise: sessions: new: |
