Commit 0a81d922 by Bach Dániel

Merge branch 'feature-new-pw-style' into 'master'

Old style new password operation link

The button looks strange, a simple link looks better.
parents 318bc349 9c36023d
......@@ -3,7 +3,7 @@
$(function() {
/* vm operations */
$('#ops, #vm-details-resources-disk, #vm-details-renew-op, #vm-details-pw-reset, #vm-details-add-interface').on('click', '.operation.btn', function(e) {
$('#ops, #vm-details-resources-disk, #vm-details-renew-op, #vm-details-pw-reset, #vm-details-add-interface').on('click', '.operation', function(e) {
var icon = $(this).children("i").addClass('fa-spinner fa-spin');
$.ajax({
......
......@@ -307,6 +307,10 @@ $(function() {
$("#vm-details-connection-string").focus();
});
$("a.operation-password_reset").click(function() {
if(Boolean($(this).data("disabled"))) return false;
});
});
......@@ -327,6 +331,7 @@ function removePort(data) {
}
});
}
function decideActivityRefresh() {
......
......@@ -100,7 +100,7 @@
<dd style="font-size: 10px; text-align: right; padding-top: 8px;">
<div id="vm-details-pw-reset">
{% with op=op.password_reset %}{% if op %}
<a href="{{op.get_url}}" class="btn operation btn-default btn-xs" {% if op.disabled %}disabled{% endif %}>{% trans "Generate new password!" %}</a>
<a href="{% if op.disabled %}#{% else %}{{op.get_url}}{% endif %}" class="operation operation-{{op.op}}" data-disabled="{% if op.disabled %}true" title="{% trans "Start the VM to change the password." %}"{% else %}false" {% endif %}>{% trans "Generate new password!" %}</a>
{% endif %}{% endwith %}
</div>
</dd>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment