Fix artist commentary dialog submitting wrong form.

This commit is contained in:
evazion
2017-01-11 00:19:25 -06:00
parent 87bcc07fae
commit 8a67cb847d
2 changed files with 3 additions and 3 deletions

View File

@@ -36,7 +36,7 @@
width: 500, width: 500,
buttons: { buttons: {
"Submit": function() { "Submit": function() {
$("#add-commentary-dialog form").submit(); $("#add-commentary-dialog #edit-commentary").submit();
$(this).dialog("close"); $(this).dialog("close");
}, },
"Cancel": function() { "Cancel": function() {
@@ -45,7 +45,7 @@
} }
}); });
$('#add-commentary-dialog form').submit(function() { $('#add-commentary-dialog #edit-commentary').submit(function() {
$('#add-commentary-dialog').dialog('close'); $('#add-commentary-dialog').dialog('close');
}); });

View File

@@ -10,7 +10,7 @@
</div> </div>
</form> </form>
<%= form_tag(create_or_update_artist_commentaries_path(:format => :js), :remote => true, :class => "simple_form", :method => :put) do %> <%= form_tag(create_or_update_artist_commentaries_path(:format => :js), :remote => true, :id => "edit-commentary", :class => "simple_form", :method => :put) do %>
<%= hidden_field :artist_commentary, :post_id, :value => @post.id %> <%= hidden_field :artist_commentary, :post_id, :value => @post.id %>
<div class="input"> <div class="input">