mirror of https://github.com/itflow-org/itflow
Add notes to certs
This commit is contained in:
parent
d3b59edfe4
commit
86b31ada1f
|
|
@ -64,6 +64,11 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Notes</label>
|
||||
<textarea class="form-control" rows="3" placeholder="Enter some notes" name="notes"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Domain</label>
|
||||
<div class="input-group">
|
||||
|
|
@ -92,4 +97,4 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Notes</label>
|
||||
<textarea class="form-control" rows="3" placeholder="Enter some notes" name="notes" id="editNotes"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Domain</label>
|
||||
<div class="input-group">
|
||||
|
|
@ -75,7 +80,9 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer bg-white">
|
||||
<button type="submit" name="edit_certificate" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
|
|
@ -83,4 +90,4 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ function populateCertificateEditModal(client_id, certificate_id) {
|
|||
document.getElementById("editIssuedBy").value = certificate.certificate_issued_by;
|
||||
document.getElementById("editExpire").value = certificate.certificate_expire;
|
||||
document.getElementById("editPublicKey").value = certificate.certificate_public_key;
|
||||
document.getElementById("editNotes").value = certificate.certificate_notes;
|
||||
|
||||
// Select the domain dropdown
|
||||
var domainDropdown = document.getElementById("editDomainId");
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ if (isset($_POST['add_certificate'])) {
|
|||
$issued_by = sanitizeInput($_POST['issued_by']);
|
||||
$expire = sanitizeInput($_POST['expire']);
|
||||
$public_key = sanitizeInput($_POST['public_key']);
|
||||
$notes = sanitizeInput($_POST['notes']);
|
||||
$domain_id = intval($_POST['domain_id']);
|
||||
|
||||
// Parse public key data for a manually provided public key
|
||||
|
|
@ -32,7 +33,7 @@ if (isset($_POST['add_certificate'])) {
|
|||
$expire = "'" . $expire . "'";
|
||||
}
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO certificates SET certificate_name = '$name', certificate_domain = '$domain', certificate_issued_by = '$issued_by', certificate_expire = $expire, certificate_public_key = '$public_key', certificate_domain_id = $domain_id, certificate_client_id = $client_id");
|
||||
mysqli_query($mysqli,"INSERT INTO certificates SET certificate_name = '$name', certificate_domain = '$domain', certificate_issued_by = '$issued_by', certificate_expire = $expire, certificate_public_key = '$public_key', certificate_notes = '$notes', certificate_domain_id = $domain_id, certificate_client_id = $client_id");
|
||||
|
||||
$certificate_id = mysqli_insert_id($mysqli);
|
||||
|
||||
|
|
@ -55,6 +56,7 @@ if (isset($_POST['edit_certificate'])) {
|
|||
$issued_by = sanitizeInput($_POST['issued_by']);
|
||||
$expire = sanitizeInput($_POST['expire']);
|
||||
$public_key = sanitizeInput($_POST['public_key']);
|
||||
$notes = sanitizeInput($_POST['notes']);
|
||||
$domain_id = intval($_POST['domain_id']);
|
||||
$client_id = intval($_POST['client_id']);
|
||||
|
||||
|
|
@ -74,7 +76,7 @@ if (isset($_POST['edit_certificate'])) {
|
|||
$expire = "'" . $expire . "'";
|
||||
}
|
||||
|
||||
mysqli_query($mysqli,"UPDATE certificates SET certificate_name = '$name', certificate_domain = '$domain', certificate_issued_by = '$issued_by', certificate_expire = $expire, certificate_public_key = '$public_key', certificate_domain_id = '$domain_id' WHERE certificate_id = $certificate_id");
|
||||
mysqli_query($mysqli,"UPDATE certificates SET certificate_name = '$name', certificate_domain = '$domain', certificate_issued_by = '$issued_by', certificate_expire = $expire, certificate_public_key = '$public_key', certificate_notes = '$notes', certificate_domain_id = '$domain_id' WHERE certificate_id = $certificate_id");
|
||||
|
||||
//Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Certificate', log_action = 'Modify', log_description = '$session_name modified certificate $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $certificate_id");
|
||||
|
|
|
|||
Loading…
Reference in New Issue