luci-mod-system: system.js: disable timesync buttons on readonly map
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
e822382a98
commit
111670245e
1 changed files with 4 additions and 2 deletions
|
@ -62,14 +62,16 @@ CBILocalTime = form.DummyValue.extend({
|
||||||
'class': 'cbi-button cbi-button-apply',
|
'class': 'cbi-button cbi-button-apply',
|
||||||
'click': ui.createHandlerFn(this, function() {
|
'click': ui.createHandlerFn(this, function() {
|
||||||
return callSetLocaltime(Math.floor(Date.now() / 1000));
|
return callSetLocaltime(Math.floor(Date.now() / 1000));
|
||||||
})
|
}),
|
||||||
|
'disabled': (this.readonly != null) ? this.readonly : this.map.readonly
|
||||||
}, _('Sync with browser')),
|
}, _('Sync with browser')),
|
||||||
' ',
|
' ',
|
||||||
this.ntpd_support ? E('button', {
|
this.ntpd_support ? E('button', {
|
||||||
'class': 'cbi-button cbi-button-apply',
|
'class': 'cbi-button cbi-button-apply',
|
||||||
'click': ui.createHandlerFn(this, function() {
|
'click': ui.createHandlerFn(this, function() {
|
||||||
return callInitAction('sysntpd', 'restart');
|
return callInitAction('sysntpd', 'restart');
|
||||||
})
|
}),
|
||||||
|
'disabled': (this.readonly != null) ? this.readonly : this.map.readonly
|
||||||
}, _('Sync with NTP-Server')) : ''
|
}, _('Sync with NTP-Server')) : ''
|
||||||
])
|
])
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in a new issue