mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 17:51:06 -03:30
Merge pull request #7036 from marshmalien/fix/styleWideSurveyModal
Shrink modal size based on user permissions
This commit is contained in:
@@ -3,18 +3,20 @@ export default
|
|||||||
return function(params) {
|
return function(params) {
|
||||||
// Set modal dimensions based on viewport width
|
// Set modal dimensions based on viewport width
|
||||||
|
|
||||||
var scope = params.scope,
|
let scope = params.scope,
|
||||||
callback = params.callback,
|
callback = params.callback,
|
||||||
mode = (params.mode) ? params.mode : "survey-maker",
|
mode = (params.mode) ? params.mode : "survey-maker",
|
||||||
title = params.title,
|
title = params.title,
|
||||||
element,
|
element,
|
||||||
target = (mode==='survey-taker') ? 'password-modal' : "survey-modal-dialog";
|
target = (mode==='survey-taker') ? 'password-modal' : "survey-modal-dialog",
|
||||||
|
width = params.scope.can_edit ? 1200 : 600;
|
||||||
|
|
||||||
|
|
||||||
CreateDialog({
|
CreateDialog({
|
||||||
id: target,
|
id: target,
|
||||||
title: title,
|
title: title,
|
||||||
scope: scope,
|
scope: scope,
|
||||||
width: 1200,
|
width: width,
|
||||||
minWidth: 400,
|
minWidth: 400,
|
||||||
draggable: false,
|
draggable: false,
|
||||||
dialogClass: 'SurveyMaker-dialog',
|
dialogClass: 'SurveyMaker-dialog',
|
||||||
|
|||||||
Reference in New Issue
Block a user