Sha256: d76e334f151d8c9c9a7adfdb9d5184ff3ee06d74cc2fbe959458df564a087f2a

Contents?: true

Size: 1.32 KB

Versions: 11

Compression:

Stored size: 1.32 KB

Contents

<%
   @form =  current_site.contact_forms.where({slug: attributes['slug']}).first
   if @form.present?

     values_fields =  (flash[:values].present?)? flash[:values].to_sym : {}
     values = JSON.parse(@form.value).to_sym
     settings = JSON.parse(@form.settings).to_sym
     r = {form: @form, form_class: "railscf-form railscf-form-group", before_form: "", after_form: "", submit: "<div class='form-group'>
                    <button class='submit_btn btn btn-default pull-right' type='submit'>[submit_label]</button>
                    </div>"}
   hooks_run("contact_form_render", r)
%>
    <section>
        <%= raw r[:before_form] %>
        <%= form_for @form, url: plugins_contact_form_save_form_path, html: {method: "post", class: r[:form_class], multipart: true} do |f| %>

            <%= hidden_field_tag "id", @form.id %>
            <%= render :partial => "flash_messages" %>
            <%= raw form_element_bootstrap_object(r[:form], values[:fields], values_fields) %>
            <% if values[:fields].present? %>
                <%= raw  r[:submit].sub('[submit_label]', settings[:railscf_form_button][:name_button])%>
            <% end %>
            <%= raw front_editor_link(edit_admin_plugins_contact_form_admin_form_url(@form.id)) rescue "" %>
        <% end %>
        <%= raw r[:after_form] %>
    </section>
<% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
camaleon_cms-1.1.0 app/apps/plugins/contact_form/views/forms_shorcode.html.erb
camaleon_cms-1.0.9 app/apps/plugins/contact_form/views/forms_shorcode.html.erb
camaleon_cms-1.0.8 app/apps/plugins/contact_form/views/forms_shorcode.html.erb
camaleon_cms-1.0.7 app/apps/plugins/contact_form/views/forms_shorcode.html.erb
camaleon_cms-1.0.6 app/apps/plugins/contact_form/views/forms_shorcode.html.erb
camaleon_cms-1.0.5 app/apps/plugins/contact_form/views/forms_shorcode.html.erb
camaleon_cms-1.0.4 app/apps/plugins/contact_form/views/forms_shorcode.html.erb
camaleon_cms-1.0.3 app/apps/plugins/contact_form/views/forms_shorcode.html.erb
camaleon_cms-1.0.2 app/apps/plugins/contact_form/views/forms_shorcode.html.erb
camaleon_cms-1.0.1 app/apps/plugins/contact_form/views/forms_shorcode.html.erb
camaleon_cms-1.0 app/apps/plugins/contact_form/views/forms_shorcode.html.erb