46 lines
1.1 KiB
Plaintext
Executable File
46 lines
1.1 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
|
|
|
|
=f.semantic_fields_for :petition_langs do |petition_lang|
|
|
|
|
%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 :enabled,:as => :boolean , :label => "Publié ?"
|
|
= petition_lang.input :title, :as => :string, :label => "Titre :"
|
|
= petition_lang.input :description, :label => "Description courte :", :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);
|
|
} |