Sha256: f36b6a7179ea903344eb799eb77497f389f2d312f09ec70c5a2ecfb7828e3c62

Contents?: true

Size: 1.18 KB

Versions: 4

Compression:

Stored size: 1.18 KB

Contents

= f.error_messages
- disabled = (permitted_to? :manage, @<%= user_singular_name %>) || @<%= user_singular_name %>.new_record?  ? 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
- if permitted_to? :manage, @<%= user_singular_name %>
  %p
    = f.label :password
    %br
    = f.password_field :password
  %p
    = f.label :password_confirmation
    %br
    = f.password_field :password_confirmation
  %p
    = f.label :language, t("users.language")
    %br
    = f.select :language, [["English", "en"], ["Italiano", "it"]]
  %p
    = f.label :active
    %br
    = f.select :active, [["Active", true], ["Passive", false]]
  %p
    = f.label :roles, t("users.roles")
    %br
    - for role in User::ROLES
      = check_box_tag "<%= user_singular_name %>[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"}
    = image_tag "icons/yes.gif"
    = submit_button

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mondo-generators-0.6.9 rails_generators/mondo_authentication/templates/views/_form.html.haml
mondo-generators-0.6.8 rails_generators/mondo_authentication/templates/views/_form.html.haml
mondo-generators-0.6.7 rails_generators/mondo_authentication/templates/views/_form.html.haml
mondo-generators-0.6.5 rails_generators/mondo_authentication/templates/views/_form.html.haml