<?php $this->layout(
    'system::layout/default',
    [
        'title'      => __('Edit news'),
        'page_title' => __('Edit news'),
    ]
) ?>

<h4><?= __('Edit news') ?></h4>
<form action="/news/edit/<?= $id ?>" method="post">
    <div class="form-group">
        <label for="title"><?= __('Title') ?></label>
        <input type="text"
               class="form-control"
               maxlength="255"
               name="name"
               id="title"
               required
               value="<?= $name ?>"
               placeholder="<?= __('Title') ?>"
        >
    </div>
    <div class="form-group">
        <label for="text"><?= __('Text') ?></label>
        <textarea id="text" class="form-control" name="text" rows="<?= $user->config->fieldHeight ?>"><?= $text ?></textarea>
    </div>
    <div>
        <button type="submit" class="btn btn-primary mr-2"><?= __('Save') ?></button>
        <a href="/news/" class="btn btn-outline-primary"><?= __('Back to news') ?></a>
    </div>
</form>

