From 7fcca4fa52196ea0082942f9ac39937c097a2064 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Thu, 12 Jul 2012 14:43:47 +0200 Subject: 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 --- install/ui/widget.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'install/ui/widget.js') diff --git a/install/ui/widget.js b/install/ui/widget.js index 64547da7..6864d88f 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 = $('', { - 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; -- cgit