

<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">نظام المتدربين</a></li>
            <li><a href="studentController.php?do=show">عرض المتدربين</a></li>
             {if $studentdata->del lt 2}
            <li class="active">تعديل  </li> 
            {else}
            <li class="active">تفاصيل  </li> 
            {/if}
        </ol>
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                  {if $studentdata->del lt 2}
                <h3 class="panel-title">تعديل  </h3>
                 {else}
            <h3 class="panel-title">تفاصيل  </h3> 
            {/if}
            </div>
            <div class="panel-body">


                {literal}
               <form class="form-horizontal"  action="studentController.php"  id="studentformajax" method="post"  enctype="multipart/form-data" data-dosave="?do=savedata">

                    {/literal}
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">صوره  المتدرب</label>
                        <div class="col-lg-2">
                            {if $studentdata->studentimage !="." && $studentdata->studentimage}
                            <img src="../views/default/images/students/{$studentdata->studentimage}"  style="width: 140px;height: 100px;border: 3px solid;border-radius: 6px;">
                            {else}
                            <img src="../views/default/assets/img/blank.png"  style="width: 140px;height: 100px;border: 3px solid;border-radius: 6px;" alt="" class="card-img">
                            {/if}
                            <input type="hidden" name="oldstudentimage" id="oldstudentimage"  value="{$studentdata->studentimage}" />
                             {if $studentdata->del lt 2}
                            <input type="file" name="studentimage" id="studentimage"/>
                            {/if}
                        </div>
                        <div class="col-lg-2">
                            <a href="../views/default/images/studentsparcode/{$studentdata->id}student.png" download> 
                            <img src="../views/default/images/studentsparcode/{$studentdata->id}student.png"  style="width: 160px;height: 120px;"></a>
                            
                            
                        </div>
                    </div>

                    <div class="form-group"  >
                        <label  class="col-lg-2 control-label">الفروع </label>
                        <div class="col-lg-4">
                            <select name="branchid"   data-placeholder="اختر " class="selectnew">
                                <option value="" ></option>
                               {foreach $branchs as $single}
                                <option value="{$single.branchId}" {if $studentdata->branchid eq $single.branchId} selected="" {/if}>{$single.branchName} / {$single.phone}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">اسم  المتدرب</label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="studentname" class="form-control checkcolumn"  placeholder="اسم المتدرب"  
                            data-table="students" data-tablecol="studentname" data-tableid="{$studentdata->id}" data-parentid="" data-parentcol="" value="{$studentdata->studentname}" />
                            
                        </div>
                    </div>
                    
                    
                    
                       <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">اسم الشهره </label>
                        <div class="col-lg-4">
                            <input      type="text" name="nickname" 
                            class="form-control "  placeholder="اسم الشهره "  
                            data-table="students" data-tablecol="" data-tableid="" value="{$studentdata->nickname}" 
                            data-parentid="" data-parentcol="" />
                            
                        </div>
                    </div>
                    
                    
                       <div class="form-group">
                                <label class="col-lg-2 control-label">النوع</label>
                                <div class="col-lg-4">
                                    <div class="radio-inline">
                                        <label>
                                            <input value="0"  name="gender"  {if $studentdata->gender  eq 0}  checked="checked" {/if}   checked="checked"   type="radio" />

                                            ولد </label>
                                    </div>
                                    <div class="radio-inline">
                                        <label>
                                            <input value="1" name="gender" {if $studentdata->gender  eq 1}  checked="checked" {/if}  type="radio" />
                                          بنت</label>
                                    </div>

                                </div>
                            </div>
                            
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> الجنسيه </label>
                        <div class="col-lg-4">
                            <input       type="text" name="nationality" 
                            class="form-control "  placeholder="الجنسيه"  
                            data-table="students" data-tablecol="" data-tableid="" value="{$studentdata->nationality}" 
                            data-parentid="" data-parentcol="" />
                            
                        </div>
                    </div>      
                    
                    
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">محل الميلاد  </label>
                        <div class="col-lg-4">
                            <input     type="text" name="placebirth" 
                            class="form-control "  placeholder="محل الميلاد"  
                            data-table="students" data-tablecol="" data-tableid="" value="{$studentdata->placebirth}" 
                            data-parentid="" data-parentcol="" />
                            
                        </div>
                    </div>   
                    
                    
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">اسم المدرسه   </label>
                        <div class="col-lg-4">
                            <input      type="text" name="schoolname" 
                            class="form-control "  placeholder="اسم المدرسه "  
                            data-table="students" data-tablecol="" data-tableid="" value="{$studentdata->schoolname}" 
                            data-parentid="" data-parentcol="" />
                            
                        </div>
                    </div>      
                    
                    
                    
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">الفصل الدرسى   </label>
                        <div class="col-lg-4">
                            <input        type="text" name="classroom" 
                            class="form-control "  placeholder=" الفصل الدرسى "  
                            data-table="students" data-tablecol="" data-tableid="" value="{$studentdata->classroom}" 
                            data-parentid="" data-parentcol="" />
                            
                        </div>
                    </div>      
                    
                    
                    
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">النادى المفضل للاعب    </label>
                        <div class="col-lg-4">
                            <input   type="text" name="playerfavoriteclub" 
                            class="form-control "  placeholder="النادى المفضل للاعب  "  
                            data-table="students" data-tablecol="" data-tableid="" value="{$studentdata->playerfavoriteclub}" 
                            data-parentid="" data-parentcol="" />
                            
                        </div>
                    </div>      
                    
                    
                    
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">اللاعب المفضل للاعب     </label>
                        <div class="col-lg-4">
                            <input     type="text" name="playerfavoriteplayer" 
                            class="form-control "  placeholder="اللاعب المفضل للاعب   "  value="{$studentdata->playerfavoriteplayer}" 
                            data-table="students" data-tablecol="" data-tableid=""
                            data-parentid="" data-parentcol="" />
                            
                        </div>
                    </div>     
                    
                    
                    <div class="form-group">
                        <label class="col-lg-2 control-label">هل مارس اللاعب كرة القدم من قبل</label>
                        <div class="col-lg-4">
                            <div class="radio-inline">
                                <label>
                                    <input value="0"  name="playedsoccer"   {if $studentdata->playedsoccer  eq 0}  checked="checked" {/if}   type="radio" />

                                    نعم </label>
                            </div>
                            <div class="radio-inline">
                                <label>
                                    <input value="1" name="playedsoccer" {if $studentdata->playedsoccer  eq 1}  checked="checked" {/if}  type="radio" />
                                  لا</label>
                            </div>

                        </div>
                    </div>
                            
                    
                    
                    
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">اسم النادى او الاكاديميه التى مارس فيها    </label>
                        <div class="col-lg-4">
                            <input      type="text" name="clubacademy" 
                            class="form-control "  placeholder="اسم النادى او الاكاديميه التى مارس فيها  "  
                            data-table="students" data-tablecol="" data-tableid="" value="{$studentdata->clubacademy}" 
                            data-parentid="" data-parentcol="" />
                            
                        </div>
                    </div>      
                    
                    
                    
                    
                    
                    
                    
                     
                          
                            
                    <!--<div class="form-group">-->
                    <!--    <label for="txtName" class="col-lg-2 control-label">رقم  المتدرب</label>-->
                    <!--    <div class="col-lg-4">-->
                    <!--        <input    required="required"  type="text" name="studentnumber" -->
                    <!--        class="form-control checkcolumn nummbers" placeholder="رقم المتدرب"  digits="true"   data-table="students"  data-tablecol="studentnumber" data-tableid="{$studentdata->id}" data-parentid="" data-parentcol="" value="{$studentdata->studentnumber}" />-->
                            
                    <!--    </div>-->
                    <!--</div>-->
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">الرقم التعريفى</label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="idnumber"     digits="true" class="form-control checkcolumn nummbers" placeholder="الرقم التعريفى"  data-table="students" data-tablecol="idnumber" data-tableid="{$studentdata->id}" data-parentid="" data-parentcol="" value="{$studentdata->idnumber}" />
                            
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">رقم تليفون المتدرب    </label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="studentphone"    digits="true"  class="form-control checkcolumn nummbers" placeholder="رقم تليفون المتدرب  "  data-table="students" data-tablecol="studentphone" data-tableid="{$studentdata->id}" data-parentid="" data-parentcol="" value="{$studentdata->studentphone}" />
                            
                        </div>
                    </div>
                    
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">   اسم ولى الامر </label>
                        <div class="col-lg-4">
                            <input  type="text" name="parentsname"     id="parentsname" class="form-control" placeholder=" اسم ولى الامر " value="{$studentdata->parentsname}" />
                        </div>
                    </div>
                    
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> وظيفة ولى الامر </label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="parentsjob"     id="parentsjob" class="form-control" placeholder="  وظيفة ولى الامر   " value="{$studentdata->parentsjob}" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">رقم تليفون ولى الامر </label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="parentsphone" id="parentsphone"   digits="true"  class="form-control nummbers" placeholder="رقم تليفون ولى الامر  " value="{$studentdata->parentsphone}" />
                            
                        </div>
                    </div>
                    
                      <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">    اسم الام  </label>
                        <div class="col-lg-4">
                            <input  type="text" name="parentsname2"     id="parentsname2" class="form-control" placeholder=" اسم  الام   " value="{$studentdata->parentsname2}" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">   وظيفة  الام </label>
                        <div class="col-lg-4">
                            <input       type="text" name="parentsjob2"     id="parentsjob2" class="form-control" placeholder=" وظيفة الام    " value="{$studentdata->parentsjob2}" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">رقم تليفون الام  </label>
                        <div class="col-lg-4">
                            <input       type="text" name="parentsphone2"   digits="true"  id="parentsphone" class="form-control nummbers" placeholder="رقم تليفون الام   " value="{$studentdata->parentsphone2}" />
                        </div>
                    </div>
                    
                    
                    
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">تاريخ الميلاد  </label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="datebirth" id="datebirth" class="form-control" placeholder="تاريخ الميلاد  " value="{$studentdata->datebirth}" />
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> العنوان</label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="studentaddress"  class="form-control" placeholder="العنوان " value="{$studentdata->studentaddress}" />
                            
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">ملاحظه</label>
                        <div class="col-lg-4">
                             <textarea  class="form-control" name="studentnote" rows="2"  placeholder="ملاحظه">{$studentdata->studentnote}</textarea>
                        </div>
                    </div>
                    
                     <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> نوع الدفع   </label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="namepay" id="namepay" class="form-control" placeholder=" نوع الدفع   "    value="{$studentdata->namepay}" />
                        </div>
                    </div>
                    
                       <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> قيمة الدفع    </label>
                        <div class="col-lg-4">
                            <input    required="required"     value="{$studentdata->payvalnew}" type="text" name="payvalnew" digits="true"  class="form-control nummbers" placeholder=" قيمة الدفع     " />  
                        </div>
                    </div>
                    
                    
                    
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">تعليق الدفع</label>
                        <div class="col-lg-4">
                             <textarea  class="form-control" name="commentpay" rows="2"  placeholder="تعليق الدفع">{$studentdata->commentpay}</textarea>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-lg-2 control-label">  </label>
                        <div class="col-lg-4">
                            <div class="radio-inline">
                                <label>
                                    <input value="1"  name="stopping"   {if $studentdata->stopping  eq 1}  checked="checked" {/if}   type="radio" />

                                    نعم </label>
                            </div>
                            <div class="radio-inline">
                                <label>
                                    <input value="0" name="stopping" {if $studentdata->stopping  eq 0}  checked="checked" {/if}  type="radio" />
                                  لا</label>
                            </div>

                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">تعليق الايقاف</label>
                        <div class="col-lg-4">
                             <textarea  class="form-control" name="stopcomment" rows="2"  placeholder="تعليق الايقاف">{$studentdata->stopcomment}</textarea>
                        </div>
                    </div>

                    <input type="hidden" name="studentid" value="{$studentdata->id}" />
                    <input type="hidden" name="clientid" value="{$studentdata->clientid}" />
                    {if $studentdata->del neq 5}
                    <input type="hidden" class="deldata" value="{$studentdata->del}" />
                    {/if}


                   {if $studentdata->del lt 2}
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                             <button type="button" class="btn btn-primary pull-left studentformajax" >تعديل الامر</button>
                        </div>
                    </div>
                    {/if}
                    
                    {if $studentdata->del eq 5}
                    <input type="hidden" name="agrees" value="5" />
                      <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                             <button type="button" class="btn btn-primary pull-left studentformajax" > اعتماد المتدرب</button>
                        </div>
                    </div>
                    {/if}
                    
                    




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




    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
    deldata();
     });
</script>


