<div class="modal-dialog  modal-lg wds95">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
            <h4 class="modal-title">  </h4>
        </div>
        <div class="modal-body">
            <div class="portlet-body form">
                <form class="form-horizontal" role="form" action="" method="post" id="phform" enctype="multipart/form-data">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="portlet blue-hoki box">
                                <div class="portlet-title">
                                    <div class="caption"> Infertility  </div>
                                </div>
                                <div class="portlet-body">

                                    <div class="form-body">
                                        <div class="row">

                                            <table class="table table-striped table-hover table-bordered">
                                                <tbody>
                                                    <tr>
                                                        <th>
                                                            Note
                                                        </th>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" id="Note" data-colName="note" 
                                                                   data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->note}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>

                                            <table class="table table-striped table-hover table-bordered">
                                                <tbody id="planTable">
                                                    {assign var=i value=1}
                                                    {foreach $plans  as $plan }
                                                    <tr>
                                                        <th>
                                                            Plan {$i}
                                                        </th>
                                                        <td>
                                                            <input type="text" class="form-control updateElement " id="plan{$i}" data-colName="plan" 
                                                                   data-id="{$plan->id}"  data-tableName="gynainfertilityplan"  
                                                                   value="{$plan->plan}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>
                                                        <td>
                                                            {if $i == 1}
                                                            <span class="input-group-btn btn-right">
                                                                <button class="btn green-haze" type="button" id="addPlan" style="padding: 5px;"><i class="fa fa-plus"></i></button>
                                                            </span>
                                                            {else}
                                                            <span class="input-group-btn btn-right">
                                                                <button class="btn red-intense deleteelement " type="button"  data-id="{$plan->id}" data-link="gyna"  data-fun="deldata" data-tableName="gynainfertilityplan" style="padding: 5px;"><i class="fa fa-close"></i></button>
                                                            </span>

                                                            {/if}
                                                        </td>
                                                    </tr>
                                                    {capture assign=i}{$i+1}{/capture}
                                                    {/foreach}
                                                </tbody>
                                            </table>

                                            <input type="hidden" id="planItr" value="{$planItr}"/>

                                            <table class="table table-striped table-hover table-bordered">
                                                <tbody>
                                                    <tr>
                                                        <th>
                                                            Date
                                                        </th>
                                                        <td class="wds10">
                                                            <input type="text" class="form-control updateElement datepicker" id="date" data-colName="date" 
                                                                   data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->date}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>
                                                        <th>
                                                            Type
                                                        </th>
                                                        <td class="wds40">
                                                            <select class="form-control  updateElement editModelSel  type"data-colName="type" 
                                                                    data-id="{$infertility->id}"  data-tableName="gynainfertility"    id="type">
                                                                <option value=""></option>
                                                                {foreach $types as $data}
                                                                <option value="{$data->id}" {if $infertility->type eq  $data->id}selected{/if}>{$data->name}</option>
                                                                {/foreach}
                                                                <option value="0" class="deleteoptincompo">حذف</option>
                                                            </select>
                                                        </td>
                                                        <th>
                                                            Since
                                                        </th>
                                                        <td>
                                                            <div class="input-group">
                                                                <span class="input-group-addon">      Y   </span>
                                                                <input type="text" class="form-control updateElement" id="since_y" data-colName="since_y" 
                                                                       data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->since_y}">
                                                                <div class="form-control-focus">
                                                                </div>

                                                                <span class="input-group-addon">      M   </span>
                                                                <input type="text" class="form-control updateElement" id="since_m" data-colName="since_m" 
                                                                       data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->since_m}">
                                                                <div class="form-control-focus">
                                                                </div>
                                                            </div>
                                                        </td>
                                                        <th class="wds7" >
                                                            Total Stay
                                                        </th>
                                                        <td>
                                                            <div class="input-group">
                                                                <span class="input-group-addon">      Y   </span>
                                                                <input type="text" class="form-control updateElement" id="stay_y" data-colName="stay_y" 
                                                                       data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->stay_y}">
                                                                <div class="form-control-focus">
                                                                </div>

                                                                <span class="input-group-addon">      M   </span>
                                                                <input type="text" class="form-control updateElement" id="stay_m" data-colName="stay_m" 
                                                                       data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->stay_m}">
                                                                <div class="form-control-focus">
                                                                </div>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>

                                            <table class="table table-striped table-hover table-bordered">
                                                <tbody>
                                                    <tr>
                                                        <th>
                                                            Husband Stay
                                                        </th>
                                                        <td class="wds60">
                                                            <input type="text" class="form-control updateElement" id="stay_hus" data-colName="stay_hus" 
                                                                   data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->stay_hus}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>
                                                        <th class="wds7" >
                                                            Abortion 
                                                        </th>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" id="abortion" data-colName="abortion" 
                                                                   data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->abortion}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>

                                            <table class="table table-striped table-hover table-bordered">
                                                <tbody>
                                                    <tr>


                                                        <th>
                                                            Semen
                                                        </th>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" id="semen" data-colName="semen" 
                                                                   data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->semen}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>

                                                        <th>
                                                            FSH
                                                        </th>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" id="fsh" data-colName="fsh" 
                                                                   data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->fsh}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>

                                                        <th>
                                                            LH
                                                        </th>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" id="lh" data-colName="lh" 
                                                                   data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->lh}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>

                                                        <th>
                                                            TSH
                                                        </th>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" id="tsh" data-colName="tsh" 
                                                                   data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->tsh}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>

                                            <table class="table table-striped table-hover table-bordered">
                                                <tbody>
                                                    <tr>
                                                        <th>
                                                            Prl
                                                        </th>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" id="prl" data-colName="prl" 
                                                                   data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->prl}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>
                                                        <th>
                                                            AMH
                                                        </th>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" id="amh" data-colName="amh" 
                                                                   data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->amh}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>
                                                        <th class="wds7" >
                                                            HSG
                                                        </th>
                                                        <td>
                                                            <input type="text" class="form-control updateElement" id="hsg" data-colName="hsg" 
                                                                   data-id="{$infertility->id}"  data-tableName="gynainfertility" value="{$infertility->hsg}">
                                                            <div class="form-control-focus">
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>

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

        <div class="modal-footer">

            <button type="button" class="btn default" id="closemodel" data-dismiss="modal"> Close</button>

        </div>

    </div>
</div>
