mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
Merge pull request #309 from mabashian/roll-back-survey-question-changes
Rolled back survey question preview enhancements
This commit is contained in:
commit
4e6722a171
@ -640,10 +640,6 @@ angular.module('Utilities', ['RestServices', 'Utilities'])
|
||||
// Don't toggle the dropdown when a multiselect option is
|
||||
// being removed
|
||||
if (multiple) {
|
||||
if (params.disabledOptions) {
|
||||
$(element).on('select2:selecting', e => e.preventDefault());
|
||||
}
|
||||
|
||||
$(element).on('select2:opening', (e) => {
|
||||
var unselecting = $(e.target).data('select2-unselecting');
|
||||
if (unselecting === true) {
|
||||
|
@ -17,8 +17,7 @@ function link($timeout, CreateSelect2, scope, element, attrs, ngModel) {
|
||||
element: element.find('select'),
|
||||
multiple: scope.isMultipleSelect(),
|
||||
minimumResultsForSearch: scope.isMultipleSelect() ? Infinity : 10,
|
||||
customDropdownAdapter: true,
|
||||
disabledOptions: scope.preview ? true : false
|
||||
customDropdownAdapter: scope.preview ? false : true
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
choices="choices"
|
||||
ng-required="isRequired === 'true'"
|
||||
ng-model="defaultValue"
|
||||
ng-disabled="isDisabled === 'true'"
|
||||
preview="preview">
|
||||
</multiple-choice>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user