mirror of https://github.com/apache/archiva.git
role description is now updatable
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1226091 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d8e38bd1c2
commit
507a6593d3
|
@ -64,6 +64,29 @@ $(function() {
|
|||
);
|
||||
}
|
||||
|
||||
saveRoleDescription=function(){
|
||||
var roleName = $("#editRoleTable #role-edit-name").html();
|
||||
var description = $("#editRoleTable #role-edit-description").val();
|
||||
clearUserMessages();
|
||||
var url = "restServices/redbackServices/roleManagementService/updateRoleDescription?";
|
||||
url += "roleName="+encodeURIComponent(roleName);
|
||||
url += "&roleDescription="+encodeURIComponent(description);
|
||||
$.ajax(url,
|
||||
{
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
$.log("role description updated");
|
||||
displaySuccessMessage($.i18n.prop("role.updated",roleName));
|
||||
},
|
||||
error: function(data){
|
||||
displayErrorMessage("error updating role description");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param data Role response from redback rest api
|
||||
*/
|
||||
|
|
|
@ -50,11 +50,18 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>${$.i18n.prop('name')}:</td>
|
||||
<td>${name}</td>
|
||||
<td id="role-edit-name">${name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>${$.i18n.prop('description')}:</td>
|
||||
<td>${description}</td>
|
||||
<td><input type="text" id="role-edit-description" value="${description}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="pull-left">
|
||||
<button class="btn" onclick="saveRoleDescription();">${$.i18n.prop('save')}</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue