mirror of
https://github.com/ansible/awx.git
synced 2026-02-18 03:30:02 -03:30
fixed duplicate choices from being passed to select2
This commit is contained in:
@@ -434,6 +434,11 @@ export default
|
|||||||
}
|
}
|
||||||
data.choices = (scope.type.type === "multiplechoice") ? scope.choices : (scope.type.type === 'multiselect') ? scope.choices : "" ;
|
data.choices = (scope.type.type === "multiplechoice") ? scope.choices : (scope.type.type === 'multiselect') ? scope.choices : "" ;
|
||||||
|
|
||||||
|
if (data.choices !== "") {
|
||||||
|
// remove duplicates from the choices
|
||||||
|
data.choices = _.uniq(data.choices.split("\n")).join("\n");
|
||||||
|
}
|
||||||
|
|
||||||
Wait('stop');
|
Wait('stop');
|
||||||
if(scope.mode === 'add' || scope.mode==="edit" && scope.can_edit === true){
|
if(scope.mode === 'add' || scope.mode==="edit" && scope.can_edit === true){
|
||||||
$('#survey-save-button').removeAttr('disabled');
|
$('#survey-save-button').removeAttr('disabled');
|
||||||
|
|||||||
Reference in New Issue
Block a user