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

	= form.inputs do 
		= form.input :image_file_id, :label => "Image :" , :as => :qi_image_select
		

		= form.input :alt, :label => "Texte alternatif :" 
		
		= form.input :alignement, :label => "Alignement :", :as => :select, :collection => ImageContent::ALIGNS, :include_blank => false
		= form.input :style, :label => "Style :", :as => :select, :collection => ImageContent::STYLES, :include_blank => false
		= form.input :width, :label => "Largeur :" 
		= form.input :height, :label => "Hauteur :" 
	
		
		= 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();$('#with_cible').closest('form').find('.expandable').hide(); }else{ $('#with_cible').closest('form').find('.cible_space').hide();$('#with_cible').closest('form').find('.expandable').show(); }", :id => "with_cible" }, :label_html => {:onchange => ""}

		.expandable{:style => ((!@image_content.cible and !@image_content.with_cible) ? "display:block;" : "display:none;" )}
			= form.inputs do 
				= form.input :expandable,:as => :boolean , :label => "L'image peut être agrandie ? :"
	

		.cible_space{:style => ((!@image_content.cible and !@image_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"


