mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -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:
committed by
Endi Sukma Dewata
parent
5700920627
commit
d9c1761234
@@ -422,7 +422,7 @@ IPA.target_section = function(spec) {
|
|||||||
that.filter_text.save = function(){
|
that.filter_text.save = function(){
|
||||||
var input = $('input[name="'+that.filter_text.name+'"]',
|
var input = $('input[name="'+that.filter_text.name+'"]',
|
||||||
that.filter_text.container);
|
that.filter_text.container);
|
||||||
var value = $.trim(input.val());
|
var value = input.val();
|
||||||
return value === '' ? [] : [value];
|
return value === '' ? [] : [value];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ IPA.text_widget = function(spec) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
var input = $('input[name="'+that.name+'"]', that.container);
|
var input = $('input[name="'+that.name+'"]', that.container);
|
||||||
var value = $.trim(input.val());
|
var value = input.val();
|
||||||
return value === '' ? [] : [value];
|
return value === '' ? [] : [value];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -477,7 +477,7 @@ IPA.multivalued_text_widget = function(spec) {
|
|||||||
if (that.read_only || !that.writable) {
|
if (that.read_only || !that.writable) {
|
||||||
$('label[name="'+that.name+'"]', that.container).each(function() {
|
$('label[name="'+that.name+'"]', that.container).each(function() {
|
||||||
var input = $(this);
|
var input = $(this);
|
||||||
var value = $.trim(input.html());
|
var value = input.html();
|
||||||
values.push(value);
|
values.push(value);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -486,7 +486,7 @@ IPA.multivalued_text_widget = function(spec) {
|
|||||||
var input = $(this);
|
var input = $(this);
|
||||||
if (input.is('.strikethrough')) return;
|
if (input.is('.strikethrough')) return;
|
||||||
|
|
||||||
var value = $.trim(input.val());
|
var value = input.val();
|
||||||
values.push(value);
|
values.push(value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1482,4 +1482,4 @@ IPA.entity_select_widget = function(spec) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user