docbrown/app/views/admin/events/new.html.erb
Andy Zhao b80dae1436
Update data exporter to handle admin send (#10274)
* Update data exporter to handle admin send

* Match button with everything else

* Use proper redirect path

* Stub SiteConfig definition instead of setting it

Co-authored-by: Mac Siri <krairit.siri@gmail.com>

* Removed if statement by accident oops

* Remove non-functional boolean param and pass email directly

* Use refinement to conv to boolean instead of JSON.parse

* Rename to StringToBoolean

* Use 'using' in proper scope (not in method)

* Rename to_bool to to_boolean

* Refactor if statement, thanks rhymes!

* Fix small bugs in tests

* Remove tracking for export_email b/c no @user

Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2020-10-26 18:00:56 -04:00

55 lines
No EOL
2.1 KiB
Text

<h2 class="crayons-title mb-6">Create Event</h2>
<div class="crayons-card p-6">
<%# form_with url: admin_ %>
</div>
<div class="form-group">
<%= f.label :cover_image %>:
<%= f.file_field :cover_image, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :profile_image %> (for live notification):
<%= f.file_field :profile_image, class: "form-control" %>
<img src="<%= event.profile_image_url %>" style="width: 25%;" alt="event profile image">
</div>
<div class="form-group">
<%= f.label :title %>
<%= f.text_field :title, maxlength: 90, size: 40, required: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :host_name %>
<%= f.text_field :host_name, size: 40, required: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :category %>
<%= f.select :category, ["AMA", "Workshop", "Talk", "Town Hall"], required: true %>
</div>
<div class="form-group">
<%= f.label :starts_at %>
<%= f.datetime_select :starts_at, required: true, include_blank: true, start_year: Time.current.year, end_year: Time.current.year + 2, class: "form-control" %> UTC Time Only (4 hours ahead of eastern time)
</div>
<div class="form-group">
<%= f.label :ends_at %>
<%= f.datetime_select :ends_at, required: true, include_blank: true, start_year: Time.current.year, end_year: Time.current.year + 2, class: "form-control" %> UTC Time Only (4 hours ahead of eastern time)
</div>
<div class="form-group">
<%= f.label :location_name %>
<%= f.text_field :location_name, required: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :location_url %>
<%= f.text_field :location_url, required: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :description_markdown %>
<%= f.text_area :description_markdown, size: "45x10", required: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :published %>
<%= f.check_box :published %>
</div>
<div class="form-group">
<%= f.label :live_now %>
<%= f.check_box :live_now %>
</div>
<%= f.submit class: "btn btn-primary" %>