Skip to content

Commit

Permalink
Default to the saved template when one is saved so it does not reset,…
Browse files Browse the repository at this point in the history
… carry over from previous commit
  • Loading branch information
austinwbest committed Nov 10, 2024
1 parent 85a26f5 commit 127544e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion root/app/www/public/ajax/starr.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@
}
}

$templateOptions = getTemplateOptions();
if ($existing['template']) {
$templateOptions = str_replace('value="' . $existing['template'] . '"', 'selected value="' . $existing['template'] . '"', $templateOptions);
}

?>
<?php if ($clone) { ?>
<center><h4>Cloning: <span class="text-warning"><?= $clone['name'] ?></span></h4></center>
Expand All @@ -122,7 +127,7 @@
<tr>
<td>Endpoint template<br><span class="text-small">Automatically select the endpoints based on an app template</span></td>
<td>
<select class="form-select" id="access-template" onchange="applyTemplateOptions()"><?= getTemplateOptions() ?></select>
<select class="form-select" id="access-template" onchange="applyTemplateOptions()"><?= $templateOptions ?></select>
</td>
</tr>
<tr>
Expand Down

0 comments on commit 127544e

Please sign in to comment.