% unless (hide_submit ||= false) submit_button_text ||= t('.save') submit_button_id ||= "submit_button" submit_button_title ||= nil end hide_cancel = from_dialog? unless defined?(hide_cancel).presence unless hide_cancel cancel_button_text ||= t('.cancel') unless defined?(cancel_title) cancel_title = t('.cancel_lose_changes') end cancel_button_id ||= "cancel_button" cancel_url ||= (((back = url_for(:back)).include?('javascript') or action_name =~ /^(create|update)$/) ? refinery.send(Refinery.route_for_model(f.object.class, :plural => true)) : back) end continue_editing = defined?(continue_editing) ? continue_editing : (f.object.present? and f.object.persisted?) unless defined?(hide_delete).presence hide_delete = (from_dialog? or f.object.nil? or (f.object.respond_to?(:persisted?) ? !f.object.persisted? : f.object.new_record?) or (f.object.respond_to?(:deletable?) && !f.object.deletable?)) end unless hide_delete delete_button_text ||= t('.delete') delete_title ||= nil delete_confirmation ||= nil delete_button_id ||= "delete_button" # we have to use eval rather than refinery.send because this url may not exist for HTTP GET delete_url ||= eval("refinery.#{Refinery.route_for_model(f.object.class)}(#{f.object.id})") end -%> <% if from_dialog? %> <% end %>