<section class="content-header">
    <h1><?= __('Edit countdown') ?></h1>

    <div class="actions">
        <a data-ajax class="btn btn-default btn-sm" href="<?= admin_url_to('/countdowns') ?>"><?= __('List') ?></a>
    </div>
</section>

<section class="content">
    <div class="box box-default">
        <form data-ajax class="form-focus" action="<?= admin_url_to('/countdowns/edit/' . $countdown['id']) ?>" method="post">
            <?= csrf_field() ?>

            <div class="box-body">
                <div class="section">
                    <div class="row">
                        <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
                            <h5><?= __('Countdown') ?></h5>
                        </div>

                        <div class="col-lg-9 col-md-9 col-sm-8 col-xs-12">
                            <div class="row">
                                <div class="col-md-10">
                                    <div class="form-group">
                                        <label class="control-label" for="title"><?= __('Title') ?> <span class="required">*</span></label>
                                        <input class="form-control" value="<?= $countdown['title'] ?>" type="text" name="title" id="title" />
                                    </div>
                                </div>

                                <div class="col-md-2">
                                    <div class="form-group">
                                        <label class="control-label" for="active"><?= __('Active') ?>?</label>
                                        <div>
                                            <input<?= $countdown['active'] ? ' checked' : '' ?> class="form-control toggle" type="checkbox" id="active" value="1" name="active" />
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="control-label" for="count-date"><?= __('Date') ?> <span class="required">*</span></label>
                                <input data-show-calendar-time value="<?= util('Date')->dateTime($countdown['count_date']) ?>" class="form-control" type="text" name="count_date" id="count-date" />
                            </div>

                            <div class="form-group">
                                <label class="control-label" for="message"><?= __('Message') ?></label>
                                <textarea class="form-control" type="text" name="message" id="message"><?= $countdown['message'] ?></textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="box-footer">
                <div class="row">
                    <div class="col-sm-offset-3" style="padding-left:15px">
                        <input type="submit" class="btn btn-primary" value="<?= __('Save') ?>" />
                    </div>
                </div>
            </div>
        </form>
    </div>
</section>