summaryrefslogtreecommitdiff
path: root/views/model_name_edit.haml
blob: d92c68a487f2a7579e2abcf658800cfa477bf382 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
- 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}
  });
%form{:name => "form", :action => url_for("/model/#{model.id}"), :method => "post", :enctype => "multipart/form-data" }
  %input{:type => 'text', :name => 'name', :id => "model_#{model.id}_name", :class => 'input_model_name', :size => '40', :value => model.name}
  %input{:type => 'hidden', :name => 'id', :id => 'id', :value => model.id}
  %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 => "#", :id => "cancel_#{model.id}"} Cancel