osem-fcy/app/views/admin/invites/new.html.haml
Rahul 1c04e820b8 add invites actions in controller and views
Index is added so organizer can see who they have invited. Oganizers will now be able to invite users with their email.Organizer will be able to delete and edit a invite.Add test for actions.
2019-10-25 13:28:03 +05:30

29 lines
1.1 KiB
Text

.row
.col-md-offset-1.col-md-8
%h1.text-center Late Submission Invitation
= semantic_form_for(@invite, url: admin_conference_invites_path, html: { multipart: true }) do |f|
= f.input :emails, class: 'form-control', required: true,
hint: 'Add emails to invite people to join the app and submit requests after the cfps deadline.'
= f.input :invite_for, as: :select, collection: ['Track', (t 'booth').capitalize]
= f.input :end_date, as: :string, input_html: { id: 'invitation-end-date', end_date: @conference.end_date }
%p.text-right
= f.submit 'Submit', class: 'btn btn-success'
= link_to 'View Invitations', admin_conference_invites_path, class: 'btn btn-primary'
:javascript
$(document).ready(function() {
$('#invite_emails').selectize({
plugins: ['remove_button'],
delimiter: ',',
persist: false,
create: function(input) {
if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(input)){
return {}
}
return {
value: input,
text: input
}
}
} )
});