<?php
/** @var string $pageTitle */
/** @var string $version */
/** @var array $releaseTrains */
?>

<div class="container-fluid">

    <div class="d-flex justify-content-between align-items-center mb-4">
        <h1><?= htmlspecialchars($pageTitle) ?></h1>

        <a href="/studio/mises-a-jour"
           class="btn btn-outline-secondary">
            ← Retour
        </a>
    </div>

    <div class="card">

        <div class="card-header">
            Nouvelle mise à jour
        </div>

        <div class="card-body">

            <form>

                <div class="mb-3">
                    <label class="form-label">
                        Version actuelle
                    </label>

                    <input
                        class="form-control"
                        value="<?= htmlspecialchars($version) ?>"
                        readonly>
                </div>

                <div class="mb-3">
                    <label class="form-label">
                        Version cible
                    </label>

                    <input
                        class="form-control"
                        placeholder="10.2.6.15">
                </div>

                <div class="mb-3">

                    <label class="form-label">
                        Release Train
                    </label>

                    <select class="form-select">

                        <option>
                            -- Sélectionner --
                        </option>

                        <?php foreach ($releaseTrains as $train): ?>

                            <option>
                                <?= htmlspecialchars($train['nom']) ?>
                                (<?= htmlspecialchars($train['version']) ?>)
                            </option>

                        <?php endforeach; ?>

                    </select>

                </div>

                <div class="mb-3">

                    <label class="form-label">
                        Description
                    </label>

                    <textarea
                        rows="4"
                        class="form-control"></textarea>

                </div>

                <button
                    disabled
                    class="btn btn-primary">

                    Construire (bientôt)

                </button>

            </form>

        </div>

    </div>

</div>