diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-04-16 15:39:54 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-04-16 15:39:54 +0200 |
commit | 111670245e04fc13ad99336df8c2627566ec4b2f (patch) | |
tree | 20a7bc8afb58c0dbfdf43f2f6dec989f58ddb3d7 /modules/luci-mod-system/htdocs/luci-static | |
parent | e822382a98dfce0cfd729737ca068594266625a9 (diff) |
luci-mod-system: system.js: disable timesync buttons on readonly map
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-system/htdocs/luci-static')
-rw-r--r-- | modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js index ee97bd82f9..2e087f5f4c 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js @@ -62,14 +62,16 @@ CBILocalTime = form.DummyValue.extend({ 'class': 'cbi-button cbi-button-apply', 'click': ui.createHandlerFn(this, function() { return callSetLocaltime(Math.floor(Date.now() / 1000)); - }) + }), + 'disabled': (this.readonly != null) ? this.readonly : this.map.readonly }, _('Sync with browser')), ' ', this.ntpd_support ? E('button', { 'class': 'cbi-button cbi-button-apply', 'click': ui.createHandlerFn(this, function() { return callInitAction('sysntpd', 'restart'); - }) + }), + 'disabled': (this.readonly != null) ? this.readonly : this.map.readonly }, _('Sync with NTP-Server')) : '' ]) ]); |