mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Merge pull request #401 from jlmitch5/unique_select2
fixed duplicate choices from being passed to select2
This commit is contained in:
commit
b5881a7c3c
@ -434,6 +434,11 @@ export default
|
||||
}
|
||||
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');
|
||||
if(scope.mode === 'add' || scope.mode==="edit" && scope.can_edit === true){
|
||||
$('#survey-save-button').removeAttr('disabled');
|
||||
|
Loading…
Reference in New Issue
Block a user