From 4ae69b99b22f50b9bc31d60126bb0dc805c7b11b Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Thu, 17 Oct 2013 15:36:09 +0200 Subject: Always create radio and checkbox with label https://fedorahosted.org/freeipa/ticket/3904 --- install/ui/src/freeipa/aci.js | 23 ++++--- install/ui/src/freeipa/dns.js | 8 ++- install/ui/src/freeipa/host.js | 8 +-- install/ui/src/freeipa/widget.js | 145 ++++++++++++++++++++++++++------------- 4 files changed, 116 insertions(+), 68 deletions(-) (limited to 'install/ui/src/freeipa') diff --git a/install/ui/src/freeipa/aci.js b/install/ui/src/freeipa/aci.js index 1326f1b0..b848073b 100644 --- a/install/ui/src/freeipa/aci.js +++ b/install/ui/src/freeipa/aci.js @@ -510,16 +510,17 @@ IPA.attributes_widget = function(spec) { var tr = $('').appendTo($('thead', that.table)); + var th = $('').appendTo(tr); + IPA.standalone_option({ + type: "checkbox", + click: function() { + $('.aci-attribute', that.table). + prop('checked', $(this).prop('checked')); + that.value_changed.notify([], that); + } + }, th); + tr.append($('', { - html: $('', { - type: "checkbox", - click: function() { - $('.aci-attribute', that.table). - prop('checked', $(this).prop('checked')); - that.value_changed.notify([], that); - } - }) - })).append($('', { 'class': 'aci-attribute-column', html: text.get('@i18n:objects.aci.attribute') })); @@ -545,7 +546,7 @@ IPA.attributes_widget = function(spec) { var td = $('').appendTo(tr); var name = that.get_input_name(); var id = that._option_next_id + name; - td.append($('',{ + IPA.standalone_option({ id: id, type: 'checkbox', name: name, @@ -554,7 +555,7 @@ IPA.attributes_widget = function(spec) { change: function() { that.value_changed.notify([], that); } - })); + }, td); td = $('').appendTo(tr); td.append($('