% url_options = params_for(:action => :create) -%> <%# AST Begin -%> <% submit_options = {} -%> <%# AST End -%> <%= if active_scaffold_config.create.multipart? # file_uploads # AST Begin submit_options = {:onclick => "$('#{loading_indicator_id(:action => :create, :id => params[:id])}').style.visibility = 'visible';this.form.submit();"} # AST End form_remote_upload_tag url_options.merge({:iframe => true}), :onsubmit => onsubmit, :id => element_form_id(:action => :create), :class => 'create' else form_remote_tag :url => url_options, :after => "$('#{loading_indicator_id(:action => :create, :id => params[:id])}').style.visibility = 'visible'; Form.disable('#{element_form_id(:action => :create)}');", :complete => "$('#{loading_indicator_id(:action => :create, :id => params[:id])}').style.visibility = 'hidden'; Form.enable('#{element_form_id(:action => :create)}');", :failure => "ActiveScaffold.report_500_response('#{active_scaffold_id}')", :html => { :href => url_for(url_options), :onsubmit => onsubmit, :id => element_form_id(:action => :create), :class => 'create' } end -%>