ipa/freeipa-3.0.0.pre1-028-differentiation-of-widget-type-and-text_widget-input.patch
2012-08-06 18:17:49 +02:00

51 lines
2.1 KiB
Diff

From 7fcca4fa52196ea0082942f9ac39937c097a2064 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvoborni@redhat.com>
Date: Thu, 12 Jul 2012 14:43:47 +0200
Subject: [PATCH 28/79] 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(-)
diff --git a/install/ui/widget.js b/install/ui/widget.js
index 64547da7d439cb622c03d6f73afb310be83a6338..6864d88f5f08a4064b9b5b1cded527d5e99504ff 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;
--
1.7.11.2