I think so too. My almost addons have that feature. This is a issue that Q2A core should improve.
Plugin example:
qa-plugin.php:
<?php if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser header('Location: ../../'); exit; } qa_register_plugin_layer('qa-reset-confirm.php', 'Reset confirm');
qa-reset-confirm.php:
<?php if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser header('Location: ../../'); exit; } class qa_html_theme_layer extends qa_html_theme_base { function form_button_data($button, $key, $style) { if($this->template === 'admin' && $key === 'reset') $button['tags'] .= ' onclick="javascript:return confirm(\'Settings reset to default. Are you OK?\');"'; qa_html_theme_base::form_button_data($button, $key, $style); } }
Update:
if($this->template === 'admin' && $key === 'reset') // <<< Updated !
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.