From 3c626739c32e3032611d701182697e81aa057d2e Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Wed, 12 Jul 2017 15:49:10 -0400 Subject: [PATCH] Shrink modal size based on user permissions --- .../src/templates/survey-maker/surveys/show.factory.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/awx/ui/client/src/templates/survey-maker/surveys/show.factory.js b/awx/ui/client/src/templates/survey-maker/surveys/show.factory.js index fb44bb32d6..59f4a8511e 100644 --- a/awx/ui/client/src/templates/survey-maker/surveys/show.factory.js +++ b/awx/ui/client/src/templates/survey-maker/surveys/show.factory.js @@ -3,18 +3,20 @@ export default return function(params) { // Set modal dimensions based on viewport width - var scope = params.scope, + let scope = params.scope, callback = params.callback, mode = (params.mode) ? params.mode : "survey-maker", title = params.title, 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({ id: target, title: title, scope: scope, - width: 1200, + width: width, minWidth: 400, draggable: false, dialogClass: 'SurveyMaker-dialog',