mirror of https://github.com/apache/archiva.git
use label-warning in delete user modal confirm, add missing i18n
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1293960 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aa750e5e58
commit
cecca877d4
|
@ -137,6 +137,12 @@ validated=Validated
|
|||
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
|
||||
|
|
|
@ -102,7 +102,7 @@ $(function() {
|
|||
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);
|
||||
}
|
||||
|
@ -137,9 +137,8 @@ $(function() {
|
|||
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();
|
||||
|
@ -169,6 +168,7 @@ $(function() {
|
|||
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");
|
||||
|
@ -347,10 +347,8 @@ $(function() {
|
|||
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;
|
||||
|
@ -548,7 +546,7 @@ $(function() {
|
|||
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");
|
||||
|
|
|
@ -105,7 +105,7 @@ $(function() {
|
|||
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) {
|
||||
|
@ -118,7 +118,7 @@ $(function() {
|
|||
}
|
||||
);
|
||||
}
|
||||
,"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));
|
||||
|
||||
}
|
||||
|
@ -197,7 +197,6 @@ $(function() {
|
|||
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);
|
||||
|
@ -217,13 +216,9 @@ $(function() {
|
|||
}
|
||||
|
||||
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)});
|
||||
|
@ -292,10 +287,6 @@ $(function() {
|
|||
mainContent.find("#users-view-tabs-li-user-edit").addClass("active");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue