Sha256: f94d4c42552a1c7c98a66ce83c0556d1e9256c5dc07f7cf4f86c46837b5ca0ad

Contents?: true

Size: 1.4 KB

Versions: 7

Compression:

Stored size: 1.4 KB

Contents

%h1
  Convidar um usuário

= simple_form_for @user_invitation, role: "form", :url => create_invite_path(@account.id), :method => :post do |f|
  = render partial: "iugu/shared/notices", locals: { group: :user_invitation, resource: @user_invitation }

  .form-group{ class: "#{ "has-error" if @user_invitation.errors[:email].present? }" }
    = f.email_field :email, :placeholder => "e-mail", :class => "form-control"

  %div
    %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 => "btn btn-primary btn-block"

%br
= link_to I18n.t("iugu.back"), account_users_index_path(account_id: params[:account_id]), class: "btn btn-primary btn-block"

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
iugusdk-1.0.11 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.10 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.9 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.8 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.7 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.6 app/views/iugu/invitations/new.html.haml
iugusdk-1.0.5 app/views/iugu/invitations/new.html.haml