luci-base: remove hardcoded cgi-bin path
[oweals/luci.git] / modules / luci-mod-system / htdocs / luci-static / resources / view / system / flash.js
index 05e1434f15a1f4eae0f797fe1d4e28d05e6a110f..b1cc4d1a6f83a6e2421e01f7e42e7572cbcc7551 100644 (file)
@@ -76,7 +76,7 @@ return L.view.extend({
        handleBackup: function(ev) {
                var form = E('form', {
                        method: 'post',
-                       action: '/cgi-bin/cgi-backup',
+                       action: L.env.cgi_base + '/cgi-backup',
                        enctype: 'application/x-www-form-urlencoded'
                }, E('input', { type: 'hidden', name: 'sessionid', value: rpc.getSessionID() }));
 
@@ -169,7 +169,7 @@ return L.view.extend({
                var mtdblock = L.dom.parent(ev.target, '.cbi-section').querySelector('[data-name="mtdselect"] select').value;
                var form = E('form', {
                        'method': 'post',
-                       'action': '/cgi-bin/cgi-download',
+                       'action': L.env.cgi_base + '/cgi-download',
                        'enctype': 'application/x-www-form-urlencoded'
                }, [
                        E('input', { 'type': 'hidden', 'name': 'sessionid', 'value': rpc.getSessionID() }),