Added format tables in document templates

This commit is contained in:
johnnyq 2023-09-26 13:55:59 -04:00
parent 48d8fdd760
commit 1a5cd14208
2 changed files with 12 additions and 2 deletions

View File

@ -61,8 +61,9 @@ $document_parent = intval($row['document_parent']);
<div class="row">
<div class="col"><strong>Date:</strong> <?php echo date('Y-m-d', strtotime($document_created_at)); ?></div>
<?php if(!empty($document_created_by_name)){ ?>
<div class="col"><strong>Prepared By:</strong> <?php echo $document_created_by_name; ?></div>
<div class="col"><strong>Revision:</strong></div>
<?php } ?>
</div>
</div>
<div class="card-body" id="formatTables">

View File

@ -48,11 +48,20 @@ $document_updated_at = nullable_htmlentities($row['document_updated_at']);
</button>
</div>
</div>
<div class="card-body">
<div class="card-body" id="formatTables">
<?php echo $document_content; ?>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function(){
let tables = document.querySelectorAll('div#formatTables');
tables.forEach(function(table){
table.classList.add('table');
});
});
</script>
<?php
require_once("document_template_edit_modal.php");