forked from enviPath/enviPy
46 lines
1.7 KiB
HTML
46 lines
1.7 KiB
HTML
{% load envipytags %}
|
|
{% load static %}
|
|
<!-- Edit Rule -->
|
|
<div id="edit_rule_modal" class="modal" tabindex="-1">
|
|
<div class="modal-dialog">
|
|
<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>
|
|
<h3 class="modal-title">Update Rule</h3>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form id="edit-rule-modal-form" accept-charset="UTF-8" action="" data-remote="true" method="post">
|
|
{% csrf_token %}
|
|
<p>
|
|
<label for="rule-name">Name</label>
|
|
<input id="rule-name" class="form-control" name="rule-name" value="{{ rule.name|safe }}">
|
|
</p>
|
|
<p>
|
|
<label for="rule-description">Description</label>
|
|
<input id="rule-description" type="text" class="form-control"
|
|
value="{{ rule.description|safe }}" name="rule-description">
|
|
</p>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-primary" id="edit-rule-modal-submit">Update</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(function() {
|
|
|
|
$('#edit-rule-modal-submit').click(function(e){
|
|
e.preventDefault();
|
|
$('#edit-rule-modal-form').submit();
|
|
});
|
|
|
|
});
|
|
|
|
|
|
</script>
|