module VenueAdminHelper include ActionView::Helpers::FormOptionsHelper include OrbitFormHelper alias :org_datetime_picker :datetime_picker def datetime_picker(*arg,**args) tp = org_datetime_picker(*arg,**args) venue = @template.instance_variable_get(:@venue) if !venue.nil? base_name = @object.class.to_s.underscore calendar_types = @template.instance_variable_get(:@calendar_types) style_attr = '' calendar_show = !@object['calendar_dict'][arg[0]].nil? hide_style = " style=\"display: none;\"" if !@object.send(arg[0].to_s+'_reminder') style_attr = hide_style end style_attr2 = calendar_show ? '' : hide_style onclick_func = "function reminder_switch(ele){ if ($(ele).prop('checked')){ $(ele).parents('.controls').find('.email_reminder').show() }else{ $(ele).parents('.controls').find('.email_reminder').hide() } };reminder_switch(this)" onclick_func1 = "function reminder_switch_calendar(ele){ if ($(ele).prop('checked')){ $(ele).parents('.controls').find('.calendar_div').show() }else{ $(ele).parents('.controls').find('.calendar_div').hide() } };reminder_switch_calendar(this)" tp2 = content_tag(:div, :style => "float: left;flex-wrap: wrap;display: inline-flex;margin-left: 1em;align-items: center;") do self.check_box((arg[0].to_s+'_reminder').to_sym,:onclick => onclick_func) + "#{I18n.t('venue_management.send_email_reminder')}