<!--BEGIN CONTENT -->
<script src="{$path}/_assets/global/plugins/jquery.min.js" type="text/javascript"></script>

<div class="page-content-wrapper">
    <div class="page-content">
        <!-- BEGIN PAGE HEADER-->
        <h3 class="page-name">
            {$shcontrollname}
        </h3>
        <div class="page-bar">
            <ul class="page-breadcrumb">
                {$breadcrumbs}
            </ul>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12">
                <div class="portlet light bg-inverse">
                    <div class="portlet-name">
                        <div class="caption">
                            <i class="icon-equalizer font-red-sunglo"></i>
                            <span class="caption-subject font-red-sunglo bold uppercase">{$shcontrollname}</span>
                        </div>
                    </div>
                    <div class="portlet-body form">
                        <!-- BEGIN FORM-->
                        <form action="{$hosturl}/{$controllname}/updateit" method="post" class="form-horizontal editForm" id="subjects_form" data-link="{$controllname}" enctype="multipart/form-data">
                            <div class="form-body">
                                <div class="alert alert-danger display-hide">
                                    <button class="close" data-close="alert"></button>
                                    لديك خطأ في إدخال البيانات, حاول مرة أخرى.
                                </div>
                                <div class="alert alert-success display-hide">
                                    <button class="close" data-close="alert"></button>
                                    لقد أدخلت بيانات صحيحة.
                                </div>
                                <div class="form-group">
                                    <div class=" col-md-6">
                                        <div class="row">
                                            <table class="table table-bordered table-advance table-responsive">
                                                <thead>
                                                    <tr>
                                                        <th>الترتيب</th>
                                                        <th>الفريق</th>
                                                        <th>عدد النقط</th>
                                                        <th>فوز</th>
                                                        <th>خسارة</th>
                                                        <th>تعادل</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    {if empty($point_table)}
                                                    {for $i=1 to 20}
                                                        <tr>
                                                            <td>
                                                                <input type="text" name="order{$i}" value="{$i}" min="1" max="20"/>
                                                                <input type="hidden" name="new" value="1"/>
                                                            </td>
                                                            <td><input type="text" name="team{$i}"/></td>
                                                            <td><input type="text" name="points{$i}"/></td>
                                                            <td><input type="text" name="win{$i}"/></td>
                                                            <td><input type="text" name="loss{$i}"/></td>
                                                            <td><input type="text" name="even{$i}"/></td>
                                                        </tr>
                                                    {/for}
                                                    {else}
                                                    {foreach $point_table as $point name=smartyloop}
                                                    {assign var="c" value=$smarty.foreach.smartyloop.iteration}
                                                        <tr>
                                                            <td>
                                                                <input type="text" name="order{$c}" value="{$point->porder}" min="1" max="20"/>
                                                                <input type="hidden" name="id{$c}" value="{$point->id}"/>
                                                            </td>
                                                            <td><input type="text" name="team{$c}" value="{$point->team}"/></td>
                                                            <td><input type="text" name="points{$c}" value="{$point->points}"/></td>
                                                            <td><input type="text" name="win{$c}" value="{$point->win}"/></td>
                                                            <td><input type="text" name="loss{$c}" value="{$point->loss}"/></td>
                                                            <td><input type="text" name="even{$c}" value="{$point->even}"/></td>
                                                        </tr>
                                                    {/foreach}
                                                    {/if}
                                                </tbody>
                                            </table>
                                        </div>

                                    </div>

                                </div>
                            </div>
                            <div class="form-actions">
                                <div class="row">
                                    <div class="col-md-offset-3 col-md-4">
                                        <button type="submit" class="btn green">حفظ</button>
                                        <button type="button" class="btn default rtnshow" data-controll="{$controllname}">إلغاء</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <!-- END FORM-->
                    </div>
                </div>
            </div>
        </div>
        <!-- END PAGE CONTENT-->
    </div>
</div>
<!-- END CONTENT-->
<script src="{$path}/_assets/custom/image_validation.js"></script>