mirror of
https://github.com/itflow-org/itflow
synced 2026-11-11 23:17:23 +00:00
41 lines
1.6 KiB
PHP
41 lines
1.6 KiB
PHP
<?php
|
|
|
|
/*
|
|
* Edit a license template - the fields are software_template_form.php.
|
|
*/
|
|
|
|
require_once '../../includes/modal_header.php';
|
|
|
|
$template = softwareTemplateRow($_GET['id'] ?? 0);
|
|
|
|
ob_start();
|
|
|
|
if (!$template) { ?>
|
|
<div class="modal-header bg-dark">
|
|
<h5 class="modal-title"><i class="fa fa-fw fa-cube me-2"></i>License template</h5>
|
|
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
|
</div>
|
|
<div class="modal-body text-center text-secondary py-5">That license template is gone - it may have been deleted.</div>
|
|
<?php } else { ?>
|
|
|
|
<div class="modal-header bg-dark">
|
|
<h5 class="modal-title text-truncate"><i class="fa fa-fw fa-cube me-2"></i>License template: <strong><?= escapeHtml($template['software_template_name']) ?></strong></h5>
|
|
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
|
</div>
|
|
<form action="post.php" method="post" autocomplete="off">
|
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
|
<input type="hidden" name="software_template_id" value="<?= intval($template['software_template_id']) ?>">
|
|
|
|
<div class="modal-body">
|
|
<?php require __DIR__ . '/software_template_form.php'; ?>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="submit" name="edit_software_template" class="btn btn-primary text-bold"><i class="fa fa-check me-2"></i>Save</button>
|
|
<button type="button" class="btn btn-light" data-bs-dismiss="modal"><i class="fa fa-times me-2"></i>Cancel</button>
|
|
</div>
|
|
</form>
|
|
|
|
<?php }
|
|
|
|
require_once '../../../includes/modal_footer.php';
|