<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <!-- BEGIN PAGE HEADER-->
        <h3 class="page-title " >
            {$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-title">
                        <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 no-print">
                            <a class="btn btn-circle btn-icon-only btn-default tooltips" href="{$hosturl}/{$controllname}" data-container="body" data-placement="top" data-original-title="عرض المسجلين">
                                <i class="icon-list"></i>
                            </a>
                        </div>
                    </div>
                    <div class="portlet-body form">
                        <!-- BEGIN FORM-->
                        <form class="form-horizontal editform" id="specialized_form" action="{$hosturl}/{$controllname}/updateit" method="POST" enctype="multipart/form-data">
                            <div class="form-body">
                                <div style="display: none; color: red;" class="error" id="errorDiv"><center>لا يمكن أن تبدأ الحقول بمسافات!!</center></div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label">الاسم </label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" placeholder="الاسم" name="name" value="{$applicant->name}" id="name" maxlength="50" minlength="2" required>
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-md-2 control-label">الوظيفة: </label>
                                    <div class="col-md-4">
                                        <select class="form-control" name="jobId" required>
                                        {foreach $allJob as $job}
                                        <option value="{$job->id}" {if $applicant->jobId eq $job->id}selected{/if}>{$job->title} / {$job->title_en}</option>
                                        {/foreach}
                                        </select>
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-md-2 control-label">تاريخ التقديم</label>
                                    <div class="col-md-4">
                                        <p class="form-control-static">{$applicant->adate}</p>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-md-2 control-label">البريد الالكترونى </label>
                                    <div class="col-md-4">
                                        <input type="email" class="form-control" placeholder="البريد الالكترونى" name="email" value="{$applicant->email}" id="email" required minlength="8" maxlength="150">
                                        <label id="mailError" class="error" style="display: none; color: red;">هذا البريد موجود بالفعل!!</label>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-md-2 control-label">الهاتف</label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control phone" id="phone" placeholder="الهاتف" name="phone" value="{$applicant->phone}" required minlength="7" maxlength="15">
                                        <label id="phoneError" class="error" style="display: none; color: red;">يجب إدخال أرقام و '+' فقط!!</label>
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-md-2 control-label">العنوان</label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" placeholder="العنوان" name="address" value="{$applicant->address}" id="address" required>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label">الجنسية</label>
                                    <div class="col-md-4">
                                        <select name="nationality" class="form-control" id="nationality" required>
                                            {foreach $allCountry as $country}
                                            <option value="{$country->id}" {if $applicant->country eq $country->id}selected{/if}>{$country->title} / {$country->title_en}</option>
                                            {/foreach}
                                        </select>
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-md-2 control-label">المؤهل الدراسي</label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" placeholder="المؤهل الدراسي" name="eduQualify" value="{$applicant->edu}" id="eduQualify" required>
                                    </div>
                                </div>
                            
                                <div class="form-group">
                                    <label class="col-md-2 control-label">التخصص</label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" placeholder="التخصص" name="specialize" value="{$applicant->specialize}" id="specialize" required>
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-md-2 control-label">النوع </label>
                                    <label class="radio-inline"><input type="radio" name="gender" {if $applicant->gender eq m}checked{/if} value="m">ذكر</label>
                                    <label class="radio-inline"><input type="radio" name="gender" {if $applicant->gender eq f}checked{/if} value="f">أنثى</label>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-md-2 control-label">الحالة الاجتماعية </label>
                                    <label class="radio-inline"><input type="radio" name="status" {if $applicant->status eq s}checked{/if} value="s">أعزب</label>
                                    <label class="radio-inline"><input type="radio" name="status" {if $applicant->status eq m}checked{/if} value="m">متزوج</label>
                                    <label class="radio-inline"><input type="radio" name="status" {if $applicant->status eq d}checked{/if} value="d">مطلق</label>
                                    <label class="radio-inline"><input type="radio" name="status" {if $applicant->status eq w}checked{/if} value="w">أرمل</label>
                                </div>

                                <div class="form-group">
                                    <label class="col-md-2 control-label">إرفاق ملف </label>
                                    <input type="file" name="file" id="file" {if $applicant->file eq "no image" || $applicant->file eq ""}required{/if} accept=".doc, .docx, .pdf, application/msword, application/pdf"/>
                                    <input type="hidden" name="oldFile" value="{$hosturl}/../upload/applicant/{$applicant->file}"/>
                                    <a href="{$hosturl}/../upload/applicant/{$applicant->file}" class='btn red' target="_new">تحميل<i class='fa fa-download'></i></a>
                                    <label id="fileError" class="error" style="display: none; color: red;">يجب إرفاق ملفات بامتداد "pdf, doc, docx" فقط!!</label>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-md-2 control-label">المهارات</label>
                                    <div class="col-md-4">
                                        <textarea class="form-control" name="skill" id="skill" required minlength="2" maxlength='150'>{$applicant->skill}</textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label">الشهادات</label>
                                    <div class="col-md-4">
                                        <textarea class="form-control" name="certification" id="certification" required minlength="2" maxlength='150'>{$applicant->certification}</textarea>
                                    </div>
                                </div>
                            </div>
                            <input type="hidden" name="appid" id="appid" value="{$applicant->id}"/>
                        
                        <div class="form-actions">
                            <div class="row">
                                <div class="col-md-offset-3 col-md-4">
                                    <button type="submit" class="btn green editRegister">حفظ</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 -->
