jipe_app/app/views/admin/petitions/_form.html.haml
2017-08-14 10:53:30 +02:00

66 lines
2.7 KiB
Plaintext
Executable File

=semantic_form_for [:admin, @petition] do |f|
=f.inputs do
= f.input :image_file_id, :label => "Image :" , :as => :qi_image_select
.row{:style => "margin:0 -15px;"}
=f.semantic_fields_for :petition_langs do |petition_lang|
.col-sm-6
%h3=petition_lang.object.lang_site.name
= petition_lang.inputs do
=# petition_lang.hidden_field :id
= petition_lang.hidden_field :lang_site_id
= petition_lang.input :big,:as => :boolean , :label => "Présentation enrichie ?"
= petition_lang.input :enabled,:as => :boolean , :label => "Publié ?"
= petition_lang.input :frontpage,:as => :boolean , :label => "Page d'accueil ?"
= petition_lang.input :title, :as => :string, :label => "Titre :"
= petition_lang.input :short_title, :as => :string, :label => "Titre court :"
= petition_lang.input :action_title, :as => :string, :label => "Titre pour l'intérieur de la pétition :"
-if @petition.id
=petition_lang.input :slug, :label => "Slug :"
= petition_lang.input :intro_text, :label => "Texte d'introduction :", :as => :text, :input_html => {:class => "redactor_textarea"}
= petition_lang.input :description, :label => "Description courte :", :as => :text, :input_html => {:class => "redactor_textarea"}
= petition_lang.input :reseau_text, :label => "Texte pour les réseaux :", :as => :text
= petition_lang.input :top_image_file_id, :label => "Image de bandeau :" , :as => :qi_image_select
= petition_lang.input :side1_image_file_id, :label => "Image de droite :" , :as => :qi_image_select
= petition_lang.input :side1_title, :as => :string, :label => "Titre de l'image de droite:"
= petition_lang.input :side2_image_file_id, :label => "Image de droite (2):" , :as => :qi_image_select
= petition_lang.input :side2_title, :as => :string, :label => "Titre de l'image de droite (2):"
= petition_lang.input :background_image_file_id, :label => "Image de fond :" , :as => :qi_image_select
= petition_lang.input :help_text, :label => "Texte de soutien :", :as => :text, :input_html => {:class => "redactor_textarea"}
%p
%br
=f.submit "sauvegarder", :class => "btn btn-primary"
:javascript
$(".redactor_textarea").redactor({
focus: true,
callbacks: {
init: function()
{
}
}
});
:css
.redactor-editor{
padding: 24px 32px;
border: 1px solid rgba(0, 0, 0, 0.07);
}