initialize invites
Invites model,controller and views are initialized. add datepicker and selectize in invites#new calender is added for end date field and selectize is added for emails field to allow multiple emails in field
This commit is contained in:
parent
a96722b3c3
commit
654760c3fc
8 changed files with 77 additions and 2 deletions
28
app/views/admin/invites/new.html.haml
Normal file
28
app/views/admin/invites/new.html.haml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
.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'
|
||||
|
||||
: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
|
||||
}
|
||||
}
|
||||
} )
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue