<?php
/* Smarty version 5.4.2, created on 2024-12-12 17:30:43
  from 'file:../default/modal_lead.tpl' */

/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
  'version' => '5.4.2',
  'unifunc' => 'content_675b6413a66784_06900270',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'd1b7dcf65c7af3649c055f7904e0f4179b4a0387' => 
    array (
      0 => '../default/modal_lead.tpl',
      1 => 1730635718,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
))) {
function content_675b6413a66784_06900270 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/ui/theme/default';
?><div>
    <div class="panel shadow-none mb-0 rounded-0">
        <div class="panel-hdr">
            <h2>
                <?php if ($_smarty_tpl->getValue('act') == 'edit') {?>
                    <?php echo $_smarty_tpl->getValue('_L')['Edit'];?>

                <?php } elseif ($_smarty_tpl->getValue('act') == 'view') {?>
                    <?php echo $_smarty_tpl->getValue('lead')->salutation;?>
 <?php echo $_smarty_tpl->getValue('lead')->first_name;?>
 <?php echo $_smarty_tpl->getValue('lead')->middle_name;?>
 <?php echo $_smarty_tpl->getValue('lead')->last_name;?>

                <?php } else { ?>
                    <?php echo $_smarty_tpl->getValue('_L')['New Lead'];?>

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

        <div class="panel-container">
            <div class="panel-content">



                <?php if ($_smarty_tpl->getValue('act') == 'edit' || $_smarty_tpl->getValue('act') == 'new') {?>

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


                        <div class="row">


                            <div class="col-md-12">



                                <div class="mb-3"><label for="status"><?php echo $_smarty_tpl->getValue('_L')['Status'];?>
</label>
                                    <select class="form-select" id="status" name="status">

                                        <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('ls'), 's');
$foreach0DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('s')->value) {
$foreach0DoElse = false;
?>
                                            <?php if ($_smarty_tpl->getValue('act') == 'edit') {?>
                                                <option value="<?php echo $_smarty_tpl->getValue('s')['sname'];?>
" <?php if ($_smarty_tpl->getValue('val')['status'] == $_smarty_tpl->getValue('s')['sname']) {?>selected<?php }?>><?php echo $_smarty_tpl->getValue('s')['sname'];?>
</option>
                                            <?php } else { ?>
                                                <option value="<?php echo $_smarty_tpl->getValue('s')['sname'];?>
" <?php if ($_smarty_tpl->getValue('s')['is_default'] == '1') {?>selected<?php }?>><?php echo $_smarty_tpl->getValue('s')['sname'];?>
</option>
                                            <?php }?>
                                        <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>

                                    </select>
                                </div>


                                <div class="row mb-3">
                                    <div class="col-md-2">
                                        <div class="mb-3">
                                            <label for="salutation"><?php echo $_smarty_tpl->getValue('_L')['Salutation'];?>
</label>
                                            <select class="form-select" id="salutation" name="salutation">
                                                <option value="None">--<?php echo $_smarty_tpl->getValue('_L')['None'];?>
--</option>
                                                <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('salutations'), 'salutation');
$foreach1DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('salutation')->value) {
$foreach1DoElse = false;
?>
                                                    <?php if ($_smarty_tpl->getValue('act') == 'edit') {?>
                                                        <option value="<?php echo $_smarty_tpl->getValue('salutation')['sname'];?>
" <?php if ($_smarty_tpl->getValue('val')['salutation'] == $_smarty_tpl->getValue('salutation')['sname']) {?>selected<?php }?>><?php echo $_smarty_tpl->getValue('salutation')['sname'];?>
</option>
                                                    <?php } else { ?>
                                                        <option value="<?php echo $_smarty_tpl->getValue('salutation')['sname'];?>
"><?php echo $_smarty_tpl->getValue('salutation')['sname'];?>
</option>
                                                    <?php }?>

                                                <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-md-5">
                                        <div class="mb-3"><label for="first_name"><?php echo $_smarty_tpl->getValue('_L')['First Name'];?>
</label>
                                            <input type="text" id="first_name" name="first_name" class="form-control" value="<?php echo $_smarty_tpl->getValue('val')['first_name'];?>
">
                                        </div>
                                    </div>
                                    <div class="col-md-5">
                                        <div class="mb-3"><label for="last_name"><?php echo $_smarty_tpl->getValue('_L')['Last Name'];?>
<small class="red">*</small></label>

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

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







                                <div class="mb-3"><label for="title"><?php echo $_smarty_tpl->getValue('_L')['Title'];?>
</label>
                                    <input type="text" id="title" name="title" class="form-control" value="<?php echo $_smarty_tpl->getValue('val')['title'];?>
">
                                </div>

                                <div class="mb-3"><label for="company"><?php echo $_smarty_tpl->getValue('_L')['Company'];?>
</label>
                                    <select class="form-select" id="company" name="company">
                                        <option value="None">--<?php echo $_smarty_tpl->getValue('_L')['None'];?>
--</option>
                                        <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('companies'), 'company');
