mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-28 01:41:14 -06:00
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
This commit is contained in:
parent
5700920627
commit
d9c1761234
@ -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];
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user