Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
#55 cancel button on add/edit forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Vera Peeters committed Aug 11, 2013
1 parent a5e1d67 commit 1a96e30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/views/program_entries/_form_popup.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<%= errors_for @program_entry %>

<%= f.hidden_field :program_id %>
<%= f.hidden_field :slot %>
<%= f.hidden_field :track %>

<h3>Program version <%= @program_entry.program.version %> </h3>

<div class="in_a_form"> Session id <%= f.text_field :session_id, size: 3 %>
Expand All @@ -11,6 +14,7 @@

<div class="actions">
<%= f.submit %>
<a onclick="$(this).closest('form').remove()">cancel</a>
</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/program_entries/edit.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$('<%="#program_entry_#{@program_entry.id}"%>').hide().after('<%= j render("form_popup") %>');
$('<%="#program_entry_#{@program_entry.id}"%>').after('<%= j render("form_popup") %>');

2 changes: 1 addition & 1 deletion app/views/program_entries/new.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$('<%="#program_entry_#{@program_entry.slot}_#{@program_entry.track}"%>').hide().after('<%= j render("form_popup") %>');
$('<%="#program_entry_#{@program_entry.slot}_#{@program_entry.track}"%>').after('<%= j render("form_popup") %>');

0 comments on commit 1a96e30

Please sign in to comment.