<div class="row">
  <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
    <div class="card">
      <div class="body">
        <%= simple_form_for([:settings,@item, @settings_menu_item_instances]) do |f| %>
        <% if(flash["instance_code_error"]) %>
          <div class="alert alert-danger">Please review the problems below:</div>
        <% end %>

        <div class="col-md- panel">
          <div class="form-group p-l-15">
            <%= f.input :item_instance_code ,:input_html=>{:class=>""},:required=>true  %>
            
            <% flash.each do |test, msg| %>
              <% str="[\"#{msg['item_instance_code']}\"]"
                 str.gsub!('["', '')
                 str.gsub!('"]', '')
              %>
              <span class="help-block"><%= str %></span>
            <% end %>

            <%= f.input :item_instance_name %>
            <%= f.input :price %>

            <%= f.input :item_attributes, collection: @item.item_attributes, include_blank: false, include_hidden: false%>

            <%= f.input :is_on_promotion %>
            <%= f.input :promotion_price %>      
          
            <%= f.input :is_available %>
            <%= f.input :is_default %>

            <%= f.input :item_sets, :collection => @item_sets, :input_html => { :multiple => true },  :class => "form-control item_sets" %>
            </div>
          </div>

          <div class="form-actions p-l-15">
             <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
          </div>
        <% end %>
        </div>
      </div>
    </div>
  <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
    <div class="card">
      <div class="body">
        <h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
        <p>
        1) <%= t("views.right_panel.detail.item_instance_code") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.code_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %><br>
        2) <%= t("views.right_panel.detail.item_instance_name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <%= t("views.right_panel.detail.name_txt2") %><br>
        3) <%= t("views.right_panel.detail.price") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.price_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %><br>
        4) <%= t("views.right_panel.detail.item_attributes") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.item_attributes_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %><br>
        5) <%= t("views.right_panel.detail.is_on_promotion") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.promotion_txt") %><br>
        6) <%= t("views.right_panel.detail.promotion_price") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.promotion_txt") %> <%= t("views.right_panel.detail.price_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %><br>
        7) <%= t("views.right_panel.detail.is_available") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.status_txt") %><br>
        8) <%= t("views.right_panel.detail.is_default") %> - <%= t("views.right_panel.detail.checkbox") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.default_txt") %><br>
        9) <%= t("views.right_panel.detail.item_set") %> - <%= t("views.right_panel.detail.multi_select_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.item_set_txt") %><br>
        </p>
        <h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
        <p>
        1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.menu_item_instance_txt") %> <br>
        </p>
        <h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
        <p>
          1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
          2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.menu_item_txt") %> <br>
        </p>
      </div>
    </div>  
  </div>
</div>
