Skip to content

Commit

Permalink
Small change on modal html markup
Browse files Browse the repository at this point in the history
  • Loading branch information
maxailloud committed May 28, 2015
1 parent 684a7c8 commit b25582d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Resources/views/Lesson/deleteChapterPopup.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
{% include "IcapLessonBundle:Lesson:deleteChapterForm.html.twig"%}
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">{{ 'Cancel'|trans({}, 'icap_lesson') }}</button>
<button id="deleteSubmit" class="btn btn-primary">{{ 'confirm'|trans({}, 'icap_lesson') }}</button>
<button type="button" class="btn" data-dismiss="modal" aria-hidden="true">{{ 'Cancel'|trans({}, 'icap_lesson') }}</button>
<button type="submit" id="deleteSubmit" class="btn btn-primary">{{ 'confirm'|trans({}, 'icap_lesson') }}</button>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$('form[id="deleteChapterForm"] > input[type="submit"]').hide();
$('form[id="deleteChapterForm"] > a.cancel-btn').hide();
$('#deleteSubmit').on('click', function () {
$('#deleteSubmit').on('click', function (event) {
event.preventDefault();
//we keep the "click" on submit button for keep html5 warning
$('form[id="deleteChapterForm"] > input[type="submit"]').trigger('click');
});
Expand Down

0 comments on commit b25582d

Please sign in to comment.