Commit 20653347 authored by bryanbraun's avatar bryanbraun Committed by TravisCarden

Issue #2132439 by bryanbraun: Alert Dialog appears when attempting to save the checklist.

parent 37b491f1
......@@ -53,6 +53,12 @@
return Drupal.t('Your changes will be lost if you leave the page without saving.');
}
});
$('#checklistapi-checklist-form').submit(function() {
$(window).unbind('beforeunload');
});
$('#checklistapi-checklist-form .clear-saved-progress').click(function() {
$(window).unbind('beforeunload');
});
}
};
......
......@@ -157,6 +157,7 @@ function checklistapi_checklist_form($form, &$form_state, $id) {
),
'clear' => array(
'#access' => $checklist->hasSavedProgress(),
'#attributes' => array('class' => array('clear-saved-progress')),
'#href' => $checklist->path . '/clear',
'#title' => t('Clear saved progress'),
'#type' => 'link',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment