addEdit.php 2.63 KB
<div id="addEdit">
    <div class="inner"><?= $this->flash->output(); ?></div>
    <div class="inner">
        <div class="clearfix">
            <form enctype="multipart/form-data" method="post" action="" id="email_event_add_edit">

                <div class="input-group">
                    <span class="input-group-addon title-block-sizing">url сайта</span>
                    <input type="text" name="url" class="form-control" value='<?=  (isset( $data->url ) && !empty( $data->url ) ? $data->url : '') ?>'>
                </div>

                <div class="input-group">
                    <span class="input-group-addon title-block-sizing">Имя</span>
                    <input type="text" name="name" class="form-control" value='<?=  (isset( $data->name ) && !empty( $data->name ) ? $data->name : '') ?>'>
                </div>

                <div class="input-group">
                    <span class="input-group-addon title-block-sizing">E-mail</span>
                    <input type="text" name="email" class="form-control" value='<?=  (isset( $data->email ) && !empty( $data->email ) ? $data->email : '') ?>'>
                </div>

                <div class="input-group">
                    <span class="input-group-addon title-block-sizing">Телефон</span>
                    <input type="text" name="phone" class="form-control" value='<?=  (isset( $data->phone ) && !empty( $data->phone ) ? $data->phone : '') ?>'>
                </div>

                <div class="input-group">
                    <p>Данные с анкеты</p>
                    <?= '<textarea id="template_text" name="comment">'.(isset( $data->comment ) && !empty( $data->comment ) ? $data->comment : '').'</textarea>' ?>
                </div>

                <fieldset>
                    <legend>Услуги продажные</legend>
                    <ul>
                        <?php foreach($fields as $field):?>
                            <li><label title="<?= $field->comments; ?>"><input type="checkbox" <?= $field->isActive(isset( $data->services) && !empty( $data->services ) ? $data->services : array()) ? 'checked': '' ?> name="services[]"  value="<?= $field->id; ?>"><?= $field->name; ?></label></li>
                        <?php endforeach; ?>
                    </ul>
                </fieldset>

                <div class="input-group">
                    <a href="<?= $this->url->get([ 'for' => 'index_request' ]) ?>" class="btn btn-primary">Отмена</a>
                    <input type="submit" class="btn btn-success" name="save" value="Сохранить">
                </div>

            </form>
        </div>
    </div>
</div>