51 lines
1.8 KiB
Plaintext
51 lines
1.8 KiB
Plaintext
=semantic_form_for [:admin, @m_event], :remote => true do |f|
|
|
|
|
.content
|
|
=f.inputs do
|
|
= f.input :m_event_type_title, :label => "Type d'évenement :", :collection => ["Ecole / Stage de pilotage", "Roulage encadré", "Roulage libre"]
|
|
=# f.input :circuit, :label => "Circuit :", :member_label => :member_label, :collection => Circuit.order("name").all
|
|
=render :partial => "qi/autocomplete", :locals => {:form => f, :field => :circuit, :label => "Circuit :"}
|
|
|
|
=render :partial => "qi/autocomplete", :locals => {:form => f, :field => :organisateur, :label => "Organisateur :"}
|
|
|
|
=# f.input :organisateur, :label => "Organisateur :", :member_label => :member_label, :collection => Organisateur.order("name").all
|
|
= f.input :start_at, :label => "Date de début :", :as => :date, :input_html => {:id => "start_at_input"}
|
|
= f.input :end_at, :label => "Date de fin :" , :as => :date, :input_html => {:id => "end_at_input"}
|
|
= f.input :title, :label => "Titre :"
|
|
= f.input :link, :label => "Lien réservation :"
|
|
= f.input :description, :label => "Description :" , :input_html => {:class => "redactor_textarea"}
|
|
= f.input :image_file_id, :label => "Image :", :as => :qi_image_select
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.actions=f.submit "sauvegarder", :class => "btn btn-primary"
|
|
|
|
|
|
|
|
:coffeescript
|
|
$("#start_at_input").focusout ->
|
|
if $("#end_at_input").val() == ""
|
|
$("#end_at_input").val($(this).val())
|
|
|
|
:javascript
|
|
$(".redactor_textarea").redactor({
|
|
focus: true,
|
|
callbacks: {
|
|
init: function()
|
|
{
|
|
|
|
}
|
|
}
|
|
});
|
|
|
|
:css
|
|
.redactor-editor{
|
|
padding: 24px 32px;
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.07);
|
|
} |