<div class="round-border">

    <main style="padding:1em; display:grid; gap:1rem; grid-template-columns:repeat(2,1fr);">
        <div>
            <label for="TemplateName">Template Name</label>
            <input type="text" id="TemplateName" name="TemplateName" size="100" autocomplete="off"
                value="<?= old("TemplateName", esc($template->TemplateName)) ?>" spellcheck="true">
        </div>
        <div style="grid-column-start: 1;  grid-column-end: span 2;">
            <label for="Notes">Notes</label>
            <textarea name="Notes" id="Notes" rows="10" value="<?= old("Notes", esc($template->Notes)) ?>"></textarea>
        </div>

        <div style="grid-column-start: 1; grid-column-end: span 2; text-align: center;">
            <button class="button" type="submit">Save</button>
            <a class="button" href="<?= site_url('/templates') . '/' . $template->TemplateID ?>" default>Cancel</a>
        </div>
    </main>
</div>