<?php
/* Smarty version 5.4.2, created on 2025-01-06 20:52:02
  from 'file:../default/ajax-contact-edit.tpl' */

/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
  'version' => '5.4.2',
  'unifunc' => 'content_677c88c295ede9_63508583',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '9ffc723b2a5033692570ce3e28963e82f7b15cae' => 
    array (
      0 => '../default/ajax-contact-edit.tpl',
      1 => 1736214624,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
))) {
function content_677c88c295ede9_63508583 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/ui/theme/default';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, false);
?>


<?php 
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_146432870677c88c291b029_78476611', "head");
?>


<form class="form-horizontal" id="rform">

    <div class="mb-3"><label for="account"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Account Name'];?>
</span></label>

        <input type="text" id="account" name="account" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['account'];?>
">
    </div>

    <div class="row mt-2">
        <div class="col-md-6 ">
            <div class="mb-3"><label for="code"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Code'];?>
</span></label>

                <input type="text" id="code" name="code" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['code'];?>
">
            </div>

        </div>
        <div class="col-md-6 ">
            <div class="mb-3 h6"><label for="company_id"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Company'];?>
</span></label>

                <select id="company_id" name="company_id" class="form-control">
                    <option value="0"><?php echo $_smarty_tpl->getValue('_L')['None'];?>
</option>
                    <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('companies'), 'company');
$foreach0DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('company')->value) {
$foreach0DoElse = false;
?>
                        <option value="<?php echo $_smarty_tpl->getValue('company')['id'];?>
" <?php if ($_smarty_tpl->getValue('d')->cid == ($_smarty_tpl->getValue('company')['id'])) {?>selected<?php }?>><?php echo $_smarty_tpl->getValue('company')['company_name'];?>
</option>
                    <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
                </select>
            </div>


        </div>
    </div>

    <div class="row mt-2">
        <div class="col-md-6">
            <div class="mb-3 h6"><label for="edit_email"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Email'];?>
</span></label>

                <input type="text" id="edit_email" name="edit_email" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['email'];?>
">
            </div>


        </div>
        <div class="col-md-6">
            <div class="mb-3 h6"><label for="edit_secondary_email"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Secondary Email'];?>
</span></label>
                <input type="text" id="edit_secondary_email" name="secondary_email" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['secondary_email'];?>
">
            </div>


        </div>
    </div>

    <div class="row mt-2">
        <div class="col-md-6">
            <div class="mb-3 h6"><label for="phone"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Phone'];?>
</span></label>

                <input type="text" id="phone" name="phone" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['phone'];?>
">
            </div>

        </div>
        <div class="col-md-6">
            <div class="mb-3 h6"><label for="company_id"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Owner'];?>
</span></label>

                <select class="form-select" name="owner_id" id="owner_id">
                    <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('owners'), 'owner');
$foreach1DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('owner')->value) {
$foreach1DoElse = false;
?>
                        <option value="<?php echo $_smarty_tpl->getValue('owner')->id;?>
" <?php if ($_smarty_tpl->getValue('owner')->id == $_smarty_tpl->getValue('d')->o) {?>selected<?php }?> ><?php echo $_smarty_tpl->getValue('owner')->fullname;?>
</option>
                    <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
                </select>
            </div>

        </div>
    </div>



    <?php if ($_smarty_tpl->getValue('config')['show_business_number'] == '1') {?>

        <div class="mb-3 h6">

            <label for="business_number"><span class="h6"><?php echo $_smarty_tpl->getValue('config')['label_business_number'];?>
</span></label>

            <input type="text" id="business_number" name="business_number" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['business_number'];?>
">
        </div>

    <?php }?>

    <?php if ($_smarty_tpl->getValue('config')['fax_field']) {?>

        <div class="mb-3 h6"><label for="phone"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Fax'];?>
</span></label>

            <input type="text" id="fax" name="fax" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['fax'];?>
">
        </div>

    <?php }?>


    <div class="mb-3 h6"><label for="address"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Address'];?>
</span></label>

        <input type="text" id="address" name="address" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['address'];?>
">
    </div>
    <div class="row mt-2">
        <div class="col-md-6">
            <div class="mb-3 h6"><label for="city"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['City'];?>
</span></label>

                <input type="text" id="city" name="city" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['city'];?>
">
            </div>

        </div>
        <div class="col-md-6">
            <div class="mb-3 h6"><label for="state"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['State Region'];?>
</span></label>
                <input type="text" id="state" name="state" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['state'];?>
">
            </div>

        </div>
    </div>

    <div class="row mt-2">
        <div class="col-md-4">
            <div class="mb-3 h6"><label for="zip"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['ZIP Postal Code'];?>
 </span></label>
                <input type="text" id="zip" name="zip" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['zip'];?>
">
            </div>
        </div>
        <div class="col-md-8">
            <div class="mb-3 h6"><label for="country"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Country'];?>
</span></label>
                <select name="country" id="country" class="form-control">
                    <option value=""><?php echo $_smarty_tpl->getValue('_L')['Select Country'];?>
</option>
                    <?php echo $_smarty_tpl->getValue('countries');?>

                </select>
            </div>

        </div>
    </div>

    <div class="row">
        <div class="col-md-6">
            <div class="row">
                <div class="col">
                    <label for="lat"><span class="h6"><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('__')('Latitude');?>
</span></label>
                    <input type="text" id="lat" name="lat" class="form-control" value="<?php echo (($tmp = $_smarty_tpl->getValue('d')['lat'] ?? null)===null||$tmp==='' ? '' ?? null : $tmp);?>
">
                </div>
                <div class="col">
                    <label for="lon"><span class="h6"><?php echo $_smarty_tpl->getSmarty()->getModifierCallback('__')('Longitude');?>
</span></label>
                    <input type="text" id="lon" name="lon" class="form-control" value="<?php echo (($tmp = $_smarty_tpl->getValue('d')['lon'] ?? null)===null||$tmp==='' ? '' ?? null : $tmp);?>
">
                </div>
            </div>
        </div>
    </div>



    <div class="row mt-2">
        <div class="col-md-7">
            <div class="mb-3"><label for="group"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Group'];?>
 </span></label>
                <select class="form-select" name="group" id="group">
                    <option value="0" <?php if (($_smarty_tpl->getValue('d')['gid']) == 0) {?>selected<?php }?>><?php echo $_smarty_tpl->getValue('_L')['None'];?>
</option>
                    <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('gs'), 'g');
