Show info text in login form (Fixes #1754)

This commit is contained in:
Emanuel Schuetze 2016-01-09 14:22:32 +01:00
parent 622dadd4ef
commit 363c928517
2 changed files with 10 additions and 7 deletions

View File

@ -6,6 +6,7 @@
type="{{ type }}" class="form-control">
<textarea ng-if="type == 'textarea'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}" class="form-control">
</textarea>
<select ng-if="type == 'choice'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}"
class="form-control" ng-options="option.value as option.display_name for option in choices">

View File

@ -821,13 +821,15 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
function ($scope, $http, $stateParams, operator, gettextCatalog, Config) {
$scope.alerts = [];
// TODO: add welcome message only on first time (or if admin password not changed)
$scope.alerts.push({
type: 'success',
msg: gettextCatalog.getString("Installation was successfully.") + "<br>" +
gettextCatalog.getString("Use <strong>admin</strong> and <strong>admin</strong> for first login.") + "<br>" +
gettextCatalog.getString("Important: Please change your password!")
});
// get login info-text from server
$http.get('/users/login/').success(function(data) {
if(data.info_text) {
$scope.alerts.push({
type: 'success',
msg: data.info_text
});
}
})
// close alert function
$scope.closeAlert = function(index) {
$scope.alerts.splice(index, 1);