luci-mod-system: system.js: rework local time widget markup
authorJo-Philipp Wich <jo@mein.io>
Mon, 23 Mar 2020 20:58:25 +0000 (21:58 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:40:49 +0000 (19:40 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3afe606743c44414f11f713b1557d4c0fb9faf80)

modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js

index d19b62fef975dc141299a43d010cd181cc8e72b5..ee97bd82f9523607d65eff3900dd3a0a313d51d5 100644 (file)
@@ -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')) : ''
+                       ])
                ]);
        },
 });