$foreach2DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('g')->value) {
$foreach2DoElse = false;
?>
                        <option value="<?php echo $_smarty_tpl->getValue('g')['id'];?>
" <?php if (($_smarty_tpl->getValue('d')['gid']) == ($_smarty_tpl->getValue('g')['id'])) {?>selected<?php }?>><?php echo $_smarty_tpl->getValue('g')['gname'];?>
</option>
                    <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
                </select>
            </div>


        </div>
        <div class="col-md-5">
            <?php if ($_smarty_tpl->getValue('config')['accounting'] == '1') {?>

                <div class="mb-3"><label class="col-md-2" for="currency"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Currency'];?>
</span></label>
                    <select id="currency" name="currency" class="form-control">

                        <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('currencies'), 'currency');
$foreach3DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('currency')->value) {
$foreach3DoElse = false;
?>
                            <option value="<?php echo $_smarty_tpl->getValue('currency')['id'];?>
"
                                    <?php if (($_smarty_tpl->getValue('d')['currency']) == ($_smarty_tpl->getValue('currency')['id'])) {?>selected="selected" <?php }?>><?php echo $_smarty_tpl->getValue('currency')['cname'];?>
</option>
                            <?php
}
if ($foreach3DoElse) {
?>
                            <option value="0"><?php echo $_smarty_tpl->getValue('config')['home_currency'];?>
</option>
                        <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>

                    </select>
                </div>

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












    <?php if ($_smarty_tpl->getValue('config')['client_dashboard'] == '1') {?>

    <?php if ($_smarty_tpl->getValue('config')['customer_custom_username']) {?>

        <div class="mb-3 h6"><label for="username"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Username'];?>
 </span></label>

            <input type="text" id="username" name="username" class="form-control" value="<?php echo $_smarty_tpl->getValue('d')['username'];?>
">
        </div>


        <?php }?>


        <div class="mb-3 h6"><label for="password"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Password'];?>
</span> </label>

            <input type="password" id="password" name="password" class="form-control" autocomplete="new-password">

            <span class="help-block text-info h6"><?php echo $_smarty_tpl->getValue('_L')['password_change_help'];?>
</span>
        </div>

    <?php }?>



    <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('fs'), 'f');
