Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
Merge branch 'feature/MSS-213' into develop
Browse files Browse the repository at this point in the history
* feature/MSS-213:
  MSS-213 jquery selector fix.
  MSS-213 Include bootstrap in fix.
  MSS-213 Fix for ajax buttons triggering the single click protection.
  • Loading branch information
svenhoutmeyers committed Nov 18, 2015
2 parents f3a9f0a + 40915a3 commit 73c1f9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions culturefeed_entry_ui/includes/culturefeed_entry_ui.pages.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2232,6 +2232,9 @@ function culturefeed_entry_ui_edit_tags_form($form, $form_state, $event) {


$form['submit'] = array(
'#attributes' => array(
'class' => array('main-submit'),
),
'#type' => 'submit',
'#value' => t('Submit'),
);
Expand Down
11 changes: 7 additions & 4 deletions culturefeed_entry_ui/js/culturefeed_entry_ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,17 @@ Drupal.Culturefeed_entry_ui = Drupal.Culturefeed_entry_ui || {};

attach: function () {

$('.form-submit').click(function () {
var form = $('#culturefeed-entry-ui-event-form');

if ($(this).hasClass('form-submitted')) {
form.submit(function(event) {
$(this).data('submitted', true);
});

$('.main-submit, .btn-primary').click(function () {
if (form.data('submitted') === true) {
$(this).attr('disabled', 'disabled');
return false;
}
$(this).addClass('form-submitted');

});

}
Expand Down

0 comments on commit 73c1f9a

Please sign in to comment.