<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h3><?= __('Edit package') ?></h3>
</div>

<form data-ajax action="<?= admin_url_to('/profile/block-packages/edit/' . $package['id']) ?>" method="post">
    <?= csrf_field() ?>

    <div class="modal-body">
        <div class="row">
            <div class="col-md-10">
                <div class="form-group">
                    <label class="control-label" for="name"><?= __('Name') ?> <span class="required">*</span></label>
                    <input class="form-control" value="<?= $package['package'] ?>" type="text" name="name" id="name" />
                </div>
            </div>

            <div class="col-md-2">
                <div class="form-group">
                    <label class="control-label" for="active"><?= __('Active') ?>?</label>

                    <div>
                        <input class="form-control toggle"<?= $package['active'] ? ' checked' : '' ?> type="checkbox" id="active" value="1" name="active" />
                    </div>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label" for="desc"><?= __('Description') ?></label>
            <textarea class="form-control" name="desc" id="desc"><?= $package['description'] ?></textarea>
        </div>

        <div class="form-group">
            <label class="control-label" for="image"><?= __('Image') ?></label>
            <input data-upload-field class="form-control" id="image" type="file" name="image" />
        </div>

        <div class="form-group">
            <label class="control-label" for="hours"><?= __('Block hours') ?> <span class="required">*</span></label>
            <input class="form-control" value="<?= $package['hours'] ?>" type="text" name="hours" id="hours" />
        </div>

        <fieldset>
            <legend><?= __('Prices') ?></legend>

            <div class="form-group">
                <label class="control-label" for="amount-hours"><?= __('Amount hours') ?> <span class="required">*</span></label>
                <input class="form-control" value="<?= $package['amount_hours'] ?>" type="text" name="amount_hours" id="amount-hours" />
            </div>

            <div class="form-group">
                <label class="control-label" for="amount-credits"><?= __('Amount credits') ?></label>
                <input class="form-control money" value="<?= util('Number')->currency($package['amount_credits']) ?>" type="text" name="amount_credits" id="amount-credits" />
            </div>
        </fieldset>
    </div>

    <div class="modal-footer" style="margin-top:0">
        <input type="submit" class="btn btn-primary" value="<?= __('Add') ?>" />
    </div>
</form>