Skip to content
Snippets Groups Projects
Commit c4135386 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge branch 'feature/discard-warning' of github.com:protich/osTicket-1.7 into develop

parents a3e65233 74788ace
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,10 @@ $(document).ready(function(){
if(!fObj.data('changed')){
fObj.data('changed', true);
$('input[type=submit]', fObj).css('color', 'red');
$(window).bind('beforeunload', function(e) {
e.returnValue='Are you sure you want to leave? Any changes or info you\'ve entered will be discarded!';
return e.returnValue;
});
}
});
......@@ -97,9 +101,19 @@ $(document).ready(function(){
$('label', fObj).removeAttr('style');
$('label', fObj).removeClass('strike');
fObj.data('changed', false);
$(window).unbind('beforeunload');
}
});
$('form#save').submit(function() {
$(window).unbind('beforeunload');
return true;
});
$('select#setting_options').change(function() {
$(this).closest('form').submit();
});
$(".clearrule").live('click',function() {
$(this).closest("tr").find(":input").val('');
......
......@@ -44,7 +44,7 @@ require(STAFFINC_DIR.'header.inc.php');
<div style="padding-top:10px;padding-bottom:5px;">
<form method="get" action="settings.php">
Setting Option:
<select name="t" style="width:300px;">
<select id="setting_options" name="t" style="width:300px;">
<option value="">&mdash; Select Setting Group &mdash;</option>
<?php
foreach($SettingOptions as $k=>$v) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment