mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Convert erb files brought from spree_auth_devise to haml
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
<% if can? :admin, Spree::User %>
|
||||
<%= tab(:users, :url => spree.admin_users_path, :icon => 'icon-user') %>
|
||||
<% end %>
|
||||
2
app/views/spree/admin/_users_tab.html.haml
Normal file
2
app/views/spree/admin/_users_tab.html.haml
Normal file
@@ -0,0 +1,2 @@
|
||||
- if can? :admin, Spree::User
|
||||
= tab(:users, url: spree.admin_users_path, icon: 'icon-user')
|
||||
@@ -1,23 +0,0 @@
|
||||
<% content_for :page_title do %>
|
||||
<%= Spree.t(:new_user) %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :page_actions do %>
|
||||
<li>
|
||||
<%= button_link_to Spree.t(:back_to_users_list), spree.admin_users_path, :icon => 'icon-arrow-left' %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div data-hook="admin_user_new_form_header">
|
||||
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @user } %>
|
||||
</div>
|
||||
|
||||
<div data-hook="admin_user_new_form">
|
||||
<%= form_for [:admin, @user] do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
|
||||
<div data-hook="admin_user_new_form_buttons">
|
||||
<%= render :partial => 'spree/admin/shared/new_resource_links' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
15
app/views/spree/admin/users/new.html.haml
Normal file
15
app/views/spree/admin/users/new.html.haml
Normal file
@@ -0,0 +1,15 @@
|
||||
= content_for :page_title do
|
||||
= Spree.t(:new_user)
|
||||
|
||||
= content_for :page_actions do
|
||||
%li
|
||||
= button_link_to Spree.t(:back_to_users_list), spree.admin_users_path, icon: 'icon-arrow-left'
|
||||
|
||||
%div
|
||||
= render partial: 'spree/shared/error_messages', locals: { target: @user }
|
||||
|
||||
%div
|
||||
= form_for [:admin, @user] do |f|
|
||||
= render partial: 'form', locals: { f: f }
|
||||
%div
|
||||
= render partial: 'spree/admin/shared/new_resource_links'
|
||||
@@ -1,17 +0,0 @@
|
||||
<p>
|
||||
<%= f.label :email, Spree.t(:email) %><br />
|
||||
<%= f.email_field :email, :class => 'title' %>
|
||||
</p>
|
||||
<div id="password-credentials">
|
||||
<p>
|
||||
<%= f.label :password, Spree.t(:password) %><br />
|
||||
<%= f.password_field :password, :class => 'title' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :password_confirmation, Spree.t(:confirm_password) %><br />
|
||||
<%= f.password_field :password_confirmation, :class => 'title' %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div data-hook="signup_below_password_fields"></div>
|
||||
15
app/views/spree/shared/_user_form.html.haml
Normal file
15
app/views/spree/shared/_user_form.html.haml
Normal file
@@ -0,0 +1,15 @@
|
||||
%p
|
||||
= f.label :email, Spree.t(:email)
|
||||
%br
|
||||
= f.email_field :email, class: 'title'
|
||||
|
||||
%div{"id" => "password-credentials"}
|
||||
%p
|
||||
= f.label :password, Spree.t(:password)
|
||||
%br
|
||||
= f.password_field :password, class: 'title'
|
||||
|
||||
%p
|
||||
= f.label :password_confirmation, Spree.t(:confirm_password)
|
||||
%br
|
||||
= f.password_field :password_confirmation, class: 'title'
|
||||
@@ -1,17 +0,0 @@
|
||||
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @spree_user } %>
|
||||
|
||||
<div id="forgot-password">
|
||||
<h6><%= Spree.t(:forgot_password) %></h6>
|
||||
|
||||
<p><%= Spree.t(:instructions_to_reset_password) %></p>
|
||||
|
||||
<%= form_for Spree::User.new, :as => :spree_user, :url => spree.reset_password_path do |f| %>
|
||||
<p>
|
||||
<%= f.label :email, Spree.t(:email) %><br />
|
||||
<%= f.email_field :email %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit Spree.t(:reset_password), :class => 'button primary' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
14
app/views/spree/user_passwords/new.html.haml
Executable file
14
app/views/spree/user_passwords/new.html.haml
Executable file
@@ -0,0 +1,14 @@
|
||||
= render partial: 'spree/shared/error_messages', locals: { target: @spree_user }
|
||||
|
||||
%div{"id" => "forgot-password"}
|
||||
%h6= Spree.t(:forgot_password)
|
||||
|
||||
%p= Spree.t(:instructions_to_reset_password)
|
||||
|
||||
= form_for Spree::User.new, as: :spree_user, url: spree.reset_password_path do |f|
|
||||
%p
|
||||
= f.label :email, Spree.t(:email)
|
||||
%br
|
||||
= f.email_field :email
|
||||
%p
|
||||
= f.submit Spree.t(:reset_password), class: 'button primary'
|
||||
Reference in New Issue
Block a user