user.locked=User {0} locked.
user.unlocked=User {0} unlocked.
user.passwordChangeRequired.updated=Password change required updated for user {0} to {1}
+user.created=User {0} created.
+user.deleted=User {0} deleted.
+user.updated=User {0} updated.
+user.admin.created=admin user created
+user.details.updated=details updated.
+user.delete.message=The following user {0} will be deleted
#roles management
roles.management.header=Roles Management
success: function(result) {
var created = JSON.parse(result);
if (created == true) {
- displaySuccessMessage("user created:"+currentUser.username());
+ displaySuccessMessage( $.i18n.prop("user.created",currentUser.username()));
if (successFnCallback){
successFnCallback(currentUser);
}
success: function(result) {
var created = JSON.parse(result);
if (created == true) {
- displaySuccessMessage("admin user created");
+ displaySuccessMessage( $.i18n.prop("user.admin.created"));
var onSuccessCall=function(){
- $.log("onSuccessCall after admin creation");
reccordLoginCookie(currentAdminUser);
screenChange();
checkCreateAdminLink();
success: function(result) {
var updated = JSON.parse(result);
if (updated == true) {
+ clearUserMessages();
displaySuccessMessage($.i18n.prop("user.updated",currentUser.username()));
$("#main-content #users-view-tabs-li-user-edit a").html($.i18n.prop("add"));
clearForm("#main-content #user-create");
logged = true;
}
}
- $.log("successLoginCallbackFn, logged:"+logged);
if (logged == true) {
var user = mapUser(result.user);
- $.log("user.passwordChangeRequired:"+user.passwordChangeRequired());
if (user.passwordChangeRequired()==true){
changePasswordBox(true,false,user);
return;
var created = JSON.parse(result);
// FIXME i18n
if (created == true) {
- displaySuccessMessage("details updated.");
+ displaySuccessMessage( $.i18n.prop("user.details.updated"));
window.modalEditUserBox.modal('hide');
reccordLoginCookie(user);
clearForm("#user-edit-form");
dataType: 'json',
success: function(data) {
// FIXME i18n
- displaySuccessMessage("user " + currentUser.username() + " deleted");
+ displaySuccessMessage( $.i18n.prop("user.deleted", currentUser.username()));
self.users.remove(currentUser);
},
error: function(result) {
}
);
}
- ,"Ok", $.i18n.prop("cancel"), $.i18n.prop("user.delete.message") + ": " + currentUser.username(),
+ ,"Ok", $.i18n.prop("cancel"), $.i18n.prop("user.delete.message", currentUser.username()),
$("#user-delete-warning-tmpl" ).tmpl(currentUser));
}
return mapApplicationRoles(item);
});
viewModel.applicationRoles=ko.observableArray(mappedApplicationRoles);
- $.log("applicationRoles length:"+mappedApplicationRoles.length);
mainContent.find("#user-edit-roles-edit").attr("data-bind",'template: {name:"user_edit_roles_tmpl"}');
ko.applyBindings(viewModel,mainContent.find("#user-edit-roles-edit").get(0));
$.log("assignedRoles:"+user.assignedRoles().length);
}
saveUser=function(){
- $.log("UserViewModel#saveUser");
var valid = $("#main-content #user-create").valid();
if (valid==false) {
- $.log("user#save valid:false");
return;
- } else {
- $.log("user#save valid:true,update:"+self.updateMode);
}
if (self.updateMode==false){
return user.create(function(){self.usersViewModel.users.push(user)});
mainContent.find("#users-view-tabs-li-user-edit").addClass("active");
}
-
-
-
-
});