$foreach4DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('f')->value) {
$foreach4DoElse = false;
?>
        <div class="mb-3"><label for="cf<?php echo $_smarty_tpl->getValue('f')['id'];?>
"><?php echo $_smarty_tpl->getValue('f')['fieldname'];?>
</label>
            <?php if (($_smarty_tpl->getValue('f')['fieldtype']) == 'text') {?>


                <input type="text" id="cf<?php echo $_smarty_tpl->getValue('f')['id'];?>
" name="cf<?php echo $_smarty_tpl->getValue('f')['id'];?>
" class="form-control" value="<?php if ($_smarty_tpl->getSmarty()->getModifierCallback('get_custom_field_value')($_smarty_tpl->getValue('f')['id'],$_smarty_tpl->getValue('d')['id']) != '') {?> <?php echo $_smarty_tpl->getSmarty()->getModifierCallback('get_custom_field_value')($_smarty_tpl->getValue('f')['id'],$_smarty_tpl->getValue('d')['id']);
}?>">
                <?php if (($_smarty_tpl->getValue('f')['description']) != '') {?>
                    <span class="help-block"><?php echo $_smarty_tpl->getValue('f')['description'];?>
</span>
                <?php }?>

            <?php } elseif (($_smarty_tpl->getValue('f')['fieldtype']) == 'password') {?>

                <input type="password" id="cf<?php echo $_smarty_tpl->getValue('f')['id'];?>
" name="cf<?php echo $_smarty_tpl->getValue('f')['id'];?>
" class="form-control" value="<?php if ($_smarty_tpl->getSmarty()->getModifierCallback('get_custom_field_value')($_smarty_tpl->getValue('f')['id'],$_smarty_tpl->getValue('d')['id']) != '') {?> <?php echo $_smarty_tpl->getSmarty()->getModifierCallback('get_custom_field_value')($_smarty_tpl->getValue('f')['id'],$_smarty_tpl->getValue('d')['id']);
}?>">
                <?php if (($_smarty_tpl->getValue('f')['description']) != '') {?>
                    <span class="help-block"><?php echo $_smarty_tpl->getValue('f')['description'];?>
</span>
                <?php }?>

            <?php } elseif (($_smarty_tpl->getValue('f')['fieldtype']) == 'dropdown') {?>
                <select id="cf<?php echo $_smarty_tpl->getValue('f')['id'];?>
" name="cf<?php echo $_smarty_tpl->getValue('f')['id'];?>
" class="form-control">
                    <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getSmarty()->getModifierCallback('explode')(',',$_smarty_tpl->getValue('f')['fieldoptions']), 'fo');
$foreach5DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('fo')->value) {
$foreach5DoElse = false;
?>
                        <option value="<?php echo $_smarty_tpl->getValue('fo');?>
" <?php if ($_smarty_tpl->getSmarty()->getModifierCallback('get_custom_field_value')($_smarty_tpl->getValue('f')['id'],$_smarty_tpl->getValue('d')['id']) == $_smarty_tpl->getValue('fo')) {?> selected="selected" <?php }?>><?php echo $_smarty_tpl->getValue('fo');?>
</option>
                    <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
                </select>
                <?php if (($_smarty_tpl->getValue('f')['description']) != '') {?>
                    <span class="help-block"><?php echo $_smarty_tpl->getValue('f')['description'];?>
</span>
                <?php }?>

            <?php } elseif (($_smarty_tpl->getValue('f')['fieldtype']) == 'textarea') {?>

                <textarea id="cf<?php echo $_smarty_tpl->getValue('f')['id'];?>
" name="cf<?php echo $_smarty_tpl->getValue('f')['id'];?>
" class="form-control" rows="3"><?php if ($_smarty_tpl->getSmarty()->getModifierCallback('get_custom_field_value')($_smarty_tpl->getValue('f')['id'],$_smarty_tpl->getValue('d')['id']) != '') {?> <?php echo $_smarty_tpl->getSmarty()->getModifierCallback('get_custom_field_value')($_smarty_tpl->getValue('f')['id'],$_smarty_tpl->getValue('d')['id']);
}?></textarea>
                <?php if (($_smarty_tpl->getValue('f')['description']) != '') {?>
                    <span class="help-block"><?php echo $_smarty_tpl->getValue('f')['description'];?>
</span>
                <?php }?>

            <?php } else { ?>
            <?php }?>
        </div>
    <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>

    <div class="mb-3"><label for="cid"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Type'];?>
</span> </label>

        <div class="checkbox">
            <label>
                <input type="checkbox" class="custom-checkbox" name="customer" value="Customer" <?php if ($_smarty_tpl->getValue('d')->type == 'Customer,Supplier' || $_smarty_tpl->getValue('d')->type == 'Customer') {?> checked <?php }?>>
                <?php echo $_smarty_tpl->getValue('_L')['Customer'];?>

            </label>
        </div>

        <?php if ($_smarty_tpl->getValue('config')['suppliers'] == '1') {?>
            <div class="checkbox">
                <label>
                    <input type="checkbox" class="custom-checkbox" name="supplier" value="Supplier"  <?php if ($_smarty_tpl->getValue('d')->type == 'Customer,Supplier' || $_smarty_tpl->getValue('d')->type == 'Supplier') {?> checked <?php }?>>
                    <?php echo $_smarty_tpl->getValue('_L')['Supplier'];?>

                </label>
            </div>
        <?php }?>
    </div>

    <div class="mb-3"><label for="tags"><span class="h6"><?php echo $_smarty_tpl->getValue('_L')['Tags'];?>
</span></label>

        <select name="tags[]" id="tags"  class="form-control" multiple="multiple">
            <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('tags'), 'tag');
$foreach6DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('tag')->value) {
$foreach6DoElse = false;
?>
                <option value="<?php echo $_smarty_tpl->getValue('tag')['text'];?>
" <?php if ($_smarty_tpl->getSmarty()->getModifierCallback('in_array')($_smarty_tpl->getValue('tag')['text'],$_smarty_tpl->getValue('dtags'))) {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->getValue('tag')['text'];?>
</option>
            <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>

        </select>
    </div>



    <div class="mb-3">
        <button class="btn btn-primary" type="submit" id="submit"><i class="fal fa-check"></i> <?php echo $_smarty_tpl->getValue('_L')['Submit'];?>
</button>
    </div>



    <input type="hidden" name="fcid" id="fcid" value="<?php echo $_smarty_tpl->getValue('d')['id'];?>
">


</form>
<?php }
/* {block "head"} */
class Block_146432870677c88c291b029_78476611 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/ui/theme/default';
?>


    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.6.2/css/buttons.dataTables.min.css" />

<?php
}
}
/* {/block "head"} */
}
