summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-03-29 13:24:06 +0200
committerEndi Sukma Dewata <edewata@people01.fedoraproject.org>2011-04-21 19:03:03 +0000
commitd9c17612341af82405873dde120b177dbc0abd83 (patch)
treeefe86d6d9a001aff312079f3874a9c98c8058d63
parent5700920627b8ac5e303e37d23a0051d0799a4801 (diff)
downloadfreeipa-d9c17612341af82405873dde120b177dbc0abd83.tar.gz
freeipa-d9c17612341af82405873dde120b177dbc0abd83.tar.xz
freeipa-d9c17612341af82405873dde120b177dbc0abd83.zip
Remove unwanted trimming in text fields
UI trims whitespace at the beginning or at the end when user data are being saved. This confuses is_dirty function which incorrectly recognizes given field as modified. This patch fixes this issue for both general text fields and ACI filter field. https://fedorahosted.org/freeipa/ticket/1096
-rw-r--r--install/ui/aci.js2
-rw-r--r--install/ui/widget.js8
2 files changed, 5 insertions, 5 deletions
diff --git a/install/ui/aci.js b/install/ui/aci.js
index e7e0c563d..55d514cfc 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -422,7 +422,7 @@ IPA.target_section = function(spec) {
that.filter_text.save = function(){
var input = $('input[name="'+that.filter_text.name+'"]',
that.filter_text.container);
- var value = $.trim(input.val());
+ var value = input.val();
return value === '' ? [] : [value];
};
diff --git a/install/ui/widget.js b/install/ui/widget.js
index 8680086ec..ba02a8440 100644
--- a/install/ui/widget.js
+++ b/install/ui/widget.js
@@ -358,7 +358,7 @@ IPA.text_widget = function(spec) {
} else {
var input = $('input[name="'+that.name+'"]', that.container);
- var value = $.trim(input.val());
+ var value = input.val();
return value === '' ? [] : [value];
}
};
@@ -477,7 +477,7 @@ IPA.multivalued_text_widget = function(spec) {
if (that.read_only || !that.writable) {
$('label[name="'+that.name+'"]', that.container).each(function() {
var input = $(this);
- var value = $.trim(input.html());
+ var value = input.html();
values.push(value);
});
@@ -486,7 +486,7 @@ IPA.multivalued_text_widget = function(spec) {
var input = $(this);
if (input.is('.strikethrough')) return;
- var value = $.trim(input.val());
+ var value = input.val();
values.push(value);
});
}
@@ -1482,4 +1482,4 @@ IPA.entity_select_widget = function(spec) {
};
return that;
-}; \ No newline at end of file
+};