<!--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 class="actions">
                            <a class="btn default btn-xs blue tooltips" href="{$hosturl}/{$controllname}/show" data-container="body" data-placement="top" data-original-name="Show">
                                <i class="icon-list"></i>
                                عرض البيانات
                            </a>
                        </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">
                                    <label class="col-sm-2 control-label" style="text-align: right">النوع </label>
                                    <div class="col-sm-2">

                                        <label>
                                            <input type="radio" name="type" value="0" id="actType" {if $team->type eq 0}checked {/if}>نشاط
                                        </label>

                                    </div>

                                    <div class="col-sm-2">

                                        <label>
                                            <input type="radio" name="type" id="teamType" value="1" {if $team->type eq 1}checked {/if}>فرق
                                        </label>
                                    </div>
                                </div>

                                <div class="form-group" id="activityDiv" {if $team->type eq 0}style="display: none;"{/if}>
                                    <label class="col-md-2 control-label" style="text-align: right">النشاط </label>
                                    <div class="col-md-4">
                                        <select name="activity" id="activity" class="form-control" required>
                                            {foreach $allActivity as $activity}
                                            <option value="{$activity->id}" {if $activity->id eq $team->activity}selected{/if}>{$activity->name} / {$activity->name_en} </option>
                                            {/foreach}
                                        </select>
                                    </div>

                                </div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label" style="text-align: right">الاسم بالعربي</label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" placeholder="الاسم بالعربي" name="name" id="name" maxlength="50" minlength="2" required data-edit="{$team->name}" value="{$team->name}">
                                    </div>
                                    <span class="help-block help-block-error" id="showerrorname" style="color: #F3565D"></span>
                                    <label class="col-md-2 control-label" style="text-align: right">الاسم الإنجليزي </label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" placeholder="الاسم الإنجليزي" name="name_en" id="name_en" minlength="2" required data-edit="{$team->name_en}" value="{$team->name_en}">
                                    </div>
                                    <span class="help-block help-block-error" id="showerrorname" style="color: #F3565D"></span>

                                </div>

                                <input type="hidden" id="id" name="id" value="{$team->id}" />
                            </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>