<div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false"  id="edit_model">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"> Edit </h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body form">
                    <form  method="post" class="form-horizontal  emptyform" >
                        <div class="form-body all" >
                            <!------===========================================------->
                            <div class="form-group">
                                <div class="col-md-12">
                                    <button type="button" class="btn btn-xs blue fright" id="addnewPeriod"> 
                                        <i class="fa fa-plus"></i> Add</button>
                                </div>
                                <div class="col-md-12">
                                    <table cellspacing="10" width="100%" class="rtl" >
                                        <thead>
                                            <tr>
                                                <th class="wds35 txtc">اسم الفترة</th>
                                                <th class="wds40 txtc">التوقيت </th>
                                                <th class="wds15 txtc">الحد الأقصى</th>
                                                <th class="wds10"></th>
                                            </tr>
                                        </thead>
                                        <tbody id="editTableP">
                                            {assign var=i value=1}
                                            {foreach $alldata as $mydata}
                                            <tr>
                                                <td>
                                                    <input type="text" class="form-control newitemP" 
                                                           data-id="{$mydata.id}"  data-tableName="visit_periods"
                                                           data-colName="name"   value='{$mydata.name}'>
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control newitemP" 
                                                           data-id="{$mydata.id}"  data-tableName="visit_periods"
                                                           data-colName="timing"   value='{$mydata.timing}'>
                                                </td>
                                                <td>
                                                    <input type="text" class="form-control newitemP positiveNo" 
                                                           data-id="{$mydata.id}"  data-tableName="visit_periods"
                                                           data-colName="max_no"   value='{$mydata.max_no}'>
                                                </td>
                                                <td>
                                                    <a href="#" class="btn btn-xs red fleft deleteModalP wds100" 
                                                       data-id="{$mydata.id}"   data-tableName="visit_periods"  >
                                                        <i class="fa fa-times" ></i>
                                                    </a>
                                                </td>
                                            </tr>

                                            {capture assign=i}{$i+1}{/capture}
                                            {/foreach}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" id="amountcloseinput"   class="btn default" data-dismiss="modal">Close</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
    </div>
</div>


{literal}
<script>
    $(".positiveNo").forcepositiveNum();

</script>
{/literal}

