.modal-header button.close data-dismiss="modal" type="button" span aria-hidden="true" × span.sr-only Close h4.modal-title New event .modal-body.ptb30 .row = simple_form_for @event, url: {controller: :events, action: :create}, validate: true, turboboost: true do |f| .row.fs8 .col-sm-3 label span.regular.block.pull-left Personal = radio_button_tag :schedule_type, 'personal', checked: :personal, :item_wrapper_class => 'plr10' .col-sm-4.hide label span.regular.block.pull-left Group = radio_button_tag :schedule_type, 'group' .col-sm-5 label span.regular.block.pull-left Book a Session = radio_button_tag :schedule_type, 'book_a_session' .cleardot #parent_id #gname.hide.row.mtb10 .col-sm-3 | Group .col-sm-9 = f.input :group_id, as: :select, prompt:'Select Group', label: false, collection: current_user.groups, input_html: {class:'hide', disabled: true} .row .col-sm-3 .pt8 | Title .col-sm-9 = f.input :name, label: 'Name', validate: true, label:false .clearfix .col-sm-3 .pt8 When .col-sm-9.no-padding .row .col-sm-4 = f.input :stime, as: :string, label: false, wrapper_html: {class: 'inline'}, input_html: {class: 'timepicker-input', readonly: true, value: f.object.start_time.try(:in_time_zone).try(:hr_min_mer)} .col-sm-1 .pt8.center to .col-sm-4 = f.input :etime, as: :string, label: false, wrapper_html: {class: 'inline'}, input_html: {class: 'timepicker-input', readonly: true, value: f.object.end_time.try(:in_time_zone).try(:hr_min_mer)} .col-sm-1.hide = f.input :date, as: :hidden, input_html: {value: f.object.start_time.try(:mm_dd_yyyy)} .row .col-sm-3 .pt8 | Description .col-sm-9 = f.input :description, validate: true, as: :text, label: false, input_html: {class: 'ht80'} .col-sm-3 .pt8 | Frequency .col-sm-3 = f.select :frequency, options_for_select(['Daily','Weekly','Monthly','Yearly'].collect{|a| a}), prompt: "Once" = f.input :owner_id, as: :hidden, input_html: {value: current_user.id} .col-sm-2 .pt8 | Reminder .col-sm-4 = f.select :reminder, [['No Reminder', ''], ["1 Hour", 1]] | (2..10).map {|r| ["#{r} Hours", r]} .invite-users.row.hide .col-sm-3.mt5 | Invite Friend(s) .col-sm-9.mb10.mt5 - if @tutor.present? = f.input :user_emails, input_html: {class: 'select2-field center-placeholder', autocomplete: :off, data: {target: user_favorites_path(current_user), tokenize_email: true, multiple: true, token_value: 'email',placeholder: "Enter name", property_to_search: 'name_with_email', load: [email: @tutor.email, name_with_email: "#{@tutor.name} #{@tutor.email}"]}}, label: false - else = f.input :user_emails, input_html: {class: 'select2-field center-placeholder', autocomplete: :off, data: {target: user_favorites_path(current_user), tokenize_email: true, multiple: true, token_value: 'email',placeholder: "Enter name"}}, label: false .row.align-center.pt20 = f.button :submit, 'Create Event', class:'fs9' - if @tutoring_session #booking-session.hide - if (!@tutoring_session.tutor == current_user or @tutoring_session.tutor) .tutoring-session-form = render 'tutoring_sessions/form', locals: {tutoring_session: @tutoring_session} - else .col-sm-12.text-left.pt20 = text_field_tag :tutor_id, '', class: 'select2-field', placeholder: 'Search Tutor', autocomplete: :off, data: {url: api_tutors_path, multiple: false, target: '#booking-session .tutoring-session-form', session_url: new_tutor_tutoring_session_path('TUTOR-ID'), start_time: params[:start_time], end_time: params[:end_time]}, id: 'choose-tutor-for-tutoring-session' .clearfix .tutoring-session-form .clearfix