diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2012-07-12 14:43:47 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2012-07-17 15:55:35 +0200 |
commit | 7fcca4fa52196ea0082942f9ac39937c097a2064 (patch) | |
tree | 8a6efb8de61058241987df41aa751df08feed435 /install | |
parent | 854b7636754643291800ec9d76ab081a870415e5 (diff) | |
download | freeipa-7fcca4fa52196ea0082942f9ac39937c097a2064.tar.gz freeipa-7fcca4fa52196ea0082942f9ac39937c097a2064.tar.xz freeipa-7fcca4fa52196ea0082942f9ac39937c097a2064.zip |
Differentiation of widget type and text_widget input type
There was a clash of 'type' attribute in widget's spec. Usually 'type' is used for telling a builder which field and widget to build. Text widget used this attribute also for definion of html input type. It was problematic for some special widgets, which defined own field and used text_widget, like service_type or dnszone_name. In those and possibly other cases it used widget type for specifying input type which lead to execution error in Internet Explorer. Firefox and Chrome took it.
This patch is changing text_widget's 'type' to 'input_type' which removes the collision and hence fixes the problem.
https://fedorahosted.org/freeipa/ticket/2806
and half of: https://fedorahosted.org/freeipa/ticket/2834
Diffstat (limited to 'install')
-rw-r--r-- | install/ui/widget.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/install/ui/widget.js b/install/ui/widget.js index 64547da7d..6864d88f5 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -231,7 +231,7 @@ IPA.text_widget = function(spec) { var that = IPA.input_widget(spec); that.size = spec.size || 30; - that.type = spec.type || 'text'; + that.input_type = spec.input_type || 'text'; that.select_range = function(start, end){ IPA.select_range(that.input, start, end); @@ -249,7 +249,7 @@ IPA.text_widget = function(spec) { }).appendTo(container); that.input = $('<input/>', { - type: that.type, + type: that.input_type, name: that.name, disabled: that.disabled, size: that.size, @@ -330,7 +330,7 @@ IPA.text_widget = function(spec) { IPA.password_widget = function(spec) { spec = spec || {}; - spec.type = 'password'; + spec.input_type = 'password'; var that = IPA.text_widget(spec); return that; |