mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
group owner select box in own tab
This commit is contained in:
@@ -5,6 +5,7 @@ angular.module("admin.enterprise_groups")
|
||||
|
||||
$scope.menu.setItems [
|
||||
{ name: 'Primary Details', icon_class: "icon-user" }
|
||||
{ name: 'Users', icon_class: "icon-user" }
|
||||
{ name: 'About', icon_class: "icon-pencil" }
|
||||
{ name: 'Images', icon_class: "icon-picture" }
|
||||
{ name: 'Contact', icon_class: "icon-phone" }
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
.one.column
|
||||
.eleven.columns.omega.fullwidth_inputs
|
||||
= render 'form_primary_details', f: f
|
||||
= render 'form_users', f: f
|
||||
= render 'form_about', f: f
|
||||
= render 'form_images', f: f
|
||||
= render 'form_address', f: f
|
||||
|
||||
@@ -10,15 +10,6 @@
|
||||
%br/
|
||||
= f.text_field :description
|
||||
|
||||
- if spree_current_user.admin?
|
||||
.row
|
||||
.three.columns.alpha
|
||||
=f.label :owner_id, 'Owner'
|
||||
.with-tip{'data-powertip' => "The primary user responsible for this group."}
|
||||
%a What's this?
|
||||
.eight.columns.omega
|
||||
= f.hidden_field :owner_id, class: "select2 fullwidth", 'ofn-user-autocomplete' => true, email: @owner_email
|
||||
|
||||
= f.field_container :on_front_page do
|
||||
= f.label :on_front_page, 'On front page?'
|
||||
%br/
|
||||
|
||||
14
app/views/admin/enterprise_groups/_form_users.html.haml
Normal file
14
app/views/admin/enterprise_groups/_form_users.html.haml
Normal file
@@ -0,0 +1,14 @@
|
||||
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Users'" } }
|
||||
%legend Users
|
||||
.row
|
||||
.three.columns.alpha
|
||||
=f.label :owner_id, 'Owner'
|
||||
.with-tip{'data-powertip' => "The primary user responsible for this group."}
|
||||
%a What's this?
|
||||
.eight.columns.omega
|
||||
- if spree_current_user.admin?
|
||||
= f.hidden_field :owner_id,
|
||||
class: "select2 fullwidth",
|
||||
'user-select' => "{id:'#{@enterprise_group.owner.andand.id}', email:'#{@enterprise_group.owner.andand.email}'}"
|
||||
- else
|
||||
= @enterprise_group.owner.andand.email
|
||||
Reference in New Issue
Block a user