Sha256: 9ec597e53b2bffad4ec9377283e608e935dede1b6443e83a770e9f62f652eb2d

Contents?: true

Size: 1.55 KB

Versions: 4

Compression:

Stored size: 1.55 KB

Contents

<div class = "widget-body">
  <div class = "widget-forms clearfix">
  <%= custom_form_for(@product, {:class => "form-horizontal"}) do |f| %>
    <%= render 'shared/error_messages', :object => @product %>
    <%= f.text_field :name, :label => t("model.attributes.Adminpanel::Product.name"), :placeholder => t("model.attributes.Adminpanel::Product.name") %>
    <%= f.text_field :brief, :label => t("model.attributes.Adminpanel::Product.brief"), :placeholder => t("model.attributes.Adminpanel::Product.brief") %>

    <div class="control-group">
      <label class="control-label"><%= t("Description") %></label>
      <div class="controls">
        <%= f.hidden_field :description, :id => "description-field" %>
        <% if @product.description.nil? %>
          <%= content_tag(:div, @product.description, :class => "editable", "data-placeholder" => t("Write description here")) %>
        <% else %>
          <%= content_tag(:div, @product.description.html_safe, :class => "editable controls", "data-placeholder" => t("Write description here")) %>
        <% end %>
      </div>
    </div>
    <%= f.select :category_id, @categories, :label => t("model.Category") %>

    <%= f.fields_for :images do |builder| %>
        <%= render 'image_fields', :f => builder, :model_name => @product.simple_name %>
    <% end -%>

    <%= link_to_add_fields t("Add Image"), f, :images, @product.simple_name %>
  </div>
</div>
  <div class = "widget-footer">
    <%= f.submit t("action.save"), :disable_with => 'Submiting...', :id => "save-button" %>
  </div>
  <% end -%>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
adminpanel-0.1.1 app/views/adminpanel/products/_product_form.html.erb
adminpanel-0.1.0cl.2 app/views/adminpanel/products/_product_form.html.erb
adminpanel-0.1.0cl app/views/adminpanel/products/_product_form.html.erb
adminpanel-0.1.0 app/views/adminpanel/products/_product_form.html.erb