50 lines
2.2 KiB
Plaintext
50 lines
2.2 KiB
Plaintext
= semantic_form_for [:admin,@event], :remote => true do |form|
|
|
.content
|
|
= form.inputs do
|
|
= form.input :title, :label => "Titre :"
|
|
= form.hidden_field :event_id
|
|
=form.input :image_file_id, :as => :qi_image_select
|
|
.event_date_form
|
|
-if form.object.errors.messages[:start_at_date] or form.object.errors.messages[:start_at_time] or form.object.errors.messages[:stop_at_date] or form.object.errors.messages[:stop_at_time]
|
|
%p.errors
|
|
Tout les champs doivent être remplis. Les dates doivent être au format jj/mm/yyyy et les heures au format hh:mm.
|
|
.div
|
|
=form.label :start_at_date, "Début :", :style=>"display:inline-block;width:50px"
|
|
=form.text_field :start_at_date, :id => "event_start_at_date", :class => "datepicker"
|
|
.event_time{:style => "display:inline;"}
|
|
=form.label :start_at_time, "heure :"
|
|
.input-append.bootstrap-timepicke{:style => "display:inline-block;"}
|
|
=form.text_field :start_at_time, :id => "event_start_at_time", :class => "timepicker input-small", :style => "width:50px"
|
|
%span.add-on
|
|
%i.icon-time
|
|
|
|
|
|
=form.check_box :entire_day, :id => "event_entire_day"
|
|
=form.label :entire_day, "jour entier ?"
|
|
.div
|
|
%span.stop_at
|
|
=form.label :stop_at_date, "Fin :", :style=>"display:inline-block;width:50px"
|
|
=form.text_field :stop_at_date, :id => "event_stop_at_date", :class => "datepicker"
|
|
.event_time{:style => "display:inline;"}
|
|
=form.label :stop_at_time, "heure :"
|
|
.input-append.bootstrap-timepicke{:style => "display:inline-block;"}
|
|
=form.text_field :stop_at_time, :id => "event_stop_at_time", :class => "timepicker input-small", :style => "width:50px"
|
|
%span.add-on
|
|
%i.icon-time
|
|
|
|
|
|
=form.check_box :stop_date, :id => "event_stop_date"
|
|
=form.label :stop_date, "fin précisée ?"
|
|
|
|
|
|
= form.inputs do
|
|
= form.input :description, :label => "Description courte :", :as => :text
|
|
|
|
|
|
|
|
|
|
.actions
|
|
= form.submit "Sauvegarder", :class => "btn"
|
|
|
|
:javascript
|
|
update_event_form(); |