<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="false" data-backdrop="static" data-keyboard="false" 
     id="firstVisitsModel" style="min-width:1000px;">
    <div class="modal-dialog  modal-lg wds90">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close closeDrug" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title txtc"> From : {$fromDate}  -  To :  {$toDate}  </h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body form">
                    <form class="form-horizontal" role="form" action="" method="post" id="gynaDrugs" enctype="multipart/form-data">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="portlet blue-hoki box">
                                    <input type="hidden" id="controllName" value="adddevices"/>
                                    <div class="portlet-body  scroll_y showNum isheight" style="padding: 25px 7px 0  7px;">
                                        <table class="table table-striped table-hover table-bordered"  id="firstTable"
                                               style="direction: rtl;">
                                            <thead>
                                                <tr>
                                                    <th>م</th>
                                                    <th> اسم الحالة  </th>
                                                    {if $programesetting->system_lang  == 1}   <th> اسم الزوج   </th> {/if}
                                                    <th>التليفون </th>  
                                                    <th class="wds10">تاريخ الحجز  </th>
                                                    <th> وسيلة المعرفة بالمركز      </th>
                                                    <th>طبيب الزيارة      </th>
                                                    <th>  تاريخ المكالمة     </th>
                                                    <th>  الحضور أو سبب التأجيل     </th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                {assign var=i value=1}
                                                {foreach $firstVisits as $row}
                                                <tr  {if $row.customer_add == 1} style="background-color: #eec5c0;"   {/if}>
                                                    <td> {$i}</td>
                                                    <td> {$row.wifename}</td>
                                                    {if $programesetting->system_lang  == 1}   <td> {$row.husdandname}</td> {/if}
                                                    <td>{$row.phone}   </td>
                                                    <td> {$row.visitdate}  </td>
                                                    <td> {$row.knownFrom}</td>
                                                    <td>{$row.visitDrName}</td>
                                                    <td>{$row.entryDate}</td>
                                                    <td>
                                                        <input type="text" class="form-control updateElement"   data-id="{$row.id}"
                                                               data-colName="attend_deley"  data-tableName="visits"    
                                                               value="{$row.attend_deley}"  /> 
                                                    </td>
                                                </tr>
                                                {capture assign=i}{$i+1}{/capture}
                                                {/foreach}
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn default" id="closemodel" data-dismiss="modal"> Close</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>


{literal}
<script type="text/javascript" >
    $('#firstTable').dataTable({
        "pageLength": 15,
        "lengthMenu": [
            [15, 25, 50, 100, 150, -1],
            [15, 25, 50, 100, 150, "All"] // change per page values here
        ]
    });


</script>
{/literal}