Added delete user support.
This commit is contained in:
parent
88e2428a71
commit
980193c347
5 changed files with 191 additions and 3 deletions
32
templates/admin/delete_user.phtml
Normal file
32
templates/admin/delete_user.phtml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<%inherit file="dashboard.phtml"/>
|
||||
<%block name="content">
|
||||
<p><a href="${url_for('.pastafari2_dashboard')}">${_('Servers')}</a> >> <a href="${url_for('admin_app.pastafari2_edit_users', server_id=server_id)}">${server['hostname']} - ${_('Users')}</a> >> ${_('Delete user')}</p>
|
||||
<div class="form">
|
||||
<form method="post" id="delete_user">
|
||||
<p><strong>${_('User')}</strong>: ${username}</p>
|
||||
<p><strong>${_('WARNING: The user is only deleted from database because if is deleted and is necessary for any service, you lost this services. Please, check the services used by the user and delete using other gui services how webmin.')}</strong></p>
|
||||
<input type="hidden" name="user_id" value="${user_id}" />
|
||||
<p id="user_delete_error" class="error"></p>
|
||||
<p><input type="submit" value="${_('Confirm delete user?')}" /></p>
|
||||
</form>
|
||||
</div>
|
||||
<p><a href="${url_for('.pastafari2_dashboard')}">${_('Servers')}</a> >> <a href="${url_for('admin_app.pastafari2_edit_users', server_id=server_id)}">${server['hostname']} - ${_('Users')}</a> >> ${_('Delete user')}</p>
|
||||
</%block>
|
||||
<%block name="jscript_block">
|
||||
<script language="Javascript" src="${make_media_url('js/jsutils/posting2.js', 'pastafari2')}"></script>
|
||||
<script>
|
||||
|
||||
var options={url: "${url_for('admin_app.pastafari2_delete_user_db', server_id=server_id)}", loading: '#layer_loading', pre_callback: function (data) {
|
||||
|
||||
//alert('This action overwrite all ssh keys');
|
||||
|
||||
}, success: function (data) {
|
||||
|
||||
location.href="${url_for('admin_app.pastafari2_edit_users', server_id=server_id)}";
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
$('#delete_user').sendPost(options);
|
||||
</script>
|
||||
</%block>
|
||||
Loading…
Add table
Add a link
Reference in a new issue