<?php /* Smarty version Smarty-3.1.11, created on 2024-03-24 11:54:38
         compiled from "../views/obgy/patienthistory/editmodel.html" */ ?>
<?php /*%%SmartyHeaderCode:206537029465fff85e3b1609-48572452%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '02ca18f14d187c2ca2b7e76c6284964cf59ec365' => 
    array (
      0 => '../views/obgy/patienthistory/editmodel.html',
      1 => 1477475466,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '206537029465fff85e3b1609-48572452',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'tablename' => 0,
    'itr' => 0,
    'selectname' => 0,
    'rowoftableid' => 0,
    'patientid' => 0,
    'maintableName' => 0,
    'alldata' => 0,
    'mydata' => 0,
    'i' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_65fff85e59d844_62724624',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_65fff85e59d844_62724624')) {function content_65fff85e59d844_62724624($_smarty_tpl) {?>
<input type="hidden" name="tablename" id="tablename" value="<?php echo $_smarty_tpl->tpl_vars['tablename']->value;?>
" />
<input type="hidden" name="itr" id="itr" value="<?php echo $_smarty_tpl->tpl_vars['itr']->value;?>
" />
<input type="hidden" name="selectname" id="selectname" value="<?php echo $_smarty_tpl->tpl_vars['selectname']->value;?>
" />
<input type="hidden" id="controllName" value="patienthistory"/>
<input type="hidden" id="rowoftableid" name="rowoftableid" value="<?php echo $_smarty_tpl->tpl_vars['rowoftableid']->value;?>
"/>
<input type="hidden" id="patientId" name="patientId" value="<?php echo $_smarty_tpl->tpl_vars['patientid']->value;?>
"/>
<input type="hidden" id="maintableName" name="maintableName" value="<?php echo $_smarty_tpl->tpl_vars['maintableName']->value;?>
"/>
<button type="button" class="btn btn-xs blue fright" id="addnewRow"><i class="fa fa-plus"></i> Add</button></td>
<table cellspacing="10" width="100%" id="dtAddTbl">
    <thead>
        <tr>
            <th>Name</th>
            <th>Delete</th>
        </tr>
    </thead>

    <input type="hidden" id="dtcount" value="<?php echo count($_smarty_tpl->tpl_vars['alldata']->value);?>
">
    <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['tablename']->value;?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1=="phobstericterminate"){?>
    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
    <?php  $_smarty_tpl->tpl_vars['mydata'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['mydata']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['alldata']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['mydata']->key => $_smarty_tpl->tpl_vars['mydata']->value){
$_smarty_tpl->tpl_vars['mydata']->_loop = true;
?>
    <tr>
        <td style="width: 100%">
            <a href="#" >

                <input type="text" class="form-control updateElementSelect" data-selectClass="<?php echo $_smarty_tpl->tpl_vars['selectname']->value;?>
"  data-select2="yes" data-id="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->id;?>
" data-colName="name" data-tableName="<?php echo $_smarty_tpl->tpl_vars['tablename']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->name;?>
"/>
            </a>
        </td>
        <td>
            <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['mydata']->value->id;?>
<?php $_tmp2=ob_get_clean();?><?php if ($_tmp2>5){?>
            <a class="fa fa-times btn red fleft deleteElementmodelnew"  data-link="patienthistory" data-fn="delRowsommedel" data-id="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->id;?>
" data-tableName="<?php echo $_smarty_tpl->tpl_vars['tablename']->value;?>
"></a>
            </a>
            <?php }else{ ?>

            <a href="#" class="btn red fleft col-md-1 " >
                <i class="fa fa-question-circle" ></i>
            </a>

            <?php }?>
        </td>
    </tr>
    <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
    <?php } ?>


    <?php }else{ ?>

    <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(1, null, 0);?>
    <?php  $_smarty_tpl->tpl_vars['mydata'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['mydata']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['alldata']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['mydata']->key => $_smarty_tpl->tpl_vars['mydata']->value){
$_smarty_tpl->tpl_vars['mydata']->_loop = true;
?>
    <tr>
        <td style="width: 100%">
            <a href="#" >

                <input type="text" class="form-control updateElementSelect" data-selectClass="<?php echo $_smarty_tpl->tpl_vars['selectname']->value;?>
"  data-select2="yes" data-id="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->id;?>
" data-colName="name" data-tableName="<?php echo $_smarty_tpl->tpl_vars['tablename']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->name;?>
"/>
            </a>
        </td>
        <td>
            <!--            <a href="#" class="fa fa-times btn red fleft deleteElementmodel" data-id="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->id;?>
" data-tableName="<?php echo $_smarty_tpl->tpl_vars['tablename']->value;?>
" >

                        </a>-->

            <a class=" fa fa-times btn red fleft deleteElementmodelnew"  data-link="patienthistory" data-fn="delRowsommedel" data-id="<?php echo $_smarty_tpl->tpl_vars['mydata']->value->id;?>
" data-tableName="<?php echo $_smarty_tpl->tpl_vars['tablename']->value;?>
" ></a>
        </td>
    </tr>
    <?php $_smarty_tpl->_capture_stack[0][] = array('default', 'i', null); ob_start(); ?><?php echo $_smarty_tpl->tpl_vars['i']->value+1;?>
<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
if (!empty($_capture_buffer)) {
 if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents());
 if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents());
 Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean();
} else $_smarty_tpl->capture_error();?>
    <?php } ?>

    <?php }?>
</table>
<?php }} ?>