Merge remote-tracking branch 'origin/pull/12583'

This commit is contained in:
Michal Čihař 2016-12-01 12:03:48 +01:00
commit e76af4db99
2 changed files with 11 additions and 2 deletions

View File

@ -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();

View File

@ -11,5 +11,6 @@
<br />
<a href="#yes"><?= __('Yes') ?></a>
/ <a href="#no"><?= __('No') ?></a>
/ <a href="#delete"><?= __('Delete Settings') ?></a>
</form>
</div>
</div>