<div class="portlet box purple">
    <div class="portlet-title">
        <div class="caption">Sexual 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="sexual_itr" value="{$phsexualcount}"/>
                                <table>
                                    <tbody>
                                    <th class="wds15">Sexual 
                                        <button type="button" class="btn btn-xs blue" id="sexual_btn" data-summary="1">
                                            <i class="fa fa-plus"></i> </button>
                                    </th>
                                    <td> 
                                        <table>
                                            <tr>
                                                <th class="wds45">Type </th>
                                                <th> Note</th>
                                                <th class="wds5"> </th>
                                            </tr>
                                        </table>
                                        <table  id="sexual_div">
                                            {assign var=i value=1}
                                            {foreach $phsexual as $myallphsexual}
                                            <tr>
                                                <td class="wds45"> 
                                                    <select  class="form-control sexual_type updateElement allupdateselect" id="sexual_type{$i}" data-itr="{$i}" data-val="{$myallphsexual->sexual_type}"  name="sexual_type" data-colName="sexual_type" data-id="{$myallphsexual->id}" select-tableName="phsexualtypes"  data-tableName="phsexual" >
                                                        <option value="">choose</option>
                                                        {foreach  $sexual_types as $data}
                                                        <option value="{$data->id}" {if {$myallphsexual->sexual_type} eq  {$data->id} } selected {/if}>{$data->name} </option>
                                                        {/foreach}
                                                        <option value="-2" class="deleteoptincompo">Delete</option>
                                                    </select>
                                                </td>
                                                <td>
                                                    <input type="text" class="amrpop form-control updateElement" placeholder="Note" name="sexualnote" 
                                                           data-colName="sexualnote" data-id="{$myallphsexual->id}" data-tableName="phsexual"
                                                           value="{$myallphsexual->sexualnote}"/>
                                                </td>
                                                <td class="wds5">
                                                    <a class="btn grey-cascade btn-xs deletemsgEX2" data-id="{$myallphsexual->id}" 
                                                       data-link="{$controllname}"  data-fn="del" data-tableName="phsexual" 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>
