1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
2016-03-01 11:23:03 -05:00

73 lines
2.8 KiB
HTML

{% extends '_base.html' %}
{% load form_helpers %}
{% block title %}User Key{% endblock %}
{% block content %}
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h1>User Key</h1>
</div>
</div>
<div class="row">
<div class="col-md-2 col-md-offset-2">
{% include 'users/inc/profile_nav.html' with active_tab="userkey" %}
</div>
<div class="col-md-6">
{% if userkey.is_active %}
<div class="alert alert-danger" role="alert">
<strong>Warning:</strong> Changing your public key will require your user key to be re-activated by another
user. You will be unable to retrieve any secrets until your key has been reactivated.
</div>
{% endif %}
<form action="." method="post" class="form">
{% csrf_token %}
<div class="form-group">
{% render_field form.public_key %}
</div>
<div class="row">
<div class="form-group">
<div class="col-md-6">
<button type="button" class="btn btn-info" id="generate_keypair">Generate a New Key Pair</button>
</div>
<div class="col-md-6 text-right">
<button type="submit" name="_update" class="btn btn-primary">Save</button>
<a href="{% url 'users:userkey' %}" class="btn btn-default">Cancel</a>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="modal fade" id="new_keypair_modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="graphs_modal_title">
New RSA Key Pair
</h4>
</div>
<div class="modal-body">
<strong>New Public Key</strong>
<div class="form-group">
<textarea class="form-control" id="new_pubkey" style="height: 250px;"></textarea>
</div>
<strong>New Private Key</strong>
<div class="form-group">
<textarea class="form-control" id="new_privkey" style="height: 250px;"></textarea>
</div>
</div>
<div class="modal-footer text-center">
<button type="button" class="btn btn-danger" id="use_new_pubkey" data-dismiss="modal">I have saved my new private key</button>
</div>
</div>
</div>
</div>
{% endblock %}
{% block javascript %}
<script src="/static/js/secrets.js"></script>
{% endblock %}