Sha256: 4612f52db3bacbb970543e87d9b63473fc46a4ef574fdf63496fe6f19d6fdf1d

Contents?: true

Size: 1.43 KB

Versions: 8

Compression:

Stored size: 1.43 KB

Contents

%h3
  Convidar um usuário

= simple_form_for @user_invitation, :url => create_invite_path(@account.id), :method => :post do |f|
  - if @user_invitation.errors.any?
    .notice.notice-red{ :style => "margin-bottom: 15px" }
      %ul
        - @user_invitation.errors.full_messages.each do |msg|
          %li
            = msg

  %div
    = f.email_field :email, :placeholder => "e-mail", :class => "full-width"
  %div{ :style => "padding-top:20px;padding-bottom:10px" }
    %h4
      Permissões
    - if current_user.is?(:owner, @account)
      - APP_ROLES['roles'].each do |role|
        - unless role == APP_ROLES['owner_role']
          %div{ :style => "margin-bottom: 5px" }
            = check_box_tag "user_invitation[roles][]", role, false, :id => "#{role}_checkbox"
            = label_tag "#{role}_checkbox", I18n.t("iugu.#{role}")

    - elsif current_user.is?(:admin, @account)
      - APP_ROLES['roles'].each do |role|
        - unless role == APP_ROLES['owner_role'] || role == APP_ROLES['admin_role'] 
          %div{ :style => "margin-bottom: 5px" }
            = check_box_tag "user_invitation[roles][]", role, false, :id => "#{role}_checkbox"
            = label_tag "#{role}_checkbox", I18n.t("iugu.#{role}")

  %div{ :style => "margin-top: 10px" }
    = f.submit I18n.t("iugu.invite"), :class => "button full-width"

= link_to I18n.t("iugu.back"), account_users_index_path(account_id: params[:account_id]), class: "button no-bottom-margin"

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
iugusdk-1.0.1 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.0.alpha.32 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.0.alpha.31 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.0.alpha.30 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.0.alpha.29 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.0.alpha.28 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.0.alpha.27 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.0.alpha.26 app/views/iugu/invitations/new.html.haml