<?php
/* Smarty version 3.1.33, created on 2022-11-02 13:33:25
  from '/home/crescjwi/dashboard.homeworktask.com/content/themes/dashboard/system/currency.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_636271a597a8a6_79896096',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '9c1e06ba91ec1188c061224d8e59c3f7f825bcec' => 
    array (
      0 => '/home/crescjwi/dashboard.homeworktask.com/content/themes/dashboard/system/currency.tpl',
      1 => 1656689818,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_636271a597a8a6_79896096 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>
 

<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_590155223636271a5961566_85668781', 'content_wrapper');
$_smarty_tpl->inheritance->endChild($_smarty_tpl, 'dashboard/layout.tpl');
}
/* {block 'content_wrapper'} */
class Block_590155223636271a5961566_85668781 extends Smarty_Internal_Block
{
public $subBlocks = array (
  'content_wrapper' => 
  array (
    0 => 'Block_590155223636271a5961566_85668781',
  ),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>

<div class="card">
    <div class="card-header with-icon">
        <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "currency") {?>
            <div class="pull-right flip">
                <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/system/currency/add" class="btn btn-info">
                    <i class="fa fa-plus"></i> Add New Currency
                </a>
            </div>
        <?php }?>

        <i class="fa fa-money-bill-alt mr10"></i>
        <strong>Currency</strong>
        <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "edit") {?> &rsaquo; <strong><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['title'], ENT_QUOTES, 'UTF-8');?>
</strong><?php }?>
        <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "add") {?> &rsaquo; <strong>Add New</strong><?php }?>
    </div>

    <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "currency") {?>

        <div class="card-body">

            <?php if (count($_smarty_tpl->tpl_vars['currencies']->value)) {?>
                <div class="table-responsive">
                    <table class="table <?php if ($_smarty_tpl->tpl_vars['theme_mode_night']->value) {?>table-dark<?php }?> table-striped table-bordered table-hover js_dataTable">
                        <thead>
                            <tr>
                                <th>Title</th>
                                <th>Currency</th>
                                <th>Symbol</th>
                                <th>Exchange Rate</th>
                                <th>Active</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['currencies']->value, 'currency');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['currency']->value) {
?>
                                <tr>
                                    <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['title'], ENT_QUOTES, 'UTF-8');?>
</td>
                                    <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['iso_code'], ENT_QUOTES, 'UTF-8');?>
</td>
                                    <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['symbol'], ENT_QUOTES, 'UTF-8');?>
</td>
                                    <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['conversion_rate'], ENT_QUOTES, 'UTF-8');?>
</td>
                                    <td>
                                        <?php if ($_smarty_tpl->tpl_vars['currency']->value['active']) {?>
                                            <span class="label label-success">Yes</span>
                                        <?php } else { ?>
                                            <span class="label label-danger">No</span>
                                        <?php }?>    
                                    </td>
                                    <td>
                                        <button data-toggle="tooltip" data-placement="top" title="Delete" class="btn btn-xs btn-danger js_admin-deleter" data-handle="currency" data-id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['id'], ENT_QUOTES, 'UTF-8');?>
">
                                            <i class="fa fa-trash-alt"></i>
                                        </button>
                                        <a data-toggle="tooltip" data-placement="top" title="Edit" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/system/currency/edit/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['id'], ENT_QUOTES, 'UTF-8');?>
" class="btn btn-xs btn-info">
                                            <i class="fa fa-pencil-alt"></i>
                                        </a>
                                    </td>
                                </tr>
                            <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        </tbody>
                    </table>

                    <?php echo $_smarty_tpl->tpl_vars['pager']->value;?>

                </div>
            <?php } else { ?>
                <div class="text-center x-muted"> <i class="fa fa-dollar-sign fa-4x"></i>
                    <p class="mb10"><strong>No currencies to show</strong></p>
                </div>
            <?php }?>
        </div>

    <?php } elseif ($_smarty_tpl->tpl_vars['sub_view']->value == "edit") {?>
        <div class="card-body">
            <form class="js_ajax-forms col-md-9 form-horizontal" data-url="/admin/currency?do=edit">
                <input type="hidden" name="currency_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['id'], ENT_QUOTES, 'UTF-8');?>
"/>
                <div class="form-group form-row">
                    <label class="col-sm-3 control-label text-left">
                        Title
                    </label>
                    <div class="col-sm-9">
                        <input class="form-control" type="text" name="title" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['title'], ENT_QUOTES, 'UTF-8');?>
