<?php
/* Smarty version 3.1.29, created on 2019-03-31 22:51:57
  from "D:\DEV\wamp\www\tunevoyage\application\views\admin\store.tpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_5ca11a5d8217e6_66055049',
  'file_dependency' => 
  array (
    'a5bda327b29f1fbe85223c1a0c01a88e962c1d5d' => 
    array (
      0 => 'D:\\DEV\\wamp\\www\\tunevoyage\\application\\views\\admin\\store.tpl',
      1 => 1554061912,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5ca11a5d8217e6_66055049 ($_smarty_tpl) {
echo form_open_multipart($_smarty_tpl->tpl_vars['action']->value,'class="form-horizontal padding upper"');?>

  <fieldset>

    <legend class="upper">
      <?php if (isset($_smarty_tpl->tpl_vars['edit']->value)) {?>
        <?php echo $_smarty_tpl->tpl_vars['edit']->value->name;?>

      <?php } else { ?>
        New Store
      <?php }?>
    </legend>

    <?php if (isset($_smarty_tpl->tpl_vars['edit']->value)) {?>
      <input type="hidden" name="edit_id" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value->id;?>
" />
    <?php }?>

    <?php $_smarty_tpl->tpl_vars['errors'] = new Smarty_Variable($_smarty_tpl->tpl_vars['session']->value->flashdata('errors'), null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'errors', 0);?>
    <?php if (isset($_smarty_tpl->tpl_vars['errors']->value)) {?>
      <!-- Show Errors -->
      <div class="form-group">
        <div class="col-md-12 text-center ">
          <div class="alert alert-danger">
            <?php
$_from = $_smarty_tpl->tpl_vars['errors']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_err_0_saved_item = isset($_smarty_tpl->tpl_vars['err']) ? $_smarty_tpl->tpl_vars['err'] : false;
$_smarty_tpl->tpl_vars['err'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['err']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['err']->value) {
$_smarty_tpl->tpl_vars['err']->_loop = true;
$__foreach_err_0_saved_local_item = $_smarty_tpl->tpl_vars['err'];
?>
              <?php echo $_smarty_tpl->tpl_vars['err']->value;?>
<br/>
            <?php
$_smarty_tpl->tpl_vars['err'] = $__foreach_err_0_saved_local_item;
}
if ($__foreach_err_0_saved_item) {
$_smarty_tpl->tpl_vars['err'] = $__foreach_err_0_saved_item;
}
?>
          </div>
        </div>
      </div>
    <?php }?>

    <div class="form-group">
      <label class="col-md-4 control-label" for="name">Store Name</label>  
      <div class="col-md-4">
        
        <input id="name" name="name" placeholder="Store Name" <?php if (isset($_smarty_tpl->tpl_vars['edit']->value)) {?>value="<?php echo $_smarty_tpl->tpl_vars['edit']->value->name;?>
"<?php }?> required="" class="form-control input-md" type="text">
        
      </div>
    </div>

    <div class="form-group">
      <label class="col-md-4 control-label" for="button_text">Button Text</label>  
      <div class="col-md-4">
        
        <input id="button_text" name="button_text" <?php if (isset($_smarty_tpl->tpl_vars['edit']->value)) {?>value="<?php echo $_smarty_tpl->tpl_vars['edit']->value->button_text;?>
"<?php }?> required="" class="form-control input-md" type="text">
        
      </div>
    </div>

    <?php if (!isset($_smarty_tpl->tpl_vars['edit']->value)) {?>
      <div class="form-group">
        <label class="col-md-4 control-label" for="keyword">Keyword</label>  
        <div class="col-md-4">
          
          <input id="keyword" name="keyword" placeholder="store_keyword" <?php if (isset($_smarty_tpl->tpl_vars['edit']->value)) {?>value="<?php echo $_smarty_tpl->tpl_vars['edit']->value->keyword;?>
"<?php }?> required="" class="form-control input-md" type="text">
          <span class="help-block downer gray small">
            <strong>No intervals or special cherecters!</strong><br/>
            Valid symbols: 0-9, A-Z, a-z, _, - 
          </span>
        </div>
      </div>
    <?php } else { ?>
      <div class="form-group">
        <label class="col-md-4 control-label">Keyword</label>  
        <div class="col-md-4">
          <span class="help-block downer gray small"><?php echo $_smarty_tpl->tpl_vars['edit']->value->keyword;?>
</span>
        </div>
      </div>
    <?php }?>

    <div class="form-group">
      <label class="col-md-4 control-label" for="visible">Active</label>  
      <div class="col-md-4">
        
        <input name="visible" value="1" type="checkbox" <?php if (isset($_smarty_tpl->tpl_vars['post']->value)) {?> <?php if (isset($_smarty_tpl->tpl_vars['post']->value['visible']) && $_smarty_tpl->tpl_vars['post']->value['visible'] == 1) {?> checked="checked" <?php }
} else {
if (isset($_smarty_tpl->tpl_vars['edit']->value) && $_smarty_tpl->tpl_vars['edit']->value->visible == 1) {?> checked="checked" <?php }?>
        <?php }?>> <div class="after-check-box downer">&nbsp; Active</div>
        
      </div>
    </div>

    <div class="form-group">
        <label class="col-md-4 control-label" for="upload-back">Logo File</label>  
        <div class="col-md-4">
          <?php if (isset($_smarty_tpl->tpl_vars['logo']->value) && !empty($_smarty_tpl->tpl_vars['logo']->value)) {?>
            <div class="small-padding"><kbd>Filename</kbd> - <?php echo $_smarty_tpl->tpl_vars['logo']->value->filename;?>
</div>
            <div class="small-padding"><kbd>Destination</kbd> - <?php echo $_smarty_tpl->tpl_vars['supplement_m']->value->getSupplementsDir(0,0);?>
</div>
            <div style="text-align: center;">
              <br/>
              <a href="<?php echo site_url();
echo $_smarty_tpl->tpl_vars['supplement_m']->value->getSupplementsDir(0,0);
echo $_smarty_tpl->tpl_vars['logo']->value->filename;?>
" target="_blank"><img src="<?php echo $_smarty_tpl->tpl_vars['supplement_m']->value->showPic($_smarty_tpl->tpl_vars['logo_thumb']->value->filename);?>
" /></a>
            </div>
            <div class="text-center">
              <?php echo fa_button('admin/store/delete_supplement/',$_smarty_tpl->tpl_vars['logo']->value->id,'DELETE COVER','fa-trash','btn btn-danger btn-delete');?>

            </div>
            <br/>
          <?php } else { ?>
            <input type="file" name="logo" />
            <span class="help-block downer gray small">
              <div class="small-padding"><kbd>Maximum size: 2MB</kbd></div>
              <div class="small-padding"><kbd>Allowed file types: .jpg, .jpeg, .gif, .png</kbd></div>
              <div class="small-padding"><kbd>Prefered dimensions (minimum): 200x62</kbd></div>
            </span>
          <?php }?>
        </div>

    </div>

    <div class="form-group">
      <div class="col-md-12 text-center">
          <button type="submit" name="action" class="btn btn-info upper"><?php if (!isset($_smarty_tpl->tpl_vars['edit']->value)) {?><i class="fa fa-plus-circle" aria-hidden="true"></i> &nbsp; Create<?php } else { ?><i class="fa fa-floppy-o" aria-hidden="true"></i> &nbsp; Save<?php }?> Store</button>
      </div>
    </div>

  </fieldset>
<?php echo form_close();
}
}
