<?php $view->extend('::wicms.html.php'); ?>
<?php $this->addGlobal('menuIsActive', $view['router']->path('wi_admin_offer_offer_index')); ?>

<?php $view['slots']->set('title', $view['translator']->trans('title.offers.category.new')); ?>

<?php $view['slots']->start('stylesheets'); ?>
<link rel="stylesheet" href="<?php echo $view['assets']->getUrl('media/Admin/WiCMS3/js/jquery/dataTables/media/css/jquery.dataTables.min.css'); ?>">
<link rel="stylesheet" href="<?php echo $view['assets']->getUrl('media/Admin/WiCMS3/css/news.css'); ?><?php echo $view['config']->getParameter('vStyle'); ?>">
<?php $view['slots']->stop(); ?>

<?php $view['slots']->start('breadcrumbs'); ?>
<li><?php echo $view['translator']->trans('main-menu.modules_addons'); ?></li>
<li><a href="<?php echo $view['router']->path('wi_admin_offer_offer_index'); ?>"><?php echo $view['translator']->trans('breadcrumbs.offers.offer.index'); ?></a></li>
<li><a href="<?php echo $view['router']->path('wi_admin_offer_category_index'); ?>"><?php echo $view['translator']->trans('breadcrumbs.offers.category.index'); ?></a></li>
<li><a href="<?php echo $view['router']->path('wi_admin_offer_category_new'); ?>"><?php echo $view['translator']->trans('breadcrumbs.offers.category.new'); ?></a></li>
<?php $view['slots']->stop(); ?>

<?php $view['slots']->start('titleSite'); ?>
<?php echo $view['translator']->trans('offers.offer.index.title'); ?> - <?php echo $view['translator']->trans('offers.category.index.subtitle'); ?> - <?php echo $view['translator']->trans('offers.category.new.subtitle'); ?>
<?php $view['slots']->stop(); ?>
<?php $view['slots']->start('titleIcon') ?>
    <i class="icon-megaphone color-menu-web-portal"></i>
<?php $view['slots']->stop() ?>
<?php $view['slots']->start('titleDesc'); ?>
<?php echo $view['translator']->trans('offers.category.new.desc'); ?>
<?php $view['slots']->stop(); ?>

<?php $view['slots']->start('body'); ?>
<?php echo $view['form']->start($form) ?>
<div class="box">
    <div class="box-header bg-transparent">
        <h3 class="box-title"><i class="icon-folder-add"></i><span><?php echo $view['translator']->trans('offers.category.new.subtitle'); ?></span></h3>
    </div>
    <div class="box-body " style="display: block;">
        <div class="row">
            <div class="large-2 columns">
                <p><strong><?php echo $view['translator']->trans('offers.category.form.name.title'); ?></strong>
                    <i class="icon-help-circled helpIcon" data-tooltip title="<?php echo $view['translator']->trans('offers.category.form.name.desc'); ?>"></i>
                </p>
            </div>
            <div class="large-10 columns">
                <div class="row">
                    <div class="medium-6 columns end">
                        <div class="formAlert"><?php echo $view['form']->errors($form['name']); ?></div>
                        <?php echo $view['form']->widget($form['name'], [
                            'attr' => [
                                'class' => ($form['name']->vars['attr']['class'] ?? '') . (! $form['name']->vars['valid'] ? ' callout alert' : null),
                            ],
                        ]); ?>
                    </div>
                </div>
            </div>
        </div>
        <hr>
        <div class="row">
            <div class="large-2 columns">
                <p><strong><?php echo $view['translator']->trans('offers.category.form.color.title'); ?></strong>
                    <i class="icon-help-circled helpIcon" data-tooltip title="<?php echo $view['translator']->trans('offers.category.form.color.desc'); ?>"></i>
                </p>
            </div>
            <div class="large-10 columns">
                <div class="row">
                    <div class="medium-2 columns end">
                        <div class="formAlert"><?php echo $view['form']->errors($form['color']); ?></div>
                        <?php echo $view['form']->widget($form['color'], [
                            'attr' => [
                                'class' => ($form['color']->vars['attr']['class'] ?? '') . (! $form['color']->vars['valid'] ? ' callout alert' : null),
                            ],
                        ]); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div class=" columns">
        <div class="news-add-form">
            <?php echo $view['form']->widget($form); ?>
            <button class="button" type="submit" value="<?php echo $view['translator']->trans('Form.create'); ?>">
                <i class="icon-plus"></i> <?php echo $view['translator']->trans('Form.create'); ?>
            </button>

            <a class="button secondary float-right" href="<?php echo $view['router']->path('wi_admin_offer_category_index'); ?>">
                <i class="icon-reply"></i> <?php echo $view['translator']->trans('Form.backShow'); ?>
            </a>
        </div>
    </div>
</div>
<?php echo $view['form']->end($form) ?>
<?php $view['slots']->stop(); ?>
