<?php

namespace Anax\View;

if (!$content) {
    return;
}

$tf = new \Rasb14\Util\TextFilter();

?>
<form method="post">
    <fieldset>
        <legend>Ändra nyhet</legend>
        <input type="hidden" name="id" value="<?= $tf->esc($content->id) ?>"/>
        <p>
            <label>Titel:<br> 
                <input type="text" name="title" value="<?= $tf->esc($content->title) ?>"/>
            </label>
        </p>
        <p>
            <label>Text:<br> 
                <textarea rows="10" cols="100" name="data"><?= $tf->esc($content->data) ?></textarea>
            </label>
        </p>
        <p>
            <label>Filter:<br> 
                <input type="text" name="filter" value="<?= $tf->esc($content->filter) ?>"/>
            </label>
        </p>
        <p>
            <label>Publicera:<br>
                <input type="datetime" name="publish" value="<?= $tf->esc($content->published) ?>"/>
            </label>
        </p>
        <p>
            <button type="submit" name="save"><i class="far fa-save" aria-hidden="true"></i> Spara ändring</button>
        </p>
    </fieldset>
</form>
