diff --git a/editor/controllers/mtf-controller.js b/editor/controllers/mtf-controller.js index 56d1201..702be72 100644 --- a/editor/controllers/mtf-controller.js +++ b/editor/controllers/mtf-controller.js @@ -178,6 +178,11 @@ angular.module('mtfApp', []).controller('mtfQuestionFormController', ['$scope', formValid; //check form valid and lhs should be more than 3 formValid = $scope.mtfForm.$valid && $scope.mtfFormData.option.optionsLHS.length > 2; + if(!($scope.mtfFormData.question.text.length || $scope.mtfFormData.question.image.length || $scope.mtfFormData.question.audio.length)){ + $('.questionTextBox').addClass("ck-error"); + }else{ + $('.questionTextBox').removeClass("ck-error"); + } $scope.submitted = true; _.isEmpty($scope.questionMedia.image) ? 0 : tempArray.push($scope.questionMedia.image); _.isEmpty($scope.questionMedia.audio) ? 0 : tempArray.push($scope.questionMedia.audio); diff --git a/editor/styles/style.css b/editor/styles/style.css index be05e31..bf6cae6 100644 --- a/editor/styles/style.css +++ b/editor/styles/style.css @@ -201,4 +201,7 @@ td.mtf-pair-td{ td.mtf-pair-destractor-td{ border-left: 0px none !important; border-right: 0px none; +} +.ck-error{ + border: 1px solid red; } \ No newline at end of file diff --git a/editor/templates/mtf-template.html b/editor/templates/mtf-template.html index a21d412..c860fd9 100644 --- a/editor/templates/mtf-template.html +++ b/editor/templates/mtf-template.html @@ -12,7 +12,7 @@
-
+