1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +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>
</div> </div>
</form> </form>
{% if SHOW_PROFILE_EDIT_PASSWORD %}
<h3 class="page-header">{% trans "Edit Password" %}</h3> <h3 class="page-header">{% trans "Edit Password" %}</h3>
<form class="form-horizontal" method="post" action="" role="form">{% csrf_token %} <form class="form-horizontal" method="post" action="" role="form">{% csrf_token %}
<div class="form-group"> <div class="form-group">
@ -67,6 +68,7 @@
</div> </div>
</div> </div>
</form> </form>
{% endif %}
<h3 class="page-header">{% trans "SSH Keys" %}</h3> <h3 class="page-header">{% trans "SSH Keys" %}</h3>
{% if publickeys %} {% if publickeys %}
<div class="col-lg-12"> <div class="col-lg-12">

View file

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

View file

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