summaryrefslogtreecommitdiff
path: root/views/model_name_edit.haml
diff options
context:
space:
mode:
Diffstat (limited to 'views/model_name_edit.haml')
-rw-r--r--views/model_name_edit.haml7
1 files changed, 3 insertions, 4 deletions
diff --git a/views/model_name_edit.haml b/views/model_name_edit.haml
index aec59fc..d92c68a 100644
--- a/views/model_name_edit.haml
+++ b/views/model_name_edit.haml
@@ -1,5 +1,5 @@
-- js = "$('#cancel_#{model.id}').editModel('GET', {id: '#{model.id}', mode: 'show'});\n "
-- js = "$('#save_#{model.id}').saveModel('POST', {id: '#{model.id}', mode: 'show'});\n "
+- js = "$('#cancel_#{model.id}').cancelEdit({id: '#{model.id}', mode: 'show'});\n "
+- js += "$('#save_#{model.id}').saveModel({id: '#{model.id}', mode: 'show'});\n "
:javascript
$(function() {
#{js}
@@ -10,5 +10,4 @@
%input{:type => 'hidden', :name => 'subjectid', :id => 'subjectid', :value => session[:subjectid]}
%input{ :type => "submit", :value => "Save", :id => "save_#{model.id}", :class => "edit_button"}
%span{:class => "edit_button"}
- %a{:href => url_for("/model/#{model.id}/name?mode=show"), :id => "cancel_#{model.id}"} Cancel
-
+ %a{:href => "#", :id => "cancel_#{model.id}"} Cancel