$foreach2DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('company')->value) {
$foreach2DoElse = false;
?>
                                            <option value="<?php echo $_smarty_tpl->getValue('company')['id'];?>
" <?php if ($_smarty_tpl->getValue('val')['company'] == $_smarty_tpl->getValue('company')['company_name']) {?>selected<?php }?>><?php echo $_smarty_tpl->getValue('company')['company_name'];?>
</option>
                                        <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
                                    </select>
                                </div>

                                <div class="mb-3"><label for="email"><?php echo $_smarty_tpl->getValue('_L')['Email'];?>
</label>
                                    <input type="text" id="email" name="email" class="form-control" value="<?php echo $_smarty_tpl->getValue('val')['email'];?>
">
                                </div>

                                <div class="mb-3"><label for=""><?php echo $_smarty_tpl->getValue('_L')['Phone'];?>
</label>
                                    <input type="text" id="phone" name="phone" class="form-control" value="<?php echo $_smarty_tpl->getValue('val')['phone'];?>
">
                                </div>



                                <div class="mb-3"><label for="source"><?php echo $_smarty_tpl->getValue('_L')['Source'];?>
</label>
                                    <select class="form-select" id="source" name="source">
                                        <option value="None">--<?php echo $_smarty_tpl->getValue('_L')['None'];?>
--</option>
                                        <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('sources'), 'source');
$foreach3DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('source')->value) {
$foreach3DoElse = false;
?>
                                            <option value="<?php echo $_smarty_tpl->getValue('source')['sname'];?>
"
                                            <?php if ($_smarty_tpl->getValue('val')['source'] == $_smarty_tpl->getValue('source')['sname']) {?>selected<?php }?>><?php echo $_smarty_tpl->getValue('source')['sname'];?>
</option>
                                        <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
                                    </select>
                                </div>


                                <div class="mb-3"><label for="industry"><?php echo $_smarty_tpl->getValue('_L')['Industry'];?>
</label>
                                    <select class="form-select" id="industry" name="industry">
                                        <?php
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('industries'), 'industry');
$foreach4DoElse = true;
foreach ($_from ?? [] as $_smarty_tpl->getVariable('industry')->value) {
$foreach4DoElse = false;
?>
                                            <option value="<?php echo $_smarty_tpl->getValue('industry')['industry'];?>
" <?php if ($_smarty_tpl->getValue('val')['industry'] == $_smarty_tpl->getValue('industry')['industry']) {?>selected<?php }?>><?php echo $_smarty_tpl->getValue('industry')['industry'];?>
</option>
                                        <?php
}
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
                                    </select>
                                </div>


                                                                                                                                                                
                                                                                                                                                                


                                <fieldset>
                                    <legend><?php echo $_smarty_tpl->getValue('_L')['Address'];?>
</legend>

                                    <div class="mb-3"><label for="street"><?php echo $_smarty_tpl->getValue('_L')['Street'];?>
</label>
                                        <textarea class="form-control" id="street" name="street" rows="2"></textarea>
                                    </div>

                                    <div class="mb-3"><label for="city"><?php echo $_smarty_tpl->getValue('_L')['City'];?>
</label>
                                        <input type="text" id="company" name="city" class="form-control" value="<?php echo $_smarty_tpl->getValue('val')['city'];?>
">
                                    </div>

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

                                    <div class="mb-3"><label for="zip"><?php echo $_smarty_tpl->getValue('_L')['ZIP Postal Code'];?>
</label>
                                        <input type="text" id="zip" name="zip" class="form-control" value="<?php echo $_smarty_tpl->getValue('val')['zip'];?>
