luci-mod-system: system.js: rework local time widget markup
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3afe606743
)
This commit is contained in:
parent
9f4b6f7b92
commit
05ff8e0ec5
1 changed files with 22 additions and 22 deletions
|
@ -50,28 +50,28 @@ callTimezone = rpc.declare({
|
|||
CBILocalTime = form.DummyValue.extend({
|
||||
renderWidget: function(section_id, option_id, cfgvalue) {
|
||||
return E([], [
|
||||
E('span', {}, [
|
||||
E('input', {
|
||||
'id': 'localtime',
|
||||
'type': 'text',
|
||||
'readonly': true,
|
||||
'value': new Date(cfgvalue * 1000).toLocaleString()
|
||||
})
|
||||
]),
|
||||
' ',
|
||||
E('button', {
|
||||
'class': 'cbi-button cbi-button-apply',
|
||||
'click': ui.createHandlerFn(this, function() {
|
||||
return callSetLocaltime(Math.floor(Date.now() / 1000));
|
||||
})
|
||||
}, _('Sync with browser')),
|
||||
' ',
|
||||
this.ntpd_support ? E('button', {
|
||||
'class': 'cbi-button cbi-button-apply',
|
||||
'click': ui.createHandlerFn(this, function() {
|
||||
return callInitAction('sysntpd', 'restart');
|
||||
})
|
||||
}, _('Sync with NTP-Server')) : ''
|
||||
E('input', {
|
||||
'id': 'localtime',
|
||||
'type': 'text',
|
||||
'readonly': true,
|
||||
'value': new Date(cfgvalue * 1000).toLocaleString()
|
||||
}),
|
||||
E('br'),
|
||||
E('span', { 'class': 'control-group' }, [
|
||||
E('button', {
|
||||
'class': 'cbi-button cbi-button-apply',
|
||||
'click': ui.createHandlerFn(this, function() {
|
||||
return callSetLocaltime(Math.floor(Date.now() / 1000));
|
||||
})
|
||||
}, _('Sync with browser')),
|
||||
' ',
|
||||
this.ntpd_support ? E('button', {
|
||||
'class': 'cbi-button cbi-button-apply',
|
||||
'click': ui.createHandlerFn(this, function() {
|
||||
return callInitAction('sysntpd', 'restart');
|
||||
})
|
||||
}, _('Sync with NTP-Server')) : ''
|
||||
])
|
||||
]);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue