Skip to content

Commit 878949e

Browse files
committed
Declare the form outside the translation (#4191)
1 parent 33c90be commit 878949e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mica-webapp/src/main/webapp/assets/js/mica-data-access-form.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,13 @@ angular.module('formModule', ['schemaForm', 'hc.marked', 'angularMoment', 'schem
319319
});
320320
}])
321321
.controller('FormController', ['$scope', '$filter', '$translate', function ($scope, $filter, $translate) {
322-
322+
$scope.forms = {};
323323

324324
const langKey = 'language.'+ $translate.use();
325325
$translate(['required', langKey], {}).then(function(translations) {
326326
const languages = {};
327327
languages[$translate.use()] = translations[langKey];
328328

329-
$scope.forms = {};
330329
$scope.schema = formSchema;
331330
$scope.form = formDefinition;
332331
$scope.model = formModel;
@@ -349,7 +348,7 @@ angular.module('formModule', ['schemaForm', 'hc.marked', 'angularMoment', 'schem
349348
MicaService.toastSuccess(formMessages.validationSuccess);
350349
} else {
351350
// an invalid form can be saved with warning
352-
MicaService.toastWarning(formMessages.validationError);
351+
MicaService.toastError(formMessages.validationError);
353352
}
354353
};
355354
$scope.save = function (id, type, aId) {

0 commit comments

Comments
 (0)