">
                                    </div>

                                    <div class="mb-3"><label for="country"><?php echo $_smarty_tpl->getValue('_L')['Country'];?>
</label>
                                        <input type="text" id="country" name="country" class="form-control" value="<?php echo $_smarty_tpl->getValue('val')['country'];?>
">
                                    </div>

                                </fieldset>

                                <fieldset class="mt-3">
                                    <legend><?php echo $_smarty_tpl->getValue('_L')['Description'];?>
</legend>

                                    <div class="mb-3"><label for="memo"><?php echo $_smarty_tpl->getValue('_L')['Memo'];?>
</label>
                                        <textarea class="form-control" id="memo" name="memo" rows="4"></textarea>
                                    </div>


                                </fieldset>



                            </div>




                        </div>




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

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

                    </form>


                <?php } else { ?>


                    <div class="row">
                        <div class="col-md-3 ib_profile_width">

                            <img src="<?php echo $_smarty_tpl->getValue('app_url');?>
storage/system/profile-place-holder.jpg" class="rounded-circle img-fluid" alt=" ">

                        </div>

                        <div class="col-md-9">

                            <h5><?php echo $_smarty_tpl->getValue('lead')->salutation;?>
 <?php echo $_smarty_tpl->getValue('lead')->first_name;?>
 <?php echo $_smarty_tpl->getValue('lead')->middle_name;?>
 <?php echo $_smarty_tpl->getValue('lead')->last_name;?>
</h5>


                            <div id="application_ajaxrender" style="min-height: 200px;">
                                <p>

                                    <strong><?php echo $_smarty_tpl->getValue('_L')['Full Name'];?>
: </strong> <?php echo $_smarty_tpl->getValue('lead')->salutation;?>
 <?php echo $_smarty_tpl->getValue('lead')->first_name;?>
 <?php echo $_smarty_tpl->getValue('lead')->middle_name;?>
 <?php echo $_smarty_tpl->getValue('lead')->last_name;?>
 <br>
                                    <strong><?php echo $_smarty_tpl->getValue('_L')['Company Name'];?>
: </strong> <?php echo $_smarty_tpl->getValue('lead')->company;?>
 <br>
                                    <strong><?php echo $_smarty_tpl->getValue('_L')['Email'];?>
: </strong>  <?php echo $_smarty_tpl->getValue('lead')->email;?>
  <br>
                                    <strong><?php echo $_smarty_tpl->getValue('_L')['Phone'];?>
: </strong>  <?php echo $_smarty_tpl->getValue('lead')->phone;?>
  <br>
                                    <strong><?php echo $_smarty_tpl->getValue('_L')['Address'];?>
: </strong>  <?php echo $_smarty_tpl->getValue('lead')->street;?>
  <br>
                                    <strong><?php echo $_smarty_tpl->getValue('_L')['City'];?>
: </strong>  <?php echo $_smarty_tpl->getValue('lead')->city;?>
  <br>
                                    <strong><?php echo $_smarty_tpl->getValue('_L')['State Region'];?>
: </strong>  <?php echo $_smarty_tpl->getValue('lead')->state;?>
  <br>
                                    <strong><?php echo $_smarty_tpl->getValue('_L')['ZIP Postal Code'];?>
: </strong>  <?php echo $_smarty_tpl->getValue('lead')->zip;?>
  <br>
                                    <strong><?php echo $_smarty_tpl->getValue('_L')['Country'];?>
: </strong>  <?php echo $_smarty_tpl->getValue('lead')->country;?>
  <br>




                                </p>

                                <hr>

                                <a href="#" class="btn btn-primary act_convert_to_customer"> <?php echo $_smarty_tpl->getValue('_L')['Convert to Customer'];?>
</a>

                                <input type="hidden" name="v_lid" id="v_lid" value="<?php echo $_smarty_tpl->getValue('lead')->id;?>
">

                                <hr>

                                <textarea class="form-control" id="v_memo" name="v_memo" rows="6"><?php echo $_smarty_tpl->getValue('lead')->memo;?>
</textarea>

                                <button type="button" id="memo_update" class="btn btn-primary btn-block mt-3 act_memo_update"><?php echo $_smarty_tpl->getValue('_L')['Save'];?>
</button>


                            </div>



                        </div>

                    </div>




                <?php }?>




            </div>
        </div>

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