Merge remote-tracking branch 'origin/pull/12583'
This commit is contained in:
commit
e76af4db99
10
js/config.js
10
js/config.js
@ -838,7 +838,7 @@ function updatePrefsDate()
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares message which informs that localStorage preferences are available and can be imported
|
||||
* Prepares message which informs that localStorage preferences are available and can be imported or deleted
|
||||
*/
|
||||
function offerPrefsAutoimport()
|
||||
{
|
||||
@ -857,6 +857,14 @@ function offerPrefsAutoimport()
|
||||
prefs_autoload: 'hide'
|
||||
}, null, 'html');
|
||||
return;
|
||||
} else if ($a.attr('href') == '#delete') {
|
||||
$cnt.remove();
|
||||
localStorage.clear();
|
||||
$.post('index.php', {
|
||||
token: $cnt.find('input[name=token]').val(),
|
||||
prefs_autoload: 'hide'
|
||||
}, null, 'html');
|
||||
return;
|
||||
}
|
||||
$cnt.find('input[name=json]').val(window.localStorage.config);
|
||||
$cnt.find('form').submit();
|
||||
|
||||
@ -11,5 +11,6 @@
|
||||
<br />
|
||||
<a href="#yes"><?= __('Yes') ?></a>
|
||||
/ <a href="#no"><?= __('No') ?></a>
|
||||
/ <a href="#delete"><?= __('Delete Settings') ?></a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user