1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-06 01:08:21 +01:00

convert es6 to es5 in erb file

This commit is contained in:
Sylvain 2019-04-18 16:01:58 +02:00
parent d9ce766f42
commit caf6054e66

View File

@ -162,8 +162,12 @@ Application.Controllers.controller('SettingsController', ['$scope', '$uibModal',
({ value } = setting); ({ value } = setting);
} }
return Setting.update({ name: setting.name }, { value }, data => growl.success(_t('settings.customization_of_SETTING_successfully_saved', { SETTING: _t(`settings.${setting.name}`) })) Setting.update(
, error => console.log(error)); { name: setting.name },
{ value },
function () { growl.success(_t('settings.customization_of_SETTING_successfully_saved', { SETTING: _t(`settings.${setting.name}`) })); },
function (error) { console.log(error); }
);
}; };
$scope.savePrivacyPolicy = function () { $scope.savePrivacyPolicy = function () {
@ -192,9 +196,9 @@ Application.Controllers.controller('SettingsController', ['$scope', '$uibModal',
$scope.submited = function (content) { $scope.submited = function (content) {
if ((content.custom_asset == null)) { if ((content.custom_asset == null)) {
$scope.alerts = []; $scope.alerts = [];
return angular.forEach(content, (v, k) => return angular.forEach(content, function (v) {
angular.forEach(v, err => growl.error(err)) angular.forEach(v, function(err) { growl.error(err); })
); });
} else { } else {
growl.success(_t('settings.file_successfully_updated')); growl.success(_t('settings.file_successfully_updated'));
if (content.custom_asset.name === 'cgu-file') { if (content.custom_asset.name === 'cgu-file') {
@ -230,7 +234,9 @@ Application.Controllers.controller('SettingsController', ['$scope', '$uibModal',
/** /**
* @param target {String} 'cgu' | 'cgv' * @param target {String} 'cgu' | 'cgv'
*/ */
$scope.addLoader = target => $scope.loader[target] = true; $scope.addLoader = function (target) {
$scope.loader[target] = true;
}
/** /**
* Change the revision of the displayed privacy policy, from drafts history * Change the revision of the displayed privacy policy, from drafts history