75 lines
3.8 KiB
PHTML
75 lines
3.8 KiB
PHTML
<%inherit file="dashboard.phtml"/>
|
|
<%block name="extra_css">
|
|
<link href="${make_media_url('js/jsutils/css/popup.css', 'pastafari2')}" rel="stylesheet" />
|
|
<link href="${make_media_url('css/popup.css', 'pastafari2')}" rel="stylesheet" />
|
|
</%block>
|
|
<%block name="content">
|
|
<h3>${hostname}</h3>
|
|
<p>${_('Filter by user')}:
|
|
<select name="user_vhost">
|
|
|
|
</select>
|
|
</p>
|
|
<p><a href="${url_for('admin_app.webservers')}">${_('Webservers list')}</a> >> ${_('Websites')}</p>
|
|
<p><a href="${url_for('admin_app.add_virtualhost', webserver_id=webserver_id)}">${_('Add new website')}</a><!-- - <a href="${url_for('admin_app.users_list')}">${lang('webservers', 'webserver_users', 'Webserver users')}</a>--></p>
|
|
<div id="table_servers">
|
|
</div>
|
|
<p><a href="${url_for('admin_app.webservers')}">${_('Webservers list')}</a> >> ${_('Websites')}</p>
|
|
<div id="popup_change" style="display:none;">
|
|
<div class="title title_popup" style="">
|
|
${lang('webservers', 'change_user_ssh_key', 'Change user ssh key for access')} <a href="#" class="close_icon close_popup"><i class="fa fa-window-close" aria-hidden="true"></i></a>
|
|
</div>
|
|
<div class="cont cont_popup" style="">
|
|
${_('If you want SSH access with this user, you can add a ssh pub key here.')}
|
|
<form method="post" action="" id="form_change_password">
|
|
<div class="form">
|
|
<p><label for="username">${_('Username')}:</label> <span id="username_label"></span><input type="hidden" name="user" id="user_form" value=""/></p>
|
|
<!--<p><label>User password
|
|
<i class="fa fa-question-circle tooltip" data-tooltip-content="#tooltip_password_content" style="cursor:pointer;"></i>
|
|
|
|
</label><input type="password" class="" name="password" id="password_form" value="" /> <span class="error" id="password_error"></span></p>
|
|
|
|
<div class="tooltip_templates" style="display:none;"><div id="tooltip_password_content">User password used for the user if you want access to this server using this user. <strong>Remember, the password is not saved in pastafari</strong></div></div>
|
|
|
|
<p><label>Repeat User password</label><input type="password" class="" name="repeat_password" id="repeat_password_form" value="" /> <span class="error" id="repeat_password_error"></span></p>-->
|
|
<p><label>SSH Pub Key</label><textarea name="ssh_pub_key" id="ssh_pub_key"></textarea></span><span class="error" id="ssh_pub_key_error"></span></p>
|
|
</div>
|
|
<input type="submit" value="${_('Change SSH key')}" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<%block name="jscript_block">
|
|
<script language="Javascript" src="${make_media_url('js/jsutils/posting2.js', 'pastafari2')}"></script>
|
|
<script language="Javascript" src="${make_media_url('js/jsutils/ajax_list.js', 'pastafari2')}"></script>
|
|
<script language="Javascript" src="${make_media_url('js/jsutils/popup.js', 'pastafari2')}"></script>
|
|
<script>
|
|
|
|
options={'url': "${url_for('.get_virtualhosts', webserver_id=webserver_id)}", extra_data: {}, after_list: function () {
|
|
|
|
|
|
|
|
$('.change_password').popUp('#popup_change', 800, function (popup, container) {
|
|
|
|
$('#username_label').html($(container).html());
|
|
$('#user_form').val($(container).html());
|
|
|
|
}, undefined, {});
|
|
|
|
}};
|
|
|
|
alist=$('#table_servers').ajaxList('table_list', options);
|
|
|
|
options_post={'url': '${url_for("admin_app.change_user_password", webserver_id=webserver_id)}', 'loading': '#layer_loading', 'success': function (data) {
|
|
|
|
location.href="${url_for('admin_app.virtualhost_progress', webserver_id=webserver_id)}?task_id="+data.task_id;
|
|
|
|
}
|
|
};
|
|
|
|
$('#form_change_password').sendPost(options_post);
|
|
|
|
//$.fn.popUp = function (popup, width, pre_callback, post_callback, options)
|
|
|
|
</script>
|
|
</%block>
|
|
</%block>
|