<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">شئون العاملين</a></li>
            <li><a href="employees.php?do=show">الموظفين</a></li>
            <li class="active">تعديل</li>
        </ol>
        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">تعديل</h3>
            </div>
            <div class="panel-body"> {literal}
                <form class="nameToBeChecked form-horizontal" role="form" action="employees.php?do=update"
                      method="post" enctype="multipart/form-data" id="spform">
                    {/literal}
                    <!-- =================================================   -->
                 
                    <div class="col-lg-6">
                        <div class="form-group">
                            <label class="col-lg-4 control-label">الاسم</label>
                            <div class="col-lg-8">
                                <span id="sprytextfield1">
                                    <input name="empName" type="text" class="form-control" value="{$showData->name}" />
                                    <span class="textfieldRequiredMsg">من فضلك اختر الاسم</span></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label">الكود</label>
                            <div class="col-lg-8">
                                <span id="sprytextfield2">
                                    <input name="empCode" type="text" class="form-control positiveNo" value="{$showData->code}"  />
                                    <span class="textfieldRequiredMsg">من فضلك ادخل الكود</span></span>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label class="col-lg-4 control-label">بصمة الموظف</label>
                            <div class="col-lg-8">
                                <!--<span id="employeesubgroupidsp">-->
                                <input type="text" name="empFingerId" id="empFingerId" class="form-control positiveNo"
                                       value="{$showData->finger}"  />
                                <!--<span class="textfieldRequiredMsg">*</span></span>-->
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label">المرتب </label>
                            <div class="col-lg-8">
                                
                                <input type="number" name="salary" id="salary" class="form-control positiveNo"
                                      value="{$showData->salary}"  />
                                
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-4 control-label">كارت RFID الموظف</label>
                            <div class="col-lg-8">
                                <!--<span id="employeesubgroupidsp">-->
                                <input type="text" name="empRFID" id="empRFID" class="form-control positiveNo"
                                      value="{$showData->rfid}"  />
                                <!--<span class="textfieldRequiredMsg">*</span></span>-->
                            </div>
                        </div>

                        
                        <div class="form-group">
                            <label class="col-lg-4 control-label">تاريخ الميلاد </label>
                            <div class="col-lg-8">
                                <input name="empDOF" id="empDOF" class="form-control awdatepicker" autocomplete="off"
                                       data-date-format="yyyy-mm-dd" type="text" value="{$showData->birth}"  />
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-lg-4 control-label"> الجنسية </label>
                            <div class="col-lg-8">
                                <input name="nationality" type="text" class="form-control" value="{$showData->nationality}"  />
                            </div>
                        </div>
                        
                         <div class="form-group">
                            <label class="col-lg-4 control-label"> الديانة </label>
                            <div class="col-lg-8">
                                <input name="religion" type="text" class="form-control" value="{$showData->religion}"   />
                            </div>
                        </div>

                         
                        <div class="form-group">
                            <label class="col-lg-4 control-label">رقم الجوال </label>
                            <div class="col-lg-8">
                                <input name="empTel" type="text" class="form-control" value="{$showData->phone}"  />
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-lg-4 control-label"> العنوان </label>
                            <div class="col-lg-8">
                                <input name="empAddress" type="text" class="form-control" value="{$showData->address}" />
                            </div>
                        </div>

                        

                        <div class="form-group">
                            <label class="col-lg-4 control-label"> الإدارة </label>
                            <div class="col-lg-8">
                                <span id="sprytextfield1">
                                    <input name="administration" type="text" class="form-control" value="{$showData->administration}"  />
                                    <span class="textfieldRequiredMsg"></span></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label">الإدارة الفرعية </label>
                            <div class="col-lg-8">
                                <span id="sprytextfield1">
                                    <input name="subManagement" type="text" class="form-control" value="{$showData->submanagement}"  />
                                    <span class="textfieldRequiredMsg"></span></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label"> اسم المدير المباِشر </label>
                            <div class="col-lg-8">
                                <span id="sprytextfield1">
                                    <input name="directManager" type="text" class="form-control" value="{$showData->directmanager}" />
                                    <span class="textfieldRequiredMsg"></span></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label"> الوظيفة</label>
                            <div class="col-lg-8">
                                <span id="sprytextfield1">
                                    <input name="occupation" type="text" class="form-control"  value="{$showData->occupation}" />
                                    <span class="textfieldRequiredMsg"></span></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label"> تاريخ التعين </label>
                            <div class="col-lg-8">
                                <span id="sprytextfield1">
                                    <input name="dateBeing" id="dateBeing" class="form-control awdatepicker"
                                           autocomplete="off" data-date-format="yyyy-mm-dd" type="text" value="{$showData->datebeing}" />
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-lg-4 control-label">النوع</label>
                            <div class="col-lg-8">
                                <div class="radio-inline">
                                    <label>
                                        <input value="0" name="gender" type="radio" checked="checked" {if $showData->gender == 0}checked{/if} />

                                        ذكر </label>
                                </div>
                                <div class="radio-inline">
                                    <label>
                                        <input value="1" name="gender" type="radio" {if $showData->gender == 1}checked{/if} />
                                        انثى </label>
                                </div>

                            </div>
                        </div>



                        <div class="form-group">
                            <label class="col-lg-4 control-label"> الحالة الاجتماعية</label>
                            <div class="col-lg-8">
                                <span id="sprytextfield1">
                                    <input name="socialSituation" type="text" class="form-control" value="{$showData->socialsituation}" />
                                    <span class="textfieldRequiredMsg"></span></span>
                            </div>
                        </div>



                    



                        <div class="form-group">
                            <label class="col-lg-4 control-label"> رقم حساب البنك </label>
                            <div class="col-lg-8">
                                <span id="sprytextfield1">
                                    <input name="bankAccount" type="text" class="form-control" value="{$showData->bankaccount}" />
                                    <span class="textfieldRequiredMsg"></span></span>
                            </div>
                        </div>






                    <!--==============================-->
                   
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة التعاقد</label>
                            <div class="col-lg-4">
                                {if $showData->contract != "" && $showData->contract != "no image"}
                                    <img src="../upload/employees/{$showData->contract}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="contract" id="contract"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldcontract" value="{$showData->contract}" />
                            </div>
                        </div>
                        
                         <!--==============================-->
                   
                       
                   
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة شخصية</label>
                            <div class="col-lg-4">
                                {if $showData->personalphoto != "" && $showData->personalphoto != "no image"}
                                    <img src="../upload/employees/{$showData->personalphoto}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="personalPhoto" id="personalPhoto"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldpersonalPhoto" value="{$showData->personalphoto}" />
                            </div>
                        </div>
                        
                       
                        
                   
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة الكارت الصحى</label>
                            <div class="col-lg-4">
                                {if $showData->healthcard != "" && $showData->healthcard != "no image"}
                                    <img src="../upload/employees/{$showData->healthcard}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="healthCard" id="healthCard"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldhealthCard" value="{$showData->healthcard}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->
                       
                        <div class="form-group">
                            <label class="col-lg-2 control-label">شهادة تخرج</label>
                            <div class="col-lg-4">
                                {if $showData->graduate != "" && $showData->graduate != "no image"}
                                    <img src="../upload/employees/{$showData->graduate}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="graduate" id="graduate"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldgraduate" value="{$showData->graduate}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->
                        <div class="form-group">
                            <label class="col-lg-2 control-label">شهادة خبرة</label>
                            <div class="col-lg-4">
                                {if $showData->expert != "" && $showData->expert != "no image"}
                                    <img src="../upload/employees/{$showData->expert}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="expert" id="expert"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldexpert" value="{$showData->expert}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->
                       
                         <!--==============================-->
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة شهادة الميلاد</label>
                            <div class="col-lg-4">
                                {if $showData->birthcertificate != "" && $showData->birthcertificate != "no image"}
                                    <img src="../upload/employees/{$showData->birthcertificate}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="birthCertificate" id="birthCertificate"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldbirthCertificate" value="{$showData->birthcertificate}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة شهادة الجيش</label>
                            <div class="col-lg-4">
                                {if $showData->armyphoto != "" && $showData->armyphoto != "no image"}
                                    <img src="../upload/employees/{$showData->armyphoto}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="armyPhoto" id="armyPhoto"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldarmyPhoto" value="{$showData->armyphoto}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->
                     
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة البطاقة الشخصية</label>
                            <div class="col-lg-4">
                                {if $showData->idcard != "" && $showData->idcard != "no image"}
                                    <img src="../upload/employees/{$showData->idcard}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="idCard" id="idCard"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldidCard" value="{$showData->idcard}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة رخصة القيادة</label>
                            <div class="col-lg-4">
                                {if $showData->driverlicense != "" && $showData->driverlicense != "no image"}
                                    <img src="../upload/employees/{$showData->driverlicense}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="driverLicense" id="driverLicense"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="olddriverLicense" value="{$showData->driverlicense}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة اقرار استلام العمل</label>
                            <div class="col-lg-4">
                                {if $showData->endorsementpeace != "" && $showData->endorsementpeace != "no image"}
                                    <img src="../upload/employees/{$showData->endorsementpeace}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="endorsementPeace" id="endorsementPeace"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldendorsementPeace" value="{$showData->endorsementpeace}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة اقرار الحفاظ على سريةالعمل</label>
                            <div class="col-lg-4">
                                {if $showData->confidentiality != "" && $showData->confidentiality != "no image"}
                                    <img src="../upload/employees/{$showData->confidentiality}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="confidentiality" id="confidentiality"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldconfidentiality" value="{$showData->confidentiality}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة القيش الجنائي</label>
                            <div class="col-lg-4">
                                {if $showData->criminalcamouflage != "" && $showData->criminalcamouflage != "no image"}
                                    <img src="../upload/employees/{$showData->criminalcamouflage}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="criminalCamouflage" id="criminalCamouflage"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldcriminalCamouflage" value="{$showData->criminalcamouflage}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة رخصة مزاولة المهنة</label>
                            <div class="col-lg-4">
                                {if $showData->practiceprofession != "" && $showData->practiceprofession != "no image"}
                                    <img src="../upload/employees/{$showData->practiceprofession}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="practiceProfession" id="practiceProfession"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldpracticeProfession" value="{$showData->practiceprofession}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->
                        <div class="form-group">
                            <label class="col-lg-2 control-label">صورة الحالة الاجتماعية</label>
                            <div class="col-lg-4">
                                {if $showData->socialstatus != "" && $showData->socialstatus != "no image"}
                                    <img src="../upload/employees/{$showData->socialstatus}" width="122" height="75" style="display:block; margin-bottom:10px; border:1px solid #ccc;" />
                                {/if}
                                <input type="file" name="socialStatus" id="socialStatus"  accept=".jpg, .jpeg, .png, .pdf"/>
                                <input type="hidden" name="oldsocialStatus" value="{$showData->socialstatus}" />
                            </div>
                        </div>
                        
                       
                        
                         <!--==============================-->

                    
                    <input name="id" id="id" type="hidden" value="{$showData->id}" />

                    <!-- =================================================   -->
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <button type="button" class="btn btn-primary pull-left" id="spbutton">حفظ</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{literal}
<script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
    $('#spbutton').live('click', function (e) {
        if (!$('#spbutton').hasClass("processing")) {
            $('#spbutton').addClass("processing");
            $('#productCatName').trigger('blur');
            setTimeout(function () {
                var myForm = document.getElementById("spform");
                var SS = Spry.Widget.Form.validate(myForm);
                if (SS == true) {
                    myForm.submit();
                } else {
                    $('#spbutton').removeClass("processing");
                }
            }, 500);
        }
    });
</script>
{/literal}