Set default of use is_present/is_active to true.
This commit is contained in:
parent
8ac3254d04
commit
6986db5e69
@ -376,7 +376,8 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
|||||||
templateOptions: {
|
templateOptions: {
|
||||||
label: gettextCatalog.getString('Is present'),
|
label: gettextCatalog.getString('Is present'),
|
||||||
description: gettextCatalog.getString('Designates whether this user is in the room or not.')
|
description: gettextCatalog.getString('Designates whether this user is in the room or not.')
|
||||||
}
|
},
|
||||||
|
defaultValue: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'is_active',
|
key: 'is_active',
|
||||||
@ -386,7 +387,8 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
|||||||
description: gettextCatalog.getString(
|
description: gettextCatalog.getString(
|
||||||
'Designates whether this user should be treated as ' +
|
'Designates whether this user should be treated as ' +
|
||||||
'active. Unselect this instead of deleting the account.')
|
'active. Unselect this instead of deleting the account.')
|
||||||
}
|
},
|
||||||
|
defaultValue: true
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -495,6 +497,7 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
|||||||
'Group',
|
'Group',
|
||||||
function($scope, $state, User, UserForm, Group) {
|
function($scope, $state, User, UserForm, Group) {
|
||||||
Group.bindAll({where: {id: {'>': 2}}}, $scope, 'groups');
|
Group.bindAll({where: {id: {'>': 2}}}, $scope, 'groups');
|
||||||
|
$scope.alert = {};
|
||||||
// get all form fields
|
// get all form fields
|
||||||
$scope.formFields = UserForm.getFormFields();
|
$scope.formFields = UserForm.getFormFields();
|
||||||
|
|
||||||
@ -506,6 +509,13 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
|||||||
User.create(user).then(
|
User.create(user).then(
|
||||||
function(success) {
|
function(success) {
|
||||||
$scope.closeThisDialog();
|
$scope.closeThisDialog();
|
||||||
|
},
|
||||||
|
function (error) {
|
||||||
|
var message = '';
|
||||||
|
for (var e in error.data) {
|
||||||
|
message += e + ': ' + error.data[e] + ' ';
|
||||||
|
}
|
||||||
|
$scope.alert = {type: 'danger', msg: message, show: true};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user