" required>
                        <span class="help-block">
                            Currency title i.e US Dollars, Canadian Dollars
                        </span>
                    </div>
                </div>

                <div class="form-group form-row">
                    <label class="col-sm-3 control-label text-left">
                        ISO Code
                    </label>
                    <div class="col-sm-9">
                        <input class="form-control" type="text" name="iso_code" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['iso_code'], ENT_QUOTES, 'UTF-8');?>
" required>
                        <span class="help-block">
                            Currency ISO Code i.e USD, GBP. List of <a target="_blank" href="https://www.iban.com/currency-codes">ISO Codes</a>.
                        </span>
                    </div>
                </div>

                <div class="form-group form-row">
                    <label class="col-sm-3 control-label text-left">
                        Symbol
                    </label>
                    <div class="col-sm-9">
                        <input class="form-control" type="text" name="symbol"  value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['symbol'], ENT_QUOTES, 'UTF-8');?>
" required>
                        <span class="help-block">
                            Currency symbol €, £, $, ¥ 
                        </span>
                    </div>
                </div>

                <div class="form-group form-row">
                    <label class="col-sm-3 control-label text-left">
                        Exchange Rate
                    </label>
                    <div class="col-sm-9">
                        <input class="form-control force-integer" type="text" name="conversion_rate" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['conversion_rate'], ENT_QUOTES, 'UTF-8');?>
" required>
                        <span class="help-block">
                            1 USD is equivalent to the <strong>Exchange Rate</strong> this currency. Default is 1
                        </span>
                    </div>
                </div>

                <div class="form-group form-row">
                    <label class="col-sm-3 control-label text-left">
                        Active
                    </label>
                    <div class="col-sm-9">
                        <label class="switch" for="active">
                            <input type="checkbox" name="active" id="active" <?php if ($_smarty_tpl->tpl_vars['currency']->value['active'] == '1') {?>checked="checked"<?php }?>>
                            <span class="slider round"></span>
                        </label>
                        <span class="help-block">
                            Display this currency in checkout forms
                        </span>
                    </div>
                </div>

                <div class="form-group form-row">
                    <div class="col-sm-9 offset-sm-3">
                        <!-- success -->
                        <div class="alert alert-success mt10 x-hidden" role="alert"></div>
                        <!-- success -->

                        <!-- error -->
                        <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
                        <!-- error -->

                        <button type="submit" class="btn btn-info">Save Changes</button>
                    </div>
                </div>

            </form>
        </div>
    <?php } elseif ($_smarty_tpl->tpl_vars['sub_view']->value == "add") {?>
        <div class="card-body">
            <form class="js_ajax-forms col-md-9 form-horizontal" data-url="/admin/currency?do=add">
                <div class="form-group form-row">
                    <label class="col-sm-3 control-label text-left">
                        Title
                    </label>
                    <div class="col-sm-9">
                        <input class="form-control" type="text" name="title" required>
                        <span class="help-block">
                            Currency title i.e US Dollars, Canadian Dollars
                        </span>
                    </div>
                </div>

                <div class="form-group form-row">
                    <label class="col-sm-3 control-label text-left">
                        ISO Code
                    </label>
                    <div class="col-sm-9">
                        <input class="form-control" type="text" name="iso_code" required>
                        <span class="help-block">
                            Currency ISO Code i.e USD, GBP. List of <a target="_blank" href="https://www.iban.com/currency-codes">ISO Codes</a>.
                        </span>
                    </div>
                </div>

                <div class="form-group form-row">
                    <label class="col-sm-3 control-label text-left">
                        Symbol
                    </label>
                    <div class="col-sm-9">
                        <input class="form-control" type="text" name="symbol" required>
                        <span class="help-block">
                            Currency symbol €, £, $, ¥ 
                        </span>
                    </div>
                </div>

                <div class="form-group form-row">
                    <label class="col-sm-3 control-label text-left">
                        Exchange Rate
                    </label>
                    <div class="col-sm-9">
                        <input class="form-control force-integer" type="text" name="conversion_rate" required>
                        <span class="help-block">
                            1 USD is equivalent to the <strong>Exchange Rate</strong> this currency. Default is 1
                        </span>
                    </div>
                </div>

                <div class="form-group form-row">
                    <div class="col-sm-9 offset-sm-3">
                        <!-- success -->
                        <div class="alert alert-success mt10 x-hidden" role="alert"></div>
                        <!-- success -->

                        <!-- error -->
                        <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
                        <!-- error -->

                        <button type="submit" class="btn btn-info">Save Changes</button>
                    </div>
                </div>

            </form>
        </div>
    <?php }?>

</div>
<?php
}
}
/* {/block 'content_wrapper'} */
}
