[Libreoffice-commits] online.git: Branch 'feature/jsdialogs' - loleaflet/src

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 26 13:50:32 UTC 2019


 loleaflet/src/control/Control.JSDialogBuilder.js |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 11405ffb732162e52cfaab28a398d998359f8a14
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Sep 26 15:50:05 2019 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Sep 26 15:50:05 2019 +0200

    jsdialogs: correctly create radiobutton
    
    Change-Id: I677c8ac094d10c4a3de4fe5d1f491140796f33ac

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index b2e656847..6f19136f5 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -175,9 +175,12 @@ L.Control.JSDialogBuilder = L.Control.extend({
 	},
 
 	_radiobuttonControl: function(parentContainer, data, builder) {
-		var radiobutton = L.DomUtil.create('input', '', parentContainer);
-		radiobutton.type = 'radiobutton';
-		radiobutton.value = builder._cleanText(data.text);
+		var radiobutton = L.DomUtil.createWithId('input', data.id, parentContainer);
+		radiobutton.type = 'radio';
+
+		var radiobuttonLabel = L.DomUtil.create('label', '', parentContainer);
+		radiobuttonLabel.innerHTML = builder._cleanText(data.text);
+		radiobuttonLabel.for = data.id;
 
 		if (data.enabled == 'false')
 			$(radiobutton).attr('disabled', 'disabled');


More information about the Libreoffice-commits mailing list