<div class="portlet box purple">
    <div class="portlet-title">
        <div class="caption">Family History </div>
        <div class="actions"></div>
        <div class="tools">
            <a href="#" class="collapse" title="تصغير / تكبير"></a>
        </div>
    </div>
    <div class="portlet-body">
        <div class="row">
            <div id="ultrasoundgynaDiv">
                <div class="row">
                    <div class="portlet-body form" >
                        <form>
                            <div class="form-body">
                                <input type="hidden" id="family_itr" value="{$phfamilycountx}"/>

                                <table>
                                    <tbody>
                                    <th class="wds15">Family
                                        <button type="button" class="btn btn-xs blue" id="family_btn" data-summary="1">
                                            <i class="fa fa-plus"></i> </button>
                                    </th>
                                    <td> 
                                        <table>
                                            <tr>
                                                <th class="wds35">Disease </th>
                                                <th class="wds25">Relative </th>
                                                <th> Note</th>
                                                <th class="wds10"> Husband</th>
                                                <th class="wds5"> </th>
                                            </tr>
                                        </table>
                                        <table  id="family_div">
                                            {assign var=i value=1}
                                            {foreach $phfamily as $myallphfamily}
                                            <tr>
                                                <td class="wds35"> 
                                                    <select  class="form-control family_disease updateElement allupdateselect" id="family_disease{$i}" data-itr="{$i}" data-val="{$myallphfamily->family_disease}"  name="family_disease" data-colName="family_disease" data-id="{$myallphfamily->id}" select-tableName="phfamilydisease"  data-tableName="phfamily" >
                                                        <option value="">choose</option>
                                                        {foreach  $allphfamilydisease as $myallphfamilydisease}
                                                        <option value="{$myallphfamilydisease->id}" {if {$myallphfamily->family_disease} eq  {$myallphfamilydisease->id} } selected {/if}>{$myallphfamilydisease->name} </option>
                                                        {/foreach}
                                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                                    </select>
                                                </td>
                                                <td class="wds25">
                                                    <select  class="form-control family_relative  updateElement allupdateselect" id="family_relative{$i}" data-itr="{$i}"  name="family_relative" data-colName="family_relative" data-val="{$myallphfamily->family_relative}" select-tableName="phfamilyrelative"  data-id="{$myallphfamily->id}" data-tableName="phfamily" >
                                                        <option value="">choose</option>
                                                        {foreach  $allphfamilyrelative as $myallphfamilyrelative}
                                                        <option value="{$myallphfamilyrelative->id}" {if {$myallphfamily->family_relative} eq  {$myallphfamilyrelative->id} } selected {/if}>{$myallphfamilyrelative->name} </option>
                                                        {/foreach}
                                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                                    </select>
                                                </td>
                                                <td>
                                                    <input type="text" class="amrpop form-control updateElement" placeholder="Note" name="familynote" 
                                                           data-colName="familynote" data-id="{$myallphfamily->id}" data-tableName="phfamily" 
                                                           value="{$myallphfamily->familynote}"/>
                                                </td>
                                                <td class="wds10"> 
                                                    <input type="checkbox"   id="for_husband" value="1" class="updateElementCheck" 
                                                           data-id="{$myallphfamily->id}" data-tableName="phfamily" 
                                                           data-colName="for_husband"  
                                                           {if $myallphfamily->for_husband  == 1 } checked {/if}>
                                                </td>
                                                <td class="wds5">
                                                    <a class="btn grey-cascade btn-xs deletemsgEX2" data-id="{$myallphfamily->id}" 
                                                       data-link="{$controllname}"  data-fn="del" data-tableName="phfamily" data-colName="del">
                                                        <i class="fa fa-times"></i> </a>
                                                </td>
                                            </tr>
                                            {capture assign=i}{$i+1}{/capture}
                                            {/foreach}
                                        </table>
                                    </td>
                                    </tbody>
                                </table>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
</div>
