
	
= semantic_form_for [:portlet, @event_content], :remote => true do |form| 
	
	
		


	%br
	

	= form.inputs do 

		
		= form.input :event_type, :label => "Type d'événement :", :as => :select, :collection => EventContent::TYPES, :include_blank => false
		
		.event_date_form{:style => "position:relative;z-index:1000;"}
			-if form.object.errors.messages[:start_at_date] or form.object.errors.messages[:start_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.
			%p
				=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"
				%span.event_time
					=form.label :start_at_time, "heure :"
					=form.text_field :start_at_time, :id => "event_start_at_time", :class => "timepicker", :style => "width:50px"
		
		
		
		= form.input :image_file_id, :label => "Image :" , :as => :qi_image_select
		

		= form.input :title, :label => "Titre :" 
		= form.input :artist, :label => "Artiste :" 
		= form.input :tremplin, :label => "Tremplin ?", :as => :boolean
		= form.input :description, :label => "Description :", :as => :text
		
		= form.input :place, :label => "Lieu :" 
		= form.input :address, :label => "Adresse :", :as => :text

	
		
		= form.input :with_cible, :as => :boolean, :label => "Avec lien ?", :input_html => { :onchange => "if ($('#with_cible').is(':checked')) {  $('#with_cible').closest('form').find('.cible_space').show(); }else{ $('#with_cible').closest('form').find('.cible_space').hide(); }", :id => "with_cible" }, :label_html => {:onchange => ""}

		
	

		.cible_space{:style => ((!@event_content.cible and !@event_content.with_cible) ? "display:none;" : "display:block;" )}
			= form.inputs do 
				= form.input :cible, :label => "Cible :" , :as => :qi_cible_select
				= form.input :popup, :label => "Ouvrir dans une popup ?", :as => :boolean


	= form.submit "Sauvegarder", :class => "btn btn-primary"


