1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-10-31 19:44:16 +00:00

added SHOW_ACCESS_ROOT_PASSWORD, SHOW_ACCESS_SSH_KEYS, SHOW_PROFILE_EDIT_PASSWORD -- hides specific forms

This commit is contained in:
Ing. Jan KRCMAR 2017-06-27 09:22:09 +02:00
parent fd87cfd86e
commit fdf383a647
3 changed files with 14 additions and 1 deletions

View file

@ -41,6 +41,7 @@
</div>
</div>
</form>
{% if SHOW_PROFILE_EDIT_PASSWORD %}
<h3 class="page-header">{% trans "Edit Password" %}</h3>
<form class="form-horizontal" method="post" action="" role="form">{% csrf_token %}
<div class="form-group">
@ -67,6 +68,7 @@
</div>
</div>
</form>
{% endif %}
<h3 class="page-header">{% trans "SSH Keys" %}</h3>
{% if publickeys %}
<div class="col-lg-12">
@ -112,4 +114,4 @@
</form>
</div>
</div>
{% endblock %}
{% endblock %}

View file

@ -227,16 +227,20 @@
{% trans "Console" %}
</a>
</li>
{% if SHOW_ACCESS_ROOT_PASSWORD %}
<li role="presentation">
<a href="#rootpasswd" aria-controls="rootpasswd" role="tab" data-toggle="tab">
{% trans "Root Password" %}
</a>
</li>
{% endif %}
{% if SHOW_ACCESS_SSH_KEYS %}
<li role="presentation">
<a href="#sshkeys" aria-controls="sshkeys" role="tab" data-toggle="tab">
{% trans "SSH Keys" %}
</a>
</li>
{% endif %}
</ul>
<!-- Tab panes -->
<div class="tab-content">
@ -249,6 +253,7 @@
{% endifequal %}
<div class="clearfix"></div>
</div>
{% if SHOW_ACCESS_ROOT_PASSWORD %}
<div role="tabpanel" class="tab-pane tab-pane-bordered" id="rootpasswd">
<p>{% trans "You need shut down your instance and enter a new root password." %}</p>
<form class="form-inline" method="post" role="form">{% csrf_token %}
@ -265,6 +270,8 @@
</form>
<div class="clearfix"></div>
</div>
{% endif %}
{% if SHOW_ACCESS_SSH_KEYS %}
<div role="tabpanel" class="tab-pane tab-pane-bordered" id="sshkeys">
<p>{% trans "You need shut down your instance and choose your public key." %}</p>
<form class="form-inline" method="post" role="form">{% csrf_token %}
@ -289,6 +296,7 @@
</form>
<div class="clearfix"></div>
</div>
{% endif %}
</div>
</div>
</div>

View file

@ -121,3 +121,6 @@ CLONE_INSTANCE_DEFAULT_PREFIX = 'ourea'
LOGS_PER_PAGE = 100
QUOTA_DEBUG = True
ALLOW_EMPTY_PASSWORD = True
SHOW_ACCESS_ROOT_PASSWORD = False
SHOW_ACCESS_SSH_KEYS = False
SHOW_PROFILE_EDIT_PASSWORD = False