|
@@ -28,25 +28,11 @@
|
|
<div class="panel">
|
|
<div class="panel">
|
|
<h3>Authentification</h3>
|
|
<h3>Authentification</h3>
|
|
<table class="full-width">
|
|
<table class="full-width">
|
|
- {% if object.password %}
|
|
|
|
- <tr>
|
|
|
|
- <td class="center" colspan="2">
|
|
|
|
- <a class="button tiny radius" id="passgen" href="{% url 'vps:generate_password' object.pk %}"><i class="fa fa-refresh"></i>
|
|
|
|
- Générer un nouveau mot de passe</a>
|
|
|
|
- </td>
|
|
|
|
- </tr>
|
|
|
|
- {% endif %}
|
|
|
|
- {% if object.crypto_link %}
|
|
|
|
- <tr>
|
|
|
|
- <td class="center"><span class="label">Matériel cryptographique</span></td>
|
|
|
|
- <td><a href="{{object.crypto_link}}">Télecharger (lien supprimé après ouverture)</a></td>
|
|
|
|
- </tr>
|
|
|
|
- {% endif %}
|
|
|
|
{% if object.fingerprint_set.all %}
|
|
{% if object.fingerprint_set.all %}
|
|
<tr>
|
|
<tr>
|
|
<td class="center"><span class="label">Empreinte(s)</span></td>
|
|
<td class="center"><span class="label">Empreinte(s)</span></td>
|
|
<td>{% for fingerprint in object.fingerprint_set.all %}
|
|
<td>{% for fingerprint in object.fingerprint_set.all %}
|
|
- {{ fingerprint.length }} {{ fingerprint.fingerprint }} ({{ fingerprint.algo }})
|
|
|
|
|
|
+ {{ fingerprint.length }} {{ fingerprint.fingerprint }} ({{ fingerprint.algo }}){% if not forloop.last %}<br />{% endif %}
|
|
{% endfor %}</td>
|
|
{% endfor %}</td>
|
|
</tr>
|
|
</tr>
|
|
{% endif %}
|
|
{% endif %}
|
|
@@ -121,27 +107,3 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% endblock %}
|
|
{% endblock %}
|
|
-
|
|
|
|
-{% block extra_js %}
|
|
|
|
- <script>
|
|
|
|
- // Bouton génération du mot de passe
|
|
|
|
- $('#passgen').click(function(){
|
|
|
|
- if (!confirm("Ceci va effacer votre ancien mot de passe et en générer un nouveau. Continuer ?")) return false;
|
|
|
|
-
|
|
|
|
- parent_cell = $(this).parent();
|
|
|
|
- parent_cell.html('<span class="pending_request"><i class="fa fa-refresh fa-spin"></i> Génération en cours</span>');
|
|
|
|
-
|
|
|
|
- $.ajax({
|
|
|
|
- 'url': $(this).attr('href')
|
|
|
|
- }).done(function(html) {
|
|
|
|
- //Remplace le tr parent par le contenu renvoyé (qui est deux tr successifs)
|
|
|
|
- parent_cell.parent().replaceWith(html);
|
|
|
|
- }).fail(function( jqXHR, textStatus ) {
|
|
|
|
- parent_cell.html('<span class="error">Échec de la requête : ' + textStatus + '</span>');
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- return false;
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- </script>
|
|
|
|
-{% endblock extra_js %}
|
|
|