%%# Renders a partial which is used to create a new <%= instance_name %> %>
<<<<<<< Local Changes
<%%= form_for(@<%= instance_name %>, :html => {:id=>"form_<%= instance_name %>", :class=>"margin-bottom-0", :method => (@<%= instance_name %>.new_record? ? :post : :put), :remote=>true}) do |f| %>
<%%= @<%= instance_name %>.errors[:base].to_sentence %>
<%%= hidden_field_tag :faction, @<%= instance_name %>.new_record? ? <%= instances_name %>_path : <%= instance_name %>_path(@<%= instance_name %>) %>
<%%= hidden_field_tag :fmethod, @<%= instance_name %>.new_record? ? "POST" : "PUT" %>
<%- fields.each do |name, type| %>
<%%= render :partial=>"field", :locals=>{:object=>@<%= instance_name %>,
:object_name=>'<%= instance_name %>',
:field_name=>'<%= name %>',
:display_name=>'<%= name.titleize %>',
:field_type=>'<%= type %>',
:input_type=>'<%= guess_input_type(name, type) %>',
:required=>true,
:place_holder=>"e.g: Put a suitable example here."} %>
<%- end -%>
<%% button_text = "#{@<%= instance_name %>.new_record? ? "Create" : "Update"} Item" %>
<%% if @<%= instance_name %>.new_record? %>
<%%= link_to "Cancel", "#", :class => "btn", :remote=>true %>
<%% else %>
<%%= link_to 'Back', <%= resource_link('index', 'path') %>, :class=>"btn margin-left-10", :remote => true unless @<%= instance_name %>.new_record? %>
<%% end %>
<%%= f.submit button_text, "data-reset-text"=>button_text, "data-loading-text"=>"Saving ...", :class=>"btn btn-primary margin-left-10" %>
<%% end %>
<%%# Renders a partial which is used to create a new <%= instance_name %> %>
<%%= simple_form_for(<%= form_link_param %>, :html => {:class=>"form-vertical", :style => "margin-bottom:0px;", :method => (@<%= instance_name %>.new_record? ? :post : :put), :remote=>true}) do |f| %>
=======
<%%= form_for(@<%= instance_name %>, :html => {:id=>"form_<%= instance_name %>", :class=>"margin-bottom-0", :method => (@<%= instance_name %>.new_record? ? :post : :put), :remote=>true}) do |f| %>
>>>>>>> External Changes
<%%= @<%= instance_name %>.errors[:base].to_sentence %>
<%%= hidden_field_tag :faction, @<%= instance_name %>.new_record? ? <%= resource_link('show', 'path') %> : <%= <%= resource_link('show', 'path') %>(@<%= instance_name %>) %>
<%%= hidden_field_tag :fmethod, @<%= instance_name %>.new_record? ? "POST" : "PUT" %>
<%- fields.each do |name, type| %>
<%%= render :partial=>"field", :locals=>{:object=>@<%= instance_name %>,
:object_name=>'<%= instance_name %>',
:field_name=>'<%= name %>',
:display_name=>'<%= name.titleize %>',
:field_type=>'<%= type %>',
:input_type=>'<%= guess_input_type(name, type) %>',
:required=>true,
:place_holder=>"e.g: Put a suitable example here."} %>
<%- end -%>
<%% button_text = "#{@<%= instance_name %>.new_record? ? "Create" : "Update"} Item" %>
<%% if @<%= instance_name %>.new_record? %>
<%%= link_to "Cancel", "#", :class => "btn", :remote=>true %>
<%% else %>
<%%= link_to 'Back', <%= resource_link('index', 'path') %>, :class=>"btn margin-left-10", :remote => true unless @<%= instance_name %>.new_record? %>
<%% end %>
<%%= f.submit button_text, "data-reset-text"=>button_text, "data-loading-text"=>"Saving ...", :class=>"btn btn-primary margin-left-10" %>
<%% end %>