luci-mod-system: flash.js: rename handleReset to handleFirstboot
authorJo-Philipp Wich <jo@mein.io>
Wed, 25 Sep 2019 17:37:27 +0000 (19:37 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 25 Sep 2019 17:37:27 +0000 (19:37 +0200)
Rename the procedure to prevent a name clash with the standard view action
which we intentionally disable.

Ref: https://github.com/openwrt/luci/commit/3c40a7450a9b7d340cdc9e233818c63a8092fec2#commitcomment-35233207
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js

index 9ad64dad487319956556025f0239501330e5c6c3..bea587625d81ca4a9d25a8eb93b4043c5978fae7 100644 (file)
@@ -239,7 +239,7 @@ return L.view.extend({
                form.parentNode.removeChild(form);
        },
 
-       handleReset: function(ev) {
+       handleFirstboot: function(ev) {
                if (!confirm(_('Do you really want to erase all settings?')))
                        return;
 
@@ -499,7 +499,7 @@ return L.view.extend({
                        o = ss.option(form.Button, 'reset', _('Reset to defaults'));
                        o.inputstyle = 'negative important';
                        o.inputtitle = _('Perform reset');
-                       o.onclick = this.handleReset;
+                       o.onclick = this.handleFirstboot;
                }
 
                o = ss.option(form.Button, 'restore', _('Restore backup'), _('Custom files (certificates, scripts) may remain on the system. To prevent this, perform a factory-reset first.'));