mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Added validation logic to multivalued text field
https://fedorahosted.org/freeipa/ticket/1466
This commit is contained in:
committed by
Endi S. Dewata
parent
747c069c45
commit
911f396604
@@ -351,7 +351,7 @@ IPA.multivalued_text_widget = function(spec) {
|
||||
for(var i=0; i<that.rows.length; i++) {
|
||||
var row = that.rows[i];
|
||||
row.widget.hide_undo();
|
||||
if(row.is_new) row.remove_link.show();
|
||||
row.remove_link.show();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -365,6 +365,31 @@ IPA.multivalued_text_widget = function(spec) {
|
||||
that.show_undo();
|
||||
};
|
||||
|
||||
that.hide_error = function() {
|
||||
|
||||
that.widget_hide_error();
|
||||
|
||||
for (var i=0; i<that.rows.length; i++) {
|
||||
that.rows[i].widget.hide_error();
|
||||
}
|
||||
};
|
||||
|
||||
that.show_child_error = function(index, error) {
|
||||
|
||||
that.rows[index].widget.show_error(error);
|
||||
};
|
||||
|
||||
that.get_saved_value_row_index = function(index) {
|
||||
|
||||
for (var i=0; i<that.rows.length;i++) {
|
||||
|
||||
if(that.rows[i].deleted) index++;
|
||||
if(i === index) return i;
|
||||
}
|
||||
|
||||
return -1; //error state
|
||||
};
|
||||
|
||||
that.save = function() {
|
||||
|
||||
var values = [];
|
||||
|
Reference in New Issue
Block a user