Sha256: 9febde558a6740e83aa330f54527c2ea8fa4d1f5ba77ac5cc8782adbc9d3b520

Contents?: true

Size: 1.37 KB

Versions: 4

Compression:

Stored size: 1.37 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|
        %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

4 entries across 4 versions & 1 rubygems

Version Path
iugusdk-1.0.0.alpha.25 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.0.alpha.24 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.0.alpha.23 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.0.alpha.22 app/views/iugu/invitations/new.html.haml