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:
Jo-Philipp Wich 2020-04-16 15:39:54 +02:00
parent e822382a98
commit 111670245e

View file

@ -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')) : ''
])
]);