Sha256: b3de66513152e41b9eb42bb3bc8412fca07ae2dc8ca3582e7d1253876b30fbf9

Contents?: true

Size: 949 Bytes

Versions: 5

Compression:

Stored size: 949 Bytes

Contents

= f.error_messages
- disabled = (permitted_to? :manage, @<%= user_singular_name %>) ? false : true
%p
  = f.label :first_name
  %br
  = f.text_field :first_name
%p
  = f.label :last_name
  %br
  = f.text_field :last_name
%p
  = f.label :email
  %br
  = f.text_field :email, :disabled => disabled
%p
  = f.label :language
  %br
  = f.select :language, [["English", "en"], ["Italiano", "it"]]
%p
  = f.label :password
  %br
  = f.password_field :password
%p
  = f.label :password_confirmation
  %br
  = f.password_field :password_confirmation
- if permitted_to? :manage, @<%= user_singular_name %>
  %p
    = f.label :roles
    %br
    - for role in User::ROLES
      = check_box_tag "user[roles][]", role, @<%= user_singular_name %>.roles.include?(role), :disabled => (@<%= user_singular_name %> == @current_<%= user_singular_name %> ? true : false)
      =h role.humanize
      %br
%p
  %button.button.positive{:type => "submit"}
    = submit_button

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mondo-generators-0.6.2 rails_generators/mondo_authentication/templates/views/_form.html.haml
mondo-generators-0.6.1 rails_generators/mondo_authentication/templates/views/_form.html.haml
mondo-generators-0.6.0 rails_generators/mondo_authentication/templates/views/_form.html.haml
mondo-generators-0.5.0 rails_generators/mondo_authentication/templates/views/_form.html.haml
mondo-generators-0.2.0 rails_generators/mondo_authentication/templates/views/_form.html.haml