| 
									
										
										
										
											2016-12-09 16:23:11 -05:00
										 |  |  | {% extends 'users/_user.html' %} | 
					
						
							| 
									
										
										
										
											2016-06-21 13:26:19 -04:00
										 |  |  | {% load static from staticfiles %} | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  | {% load form_helpers %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block title %}User Key{% endblock %} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-09 16:23:11 -05:00
										 |  |  | {% block usercontent %} | 
					
						
							|  |  |  |     {% 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"> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |             <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2016-12-09 16:23:11 -05:00
										 |  |  |                 <div class="col-sm-6 col-md-6"> | 
					
						
							|  |  |  |                     <button type="button" class="btn btn-info" id="generate_keypair">Generate a New Key Pair</button> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |                 <div class="col-sm-6 col-md-6 text-right"> | 
					
						
							|  |  |  |                     <button type="submit" name="_update" class="btn btn-primary">Save</button> | 
					
						
							| 
									
										
										
										
											2017-03-14 12:36:44 -04:00
										 |  |  |                     <a href="{% url 'user:userkey' %}" class="btn btn-default">Cancel</a> | 
					
						
							| 
									
										
										
										
											2016-12-09 16:23:11 -05:00
										 |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2016-12-09 16:23:11 -05:00
										 |  |  |         </div> | 
					
						
							|  |  |  |     </form> | 
					
						
							|  |  |  |     <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">×</span></button> | 
					
						
							|  |  |  |                     <h4 class="modal-title" id="new_keypair_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> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                     </div> | 
					
						
							| 
									
										
										
										
											2016-12-09 16:23:11 -05:00
										 |  |  |                     <strong>New Private Key</strong> | 
					
						
							|  |  |  |                     <div class="form-group"> | 
					
						
							|  |  |  |                         <textarea class="form-control" id="new_privkey" style="height: 250px;"></textarea> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2016-12-09 16:23:11 -05:00
										 |  |  |                 <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> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  |                 </div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  | {% endblock %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block javascript %} | 
					
						
							| 
									
										
										
										
											2017-03-30 15:40:00 -04:00
										 |  |  | <script src="{% static 'js/secrets.js' %}?v{{ settings.VERSION }}"></script> | 
					
						
							| 
									
										
										
										
											2016-03-01 11:23:03 -05:00
										 |  |  | {% endblock %} |