Define 'view DNS records' href link.

This commit is contained in:
Santiago Lamora 2019-12-13 15:13:10 +01:00
parent 3db5aa8621
commit c69668a9eb
1 changed files with 4 additions and 2 deletions

View File

@ -40,7 +40,8 @@
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<button type="button" class="btn text-secondary" data-toggle="modal" data-target="#configDetailsModal" <button type="button" class="btn text-secondary" data-toggle="modal" data-target="#configDetailsModal"
data-domain="{{ domain.name }}" data-username="john" data-password="s3cre3t" data-root="/domainname/"> data-domain="{{ domain.name }}" data-username="john" data-password="s3cre3t" data-root="/domainname/"
data-url="{% url 'musician:domain-detail' domain.id %}">
{% trans "view configuration" %} <strong class="fas fa-tools"></strong> {% trans "view configuration" %} <strong class="fas fa-tools"></strong>
</button> </button>
</div> </div>
@ -120,7 +121,7 @@
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary">{% trans "View DNS records" %}</button> <a href="#domain-detail" class="btn btn-primary">{% trans "View DNS records" %}</a>
</div> </div>
</div> </div>
</div> </div>
@ -137,6 +138,7 @@ $('#configDetailsModal').on('show.bs.modal', function (event) {
modal.find('.modal-body #config-username').text(button.data('username')); modal.find('.modal-body #config-username').text(button.data('username'));
modal.find('.modal-body #config-password').text(button.data('password')); modal.find('.modal-body #config-password').text(button.data('password'));
modal.find('.modal-body #config-root').text(button.data('root')); modal.find('.modal-body #config-root').text(button.data('root'));
modal.find('.modal-footer .btn').attr('href', button.data('url'));
}) })
</script> </script>
{% endblock %} {% endblock %}