mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
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.
68 lines
2.5 KiB
Plaintext
68 lines
2.5 KiB
Plaintext
- 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
|
||
|
||
.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
|