show invited users in invite field
This commit is contained in:
parent
8b2f2b538e
commit
af0799990c
8 changed files with 11 additions and 5 deletions
|
|
@ -50,6 +50,7 @@ module Admin
|
|||
|
||||
def edit
|
||||
@url = admin_conference_booth_path(@conference.short_title, @booth.id)
|
||||
@invitation_pending_emails = @booth.invited_responsibles.pluck(:email).join(',')
|
||||
end
|
||||
|
||||
def update
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ class BoothsController < ApplicationController
|
|||
|
||||
def edit
|
||||
@url = conference_booth_path(@conference.short_title, @booth.id)
|
||||
@invitation_pending_emails = @booth.invited_responsibles.pluck(:email).join(',')
|
||||
end
|
||||
|
||||
def update
|
||||
|
|
|
|||
|
|
@ -84,4 +84,8 @@ class Booth < ApplicationRecord
|
|||
end
|
||||
alert
|
||||
end
|
||||
|
||||
def invited_responsibles
|
||||
responsibles.where(last_sign_in_at: nil)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
Editing
|
||||
= @booth.title
|
||||
|
||||
= render 'booths/form'
|
||||
= render 'booths/form', invitation_pending_emails: @invitation_pending_emails
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
%h1 New #{t'booth'}
|
||||
|
||||
= render 'booths/form'
|
||||
= render 'booths/form', invitation_pending_emails: ''
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
hint: 'e.g. employee, comunity manager, etc'
|
||||
= f.input :website_url
|
||||
= responsibles_selector_input f
|
||||
= f.input :invite_responsible,
|
||||
= f.input :invite_responsible, input_html: { value: invitation_pending_emails },
|
||||
hint: "This field is to invite unregistered users using their email to become #{(t'booth_responsible').pluralize}."
|
||||
= image_tag f.object.picture.thumb.url if f.object.picture?
|
||||
= f.input :picture
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
Editing
|
||||
= @booth.title
|
||||
|
||||
= render 'form'
|
||||
= render 'form', invitation_pending_emails: @invitation_pending_emails
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.container
|
||||
%h1 Request a #{t'booth'}
|
||||
|
||||
= render 'form'
|
||||
= render 'form', invitation_pending_emails: ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue