Files
openfoodnetwork/app/views/admin/enterprises/form/_users.html.haml
Maikel Linke 44970a13bb Fix translation of email confirmation notice
The `_html` suffix was missing leading to `<br />` being displayed in
plain text. The new version also integrates the email address as a
variable in the translation.
2017-01-13 10:21:25 +11:00

68 lines
2.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
- owner_email = @enterprise.andand.owner.andand.email || ""
- full_permissions = (spree_current_user.admin? || spree_current_user == @enterprise.andand.owner)
-if @enterprise.pending_any_confirmation?
.alert-box
- email = @enterprise.confirmed? ? @enterprise.unconfirmed_email : @enterprise.email
= t('.email_confirmation_notice_html', {email: "<strong>#{email}</strong>".html_safe})
= link_to(t('.resend'), main_app.enterprise_confirmation_path(enterprise: { id: @enterprise.id, email: email } ), method: :post)
%a.close{ href: "#" } ×
.row
.three.columns.alpha
=f.label :owner_id, t('.owner')
- if full_permissions
%span.required *
%div{'ofn-with-tip' => t('.owner_tip')}
%a= t('admin.whats_this')
.eight.columns.omega
- if full_permissions
= f.hidden_field :owner_id, class: "select2 fullwidth", 'user-select' => 'Enterprise.owner'
- else
= owner_email
.row
.three.columns.alpha
= f.label :email, t('.notifications')
- if full_permissions
%span.required *
.with-tip{'data-powertip' => t('.notifications_tip')}
%a= t('admin.whats_this')
.eight.columns.omega
- if full_permissions
= f.text_field :email, { placeholder: t('.notifications_placeholder'), "ng-model" => "Enterprise.email" }
- else
= @enterprise.email
.row{ ng: { hide: "pristineEmail == null || pristineEmail == Enterprise.email"} }
.alpha.three.columns
&nbsp;
.omega.eight.columns
= t('.notifications_note')
.row
.three.columns.alpha
=f.label :user_ids, t('.managers')
- if full_permissions
%span.required *
%div{'ofn-with-tip' => t('.managers_tip')}
%a= t('admin.whats_this')
.eight.columns.omega
- if full_permissions
%table
%tr
%td
- # Ignore this input in the submit
= hidden_field_tag :ignored, :new_manager, class: "select2 fullwidth", 'user-select' => 'newManager', 'ng-model' => 'newManager'
%td.actions
%a{ 'ng-click' => 'addManager(newManager)', :class => "icon-plus no-text" }
%tr.animate-repeat{ ng: { repeat: 'manager in Enterprise.users' }}
%td
= hidden_field_tag "enterprise[user_ids][]", nil, multiple: true, 'ng-value' => 'manager.id'
{{ manager.email }}
%td.actions
%a{ 'ng-click' => 'removeManager(manager)', :class => "icon-trash no-text" }
- else
- @enterprise.users.each do |manager|
= manager.email
%br