

<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-8">
                            {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>

                    <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    required="required"  type="text" name="studentnumber" 
                            class="form-control checkcolumn nummbers" placeholder="رقم المتدرب"  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"   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" 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    required="required"    type="text" name="parentsphone" id="parentsphone" 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    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>

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


                   {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}




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




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


