Fixing key editting

This commit is contained in:
Kevin Chung
2017-04-20 16:59:43 -04:00
parent f4d766473d
commit 4795a9e742
3 changed files with 3 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ function load_edit_key_modal(key_id, key_type_name) {
$('#edit-keys').empty();
var template = Handlebars.compile(template_data);
key_data['script_root'] = script_root;
key_data['nonce'] = $('#nonce').val();
$('#edit-keys').append(template(key_data));
$('#key-id').val(key_id);
$('#submit-keys').click(function (e) {

View File

@@ -4,7 +4,7 @@
<h3>Regex Key</h3>
</div>
<div class="modal-body">
<form method="POST" action="{{ script_root }}/admin/key/{{id}}" style="text-align:center">
<form method="POST" action="{{ script_root }}/admin/keys/{{id}}" style="text-align:center">
<input type="text" id="key-data" class="form-control" name="key" value="{{key}}" placeholder="Enter regex key data">
<input type="hidden" id="key-type" value="1">
<input type="hidden" id="key-id">

View File

@@ -4,7 +4,7 @@
<h3>Static Key</h3>
</div>
<div class="modal-body">
<form method="POST" action="{{ script_root }}/admin/key/{{id}}" style="text-align:center">
<form method="POST" action="{{ script_root }}/admin/keys/{{id}}" style="text-align:center">
<input type="text" id="key-data" class="form-control" name="key" value="{{key}}" placeholder="Enter static key data">
<input type="hidden" id="key-type" value="0">
<input type="hidden" id="key-id">