Sha256: 7df2d662535c5f0c115b8ebfe55427ce87e51da29abd2f4fc06b0dff8399e45e
Contents?: true
Size: 1.77 KB
Versions: 10
Compression:
Stored size: 1.77 KB
Contents
<% url_options ||= params_for(:action => form_action) xhr = request.xhr? if xhr.nil? as_action_config = active_scaffold_config.send(form_action) body_partial ||= 'form' %> <%= options = {:onsubmit => onsubmit, :id => element_form_id(:action => form_action), :multipart => as_action_config.multipart?, :class => "as_form #{form_action.to_s}", :method => method, 'data-loading' => true} cancel_options = {:class => 'as_cancel', 'data-refresh' => false} cancel_options[:remote] = true if xhr #cancel link does nt have to care about multipart forms if xhr && as_action_config.multipart? # file_uploads form_remote_upload_tag url_options.merge({:iframe => true}), options else options[:remote] = true if xhr && !as_action_config.multipart? form_tag url_options, options end -%> <h4><%= headline -%></h4> <div id="<%= element_messages_id(:action => form_action) %>" class="messages-container"> <% if request.xhr? -%> <% records = @error_records || Array(@record) records.each do |record| %> <%= active_scaffold_error_messages_for record, :object_name => "#{record.class.model_name.human.downcase}#{record.new_record? ? '' : ": #{record.to_label}"}" %> <% end %> <% else -%> <%= render :partial => 'form_messages' %> <% end -%> </div> <%= render :partial => body_partial, :locals => { :columns => as_action_config.columns } %> <p class="form-footer"> <%= submit_tag as_(form_action), :class => "submit" %> <%= link_to(as_(:cancel), main_path_to_return, cancel_options) if cancel_link %> <%= loading_indicator_tag(:action => form_action, :id => params[:id]) %> </p> </form> <%= javascript_tag("ActiveScaffold.focus_first_element_of_form('#{element_form_id(:action => form_action)}');") %>
Version data entries
10 entries across 10 versions & 2 rubygems