<meta charset="utf8">
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <!-- BEGIN PAGE HEADER-- >
        <h3 class="page-title">
            {$shcontrollname}
        </h3>

        <!--<meta charset="utf8">-->

        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12 ">
                <!-- BEGIN SAMPLE FORM PORTLET-->
                <div class="portlet box blue placeholderlabel editx">
                    <div class="portlet-title">

                        <div class="caption fright">
                            بيانات {if $programesetting->programview == 1 }  الزوجة  {else} المريض  {/if}
                        </div>

                        <!--                        <div class="caption fright" style="margin-right: 5px; font-weight: bold;">
                                                    (تاريخ الاضافة : {$addTime } - {$addDate} )
                                                </div>-->
                        <div class="tools fleft">
                            <a href="#" class="collapse">
                            </a>
                            <a class="fff bold" href="{$hosturl}/controllers/{$controllname}.php?ac=show">عرض جميع المرضى <i class="fa fa-users"></i>   </a>
                        </div>
                    </div>
                    <div class="portlet-body form">
                        <form action="{$hosturl}/controllers/{$controllname}.php?ac=update" method="post"  enctype="multipart/form-data" data-ng-app="demo" data-ng-controller="DemoFileUploadController" data-file-upload="options" data-ng-class="{literal}{'fileupload-processing': processing() || loadingFiles}{/literal}">
                            <div class="form-body">
                                <div class="clinick rtl">
                                    <div class="row">
                                        <input type="hidden" name="treeId" id="treeId" value="{$treeId}"/>
                                        <div class="col-md-1">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info" id="wifestatuscontain">
                                                <input type="text" name="statusno" id="statusno" class="form-control"  value="{$getOnePatient->statusno}" required="required">
                                                <label for="form_control_1" class="txtc">
                                                    <!--رقم الحالة-->
                                                </label>
                                                <span  id="lb_ckwifestatusno" class="help-block clrred" style="display: none;">هذا الرقم موجود من قبل</span>
                                            </div>
                                        </div>


                                        <div class="col-md-3">
                                            <div class="form-group  form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtc">
                                                    الصفة

                                                </label>
                                                <select  class="form-control select2me wTypes" name="wifetype"  id="wifetype" >
                                                    <option value=""></option>
                                                    {foreach $allTypes as $row}
                                                    <option value="{$row->id}" {if $row->id eq $getOnePatient->wiftypeid} selected {/if}>{$row->title}</option>
                                                    {/foreach}
                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="col-md-5">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info" id="wifenamecontain">
                                                <input type="text" id="wifename"  name="wifename" class="form-control" value="{$getOnePatient->wifename}" required="required">
                                                <label for="form_control_1" class="txtc">
                                                    اسم {if $programesetting->programview == 1 }  المريضة  {else} المريض  {/if}
                                                </label>
                                                <span  id="lb_ckwifename" class="help-block clrred" style="display: none;">هذا الاسم موجود من قبل</span>
                                            </div>
                                        </div>




                                        <div class="col-md-2">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info">

                                                <input class="form-control calcdatew mask_date_new txtl"  data-id="{$getOnePatient->id}" type="text" data-colresult="wifeage"  id="dateofbirth_cc" name="dateofbirth" value="{$datewifebirth}" />


                                                <label for="form_control_1" class="txtc">
                                                    <!--تاريخ الميلاد-->
                                                </label>
                                                <span class="input-group-addon go2r">تاريخ الميلاد </span>
                                            </div>
                                        </div>
                                        <div class="col-md-1">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                <input type="text" class="form-control "  name="wifeage"  id="wifeage" value="{$wAge}"/>

                                                <label for="form_control_1" class="txtc"></label>
                                                <span class="input-group-addon go2r">السن</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-3">
                                            <div class="form-group  form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtc">التعليم</label>
                                                <select class="form-control select2me edu" data-ptname="wifeeducation" name="education" id="education"  placeholder="">
                                                    <option value=""></option>
                                                    {foreach $education as $row}
                                                    <option value="{$row->id}" {if $getOnePatient->wifeeducation eq $row->id}selected{/if}>{$row->title}</option>
                                                    {/foreach}
                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                </select>

                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <div class="form-group  form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtc">الوظيفة</label>
                                                <select class="form-control select2me wjob"  data-ptname="wifejob" name="wifejob"  id="wifejob" placeholder="">
                                                    <option value="">لايوجد</option>
                                                    {foreach $wifejobs as $row}
                                                    <option value="{$row->id}"  {if $getOnePatient->wifejob eq $row->id}selected{/if}>{$row->title}</option>
                                                    {/foreach}
                                                    <option value="0" class="deleteoptincompo"> حذف </option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-2">
                                            <div class="form-group form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtc">الحالة الإجتماعية</label>
                                                <select class="form-control select2me wstatus"  data-ptname="statuesid" name="wifestatus" id="wifestatus" placeholder="" style="width: 150px !important">
                                                    <option value="">لايوجد</option>
                                                    {foreach $wifestatus as $row}
                                                    <option value="{$row->id}" {if $getOnePatient->statuesid eq $row->id}selected{/if}>{$row->title}</option>
                                                    {/foreach}
                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                </select>
                                            </div>
                                        </div>

                                        {if $programesetting->programview == 0 }
                                        <div class="col-md-2">
                                            <div class="form-group form-md-floating-label has-info">
                                                <label class="txtc">النوع</label>
                                                <select class="form-control select2me updatelastptID" data-id="{$lastpatient->id}" data-ptname="gender" name="gender" id="gender" style="width: 150px !important" >
                                                    <option value=""></option>
                                                    <option value="0" {if $getOnePatient->gender eq 0}selected{/if}>ذكر</option>
                                                    <option value="1" {if $getOnePatient->gender eq 1}selected{/if}>انثي</option>
                                                </select>
                                            </div>
                                        </div>
                                        {/if}

                                        {if $programesetting->programview == 1 } 
                                        {if $getOnePatient->statuesid == 1}
                                        <div class="displaynot"  style="display: none;"  >
                                            {else}
                                            <div class="displaynot">
                                                {/if}


                                                <div class="col-md-1">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">

                                                        <input type="text" name="mirragefromy"  min="0" class="form-control digitsOnly"  data-ptname="mirragefromy" id="mirragefromy"  value="{$mirragefromy}" />
                                                        <label id="husbandLive"  for="form_control_1" class="txtc"> </label>
                                                        <span class="input-group-addon go2leftlabel">سنة </span>
                                                    </div>
                                                </div>

                                                <div class="col-md-1">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">

                                                        <input type="text" name="mirragefromm" min="0" max="12" class="form-control digitsOnly"  data-ptname="mirragefromm"  id="mirragefromm" value="{$mirragefromm}" />
                                                        <label id="husbandLive"  for="form_control_1" class="txtr"> </label>
                                                        <span class="input-group-addon go2leftlabel">شهر</span>
                                                    </div>
                                                </div>

                                                <div class="col-md-1">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">

                                                        <input type="text" name="boyson" class="form-control " data-ptname="boyson" value="{$getOnePatient->boyson}"/>


                                                        <label for="form_control_1" class="txtc">&nbsp;</label>
                                                        <span class="input-group-addon go2leftlabel">ذكور</span>
                                                    </div>
                                                </div>
                                                <div class="col-md-1">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <input type="text" name="girlson" class="form-control "  data-ptname="girlson" value="{$getOnePatient->girlson}"/>
                                                        <label for="form_control_1" class="txtc">&nbsp;</label>
                                                        <span class="input-group-addon go2leftlabel">إناث</span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        {else}
                                    </div>
                                    {/if}



                                    <div class="row">
                                        <div class="col-md-4">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                <input type="text" name="address" class="form-control "  data-ptname="address" value="{$getOnePatient->address}">
                                                <label for="form_control_1" class="txtc">العنوان</label>
                                            </div>
                                        </div>
                                        <div class="col-md-2">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                <input type="text" name="phone" id="phone"  class="form-control digitsOnly uniquePhone " data-ptname="phone"  value="{$getOnePatient->phone}">
                                                <span id="lb_ckphone" class="help-block clrred"
                                                      style="display: none;">هذا الرقم موجود من قبل</span>
                                                <label for="form_control_1" class="txtc">تليفون 1 </label>
                                            </div>
                                        </div>
                                        <div class="col-md-2">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                <input type="text" name="mobile" id="mobile"   class="form-control digitsOnly uniquePhone " data-ptname="mobile"  value="{$getOnePatient->mobile}">
                                                <span id="lb_ckmobile" class="help-block clrred"
                                                      style="display: none;">هذا الرقم موجود من قبل</span>
                                                <label for="form_control_1" class="txtc">الموبايل</label>
                                            </div>
                                        </div>
                                        <div class="col-md-2">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info" id="wifenationalidcontain">
                                                <input type="text" class="form-control digitsOnly" data-ptname="wifenationalid" name="wifenationalid" id="wifenationalid" value="{$getOnePatient->wifenationalid}"/>
                                                <label for="form_control_1" class="txtc">رقم البطاقة</label>
                                                <span  id="lb_ckeckwifenationalid" class="help-block clrred" style="display: none;"></span>
                                            </div>
                                        </div>
                                        <div class="col-md-2">
                                            <div class="form-group form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtc">فصيلة الدم</label>
                                                <select class="form-control select2me bloodtype "  data-ptname="wifebl" id="bloodtype" name="wifebl"   placeholder="">
                                                    <option value=""></option>
                                                    {foreach $wifebl as $row}
                                                    <option value="{$row->id}" {if $getOnePatient->wifebl eq $row->id}selected{/if}>{$row->title}</option>
                                                    {/foreach}
                                                    <option value="0" class="deleteoptincompo">حذف</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">

                                        <div class="col-md-6">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                <input type="text" name="importantnote" class="form-control "  data-ptname="importantnote"  value="{$getOnePatient->importantnote}"/>
                                                <label for="form_control_1" class="txtc"> ملاحظات هامة</label>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                <input type="text" name="spacialnotes" class="form-control "  data-ptname="spacialnotes" value="{$getOnePatient->spacialnotes}"/>

                                                <label for="form_control_1" class="txtc"> عادات خاصة</label>
                                            </div>
                                        </div>

                                    </div>

                                    <div class="row">
                                        <div class="col-md-10">
                                            <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                <input type="text" name="risk" class="form-control "  data-ptname="risk" value="{$getOnePatient->risk}"/>

                                                <label for="form_control_1" class="txtc">نوع الخطورة</label>
                                            </div>
                                        </div>
                                        <div class="col-md-2">
                                            <div class="form-group form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtr">درجة الخطورة</label>
                                                <select class="form-control select2me updatelastptID" data-id="{$getOnePatient->id}" data-ptname="risktype" name="risktype" placeholder="">
                                                    <!--<option value="">اختر درجة الخطورة</option>-->
                                                    <option value="1" {if $getOnePatient->risktype eq 1}selected{/if}>منخفض</option>
                                                    <option value="2" {if $getOnePatient->risktype eq 2}selected{/if}>متوسط</option>
                                                    <option value="3" {if $getOnePatient->risktype eq 3}selected{/if}>مرتفع </option>

                                                </select>
                                            </div>
                                        </div>
                                    </div>


                                    {if $programesetting->patient_doctor == 1 } 
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group form-md-floating-label has-info">
                                                <label for="form_control_1" class="txtc">   الطبيب المعالج </label>
                                                <select  class="form-control select2me updatelastptID" name="doctorid" data-id="{$getOnePatient->id}" data-ptname="doctorid" id="doctorid" >
                                                    <option value=""></option>
                                                    {foreach $doctors as $row}
                                                    <option value="{$row.user_id}" {if $getOnePatient->doctorid eq $row.user_id}selected{/if}>{$row.name}</option>
                                                    {/foreach}
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    {/if}


                                    {if $programesetting->previous_marriage == 1 } 
                                    <input type="hidden" id="controllName" value="instruction"/>
                                    <div class="portlet box blue portletcustom wds75">
                                        <div class="portlet-title">
                                            <div class="caption fright">
                                                <a class="fff bold" href="javascript:;"  id="addPrevMarr" data-for="1"
                                                   style="margin-right: 15px;" data-patientId="{$getOnePatient->id}"> 
                                                    <i class="fa fa-plus"></i></a> زواج سابق    
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-body">
                                        <div class="clinick rtl"   id="prevMarrContainer1">

                                            {foreach $previous_marriages as $previous_marriage }
                                            <div class="row">

                                                <div class="col-md-2">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <input type="text"  name="period{$previous_marriage->id}" 
                                                               class="form-control updateElement" 
                                                               data-colName="period" data-tableName="previous_marriage"    
                                                               data-id="{$previous_marriage->id}"     value="{$previous_marriage->period}" required  />
                                                        <label for="form_control_1" class="txtc">المدة  </label>
                                                    </div>
                                                </div>

                                                <div class="col-md-2">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <input type="text"  name="males{$previous_marriage->id}" 
                                                               class="form-control updateElement" 
                                                               data-colName="males" data-tableName="previous_marriage"    
                                                               data-id="{$previous_marriage->id}"     value="{$previous_marriage->males}" required  />
                                                        <label for="form_control_1" class="txtc">ذكور   </label>
                                                    </div>
                                                </div>

                                                <div class="col-md-2">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <input type="text"  name="females{$previous_marriage->id}" 
                                                               class="form-control updateElement" 
                                                               data-colName="females" data-tableName="previous_marriage"    
                                                               data-id="{$previous_marriage->id}"     value="{$previous_marriage->females}" required  />
                                                        <label for="form_control_1" class="txtc">اناث   </label>
                                                    </div>
                                                </div>

                                                <div class="col-md-2">
                                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                        <input type="text"  name="last_age{$previous_marriage->id}" 
                                                               class="form-control updateElement" 
                                                               data-colName="last_age" data-tableName="previous_marriage"    
                                                               data-id="{$previous_marriage->id}"     value="{$previous_marriage->last_age}" required  />
                                                        <label for="form_control_1" class="txtc">سن الأصغر  </label>
                                                    </div>
                                                </div>

                                                <div class="col-md-1" style="margin-top: 25px;">
                                                    <a class="btn grey-cascade btn-xs deletemsgEX"  data-tableName="previous_marriage" 
                                                       data-id="{$previous_marriage->id}" style=" float: left;" href="#" 
                                                       data-link="instruction" data-fn="delinst">  <i class="fa fa-close"></i>
                                                    </a>
                                                </div>

                                            </div>
                                            {/foreach} 
                                        </div>
                                    </div>
                                    {/if}


                                    {if $programesetting->programview == 1 } 
                                    {if $getOnePatient->statuesid == 1 || $getOnePatient->statuesid == 4}
                                    <div class="hiddenforsng"  style="display: none;"  >
                                        {elseif $getOnePatient->statuesid == 3}
                                        <div class="hiddenforsng"  style="display: none;"  >
                                            {else}
                                            <div class="hiddenforsng">
                                                {/if}
                                                <div class="portlet box blue portletcustom">
                                                    <div class="portlet-title">
                                                        <div class="caption fright">
                                                            بيانات الزوج
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-3">
                                                        <div class="form-group form-md-floating-label has-info">
                                                            <label for="form_control_1" class="txtc"> الصفة</label>
                                                            <select class="form-control select2me htype"  name="husbandtypeid" data-ptname="husbandtypeid" id="husbandtype" placeholder="">
                                                                <option value=""></option>
                                                                {foreach $husbandtypes as $row}
                                                                <option value="{$row->id}" {if $getOnePatient->husbandtypeid eq $row->id}selected{/if}>{$row->title}</option>
                                                                {/foreach}
                                                                <option value="0" class="deleteoptincompo">حذف</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-4">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input type="text" name="husdandname" class="form-control"  data-ptname="husdandname" value="{$getOnePatient->husdandname}"/>
                                                            <label for="form_control_1" class="txtc"> اسم الزوج</label>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-3">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">

                                                            <input class="calcdatehusband mask_date_new form-control  "  data-id="{$getOnePatient->id}" type="text" id="husbanddateofbirth" name="husbanddateofbirth" value="{$datehusbirth}"/>

                                                            <label for="form_control_1"></label>
                                                            <span class="input-group-addon go2r">تاريخ الميلاد </span>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-2">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <input type="text" class="form-control "  data-ptname="husbandage" name="husbandage" id="husbandage" value="{$hAge}"/>
                                                            <label for="form_control_1" class="txtc"></label>
                                                            <span class="input-group-addon go2r">السن </span>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-3">
                                                        <div class="form-group form-md-floating-label has-info">
                                                            <label for="form_control_1" class="txtc">تعليم الزوج</label>
                                                            <select class="form-control select2me edu"  data-ptname="husbandeducation" name="husbandeducation" id="educationhus" placeholder="">
                                                                <option value=""></option>
                                                                {foreach $education as $row}
                                                                <option value="{$row->id}" {if $getOnePatient->husbandeducation eq $row->id}selected{/if}>{$row->title}</option>
                                                                {/foreach}
                                                                <option value="0" class="deleteoptincompo">حذف</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-3">
                                                        <div class="form-group form-md-floating-label has-info">
                                                            <label for="form_control_1" class="txtc">الوظيفة</label>
                                                            <select class="form-control select2me hjob "  data-ptname="husbandjob" name="husbandjob" id="husbandjob" placeholder="">
                                                                <option value=""></option>
                                                                {foreach $husbandjobs as $row}
                                                                <option value="{$row->id}"{if $getOnePatient->husbandjob eq $row->id}selected{/if}>{$row->title}</option>
                                                                {/foreach}
                                                                <option value="0" class="deleteoptincompo">حذف</option>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-3">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info" id="husbandnationalidcontent">
                                                            <input type="text" class="form-control digitsOnly"  data-ptname="husbandnationalid" name="husbandnationalid" id="husbandnationalid" value="{$getOnePatient->husbandnationalid}"/>
                                                            <label for="form_control_1" class="txtc">رقم البطاقة </label>
                                                            <span  id="lb_ckeckhusbandnationalid" class="help-block clrred" style="display: none;"></span>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-3">
                                                        <div class="form-group form-md-floating-label has-info">
                                                            <label for="form_control_1" class="txtc">فصيلة الدم</label>
                                                            <select class="form-control select2me bloodtype "  data-ptname="husbandbl" name="husbandbl" id="bloodtypehus" placeholder="">
                                                                <option value=""></option>
                                                                {foreach $wifebl as $row}
                                                                <option value="{$row->id}" {if $getOnePatient->husbandbl eq $row->id}selected{/if}>{$row->title}</option>
                                                                {/foreach}
                                                                <option value="0" class="deleteoptincompo">حذف</option>
                                                            </select>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-6">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <textarea class="form-control save_husband_patient_notes" rows="2" name="husband_notes">{$getOnePatient->husband_notes}</textarea>
                                                            <label for="form_control_1" class="txtc"> ملاحظات</label>
                                                        </div>
                                                    </div>

                                                    <div class="col-md-6">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <textarea class="form-control save_husband_patient_habits" rows="2" name="husband_habbits">{$getOnePatient->husband_habbits}</textarea>
                                                            <label for="form_control_1" class="txtc"> عادات</label>
                                                        </div>
                                                    </div>

                                                </div>

                                                {if $programesetting->previous_marriage == 1 } 
                                                <div class="portlet box blue portletcustom wds75">
                                                    <div class="portlet-title">
                                                        <div class="caption fright">
                                                            <a class="fff bold" href="javascript:;"  id="addPrevMarr" data-for="2"
                                                               style="margin-right: 15px;" data-patientId="{$getOnePatient->id}"> 
                                                                <i class="fa fa-plus"></i></a> زواج سابق    
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="form-body">
                                                    <div class="clinick rtl"   id="prevMarrContainer2">

                                                        {foreach $hus_previous_marriages as $hus_previous_marriage }
                                                        <div class="row">

                                                            <div class="col-md-2">
                                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                                    <input type="text"  name="period{$hus_previous_marriage->id}" 
                                                                           class="form-control updateElement" 
                                                                           data-colName="period" data-tableName="hus_previous_marriage"    
                                                                           data-id="{$hus_previous_marriage->id}"     value="{$hus_previous_marriage->period}" required  />
                                                                    <label for="form_control_1" class="txtc">المدة  </label>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-2">
                                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                                    <input type="text"  name="males{$hus_previous_marriage->id}" 
                                                                           class="form-control updateElement" 
                                                                           data-colName="males" data-tableName="hus_previous_marriage"    
                                                                           data-id="{$hus_previous_marriage->id}"     value="{$hus_previous_marriage->males}" required  />
                                                                    <label for="form_control_1" class="txtc">ذكور   </label>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-2">
                                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                                    <input type="text"  name="females{$hus_previous_marriage->id}" 
                                                                           class="form-control updateElement" 
                                                                           data-colName="females" data-tableName="hus_previous_marriage"    
                                                                           data-id="{$hus_previous_marriage->id}"     value="{$hus_previous_marriage->females}" required  />
                                                                    <label for="form_control_1" class="txtc">اناث   </label>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-2">
                                                                <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                                    <input type="text"  name="last_age{$hus_previous_marriage->id}" 
                                                                           class="form-control updateElement" 
                                                                           data-colName="last_age" data-tableName="hus_previous_marriage"    
                                                                           data-id="{$hus_previous_marriage->id}"     value="{$hus_previous_marriage->last_age}" required  />
                                                                    <label for="form_control_1" class="txtc">سن الأصغر   </label>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-1" style="margin-top: 25px;">
                                                                <a class="btn grey-cascade btn-xs deletemsgEX"  data-tableName="hus_previous_marriage" 
                                                                   data-id="{$hus_previous_marriage->id}" style=" float: left;" href="#" 
                                                                   data-link="instruction" data-fn="delinst">  <i class="fa fa-close"></i>
                                                                </a>
                                                            </div>

                                                        </div>
                                                        {/foreach} 
                                                    </div>
                                                </div>
                                                {/if}


                                                {/if}

                                                {if $programesetting->entrydetails == 1 } 
                                                <div class="portlet box blue portletcustom">
                                                    <div class="portlet-title">
                                                        <div class="caption fright">
                                                            بيانات الدخول - خاصة بتطبيق الموبايل
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-md-4">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <label for="form_control_1">اسم المستخدم   "الموبايل"</label>
                                                            <input readonly type="text" class="form-control" placeholder="اسم المستخدم" name="uName" id="uName" minlength="3" autocomplete="false" value="{$getOnePatient->mobile}">
                                                        </div>
                                                    </div>
                                                    <div class="col-md-4">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <label for="form_control_1">كلمة المرور الجديدة</label>
                                                            <input type="password" class="form-control" placeholder="كلمة المرور الجديدة" name="password" id="password" minlength="3" autocomplete="false">
                                                        </div>
                                                    </div>
                                                    <div class="col-md-4">
                                                        <div class="form-group form-md-line-input form-md-floating-label has-info">
                                                            <label for="form_control_1">تأكيد كلمة المرور الجديدة</label>
                                                            <input type="password" class="form-control" placeholder="تأكيد كلمة المرور الجديدة" id="confirmpassword"  name="confirmpassword" minlength="3" equalTo="#password" autocomplete="false">
                                                        </div>
                                                    </div>
                                                </div>

                                                {/if}
                                            </div>
                                            <div class="clearfix"></div>
                                        </div>
                                    </div>

                                    <div class="form-actions">

                                        {if $programesetting->programview == 1 } 


                                        <div class="col-md-4">
                                            <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
                                            <div class="row fileupload-buttonbar">
                                                <div class="col-lg-12">
                                                    <!-- The fileinput-button span is used to style the file input field as button -->
                                                    <span class="btn btn-success fileinput-button" ng-class="{literal}{disabled: disabled}{/literal}">
                                                        <i class="glyphicon glyphicon-plus"></i>
                                                        <span>إضافة ملف...</span>
                                                        <input type="file" name="files[]" multiple ng-disabled="disabled">
                                                    </span>
                                                    <button type="button" class="btn btn-primary start" data-ng-click="submit()">
                                                        <i class="glyphicon glyphicon-upload"></i>
                                                        <span>ابدأ الرفع</span>
                                                    </button>
                                                    <button type="button" class="btn btn-warning cancel" data-ng-click="cancel()">
                                                        <i class="glyphicon glyphicon-ban-circle"></i>
                                                        <span>إلغاء الرفع</span>
                                                    </button>
                                                    <!-- The global file processing state -->
                                                    <span class="fileupload-process"></span>
                                                </div>
                                                <!-- The global progress state -->
                                                <div class="col-lg-5 fade" data-ng-class="{literal}{in: active()}{/literal}">
                                                    <!-- The global progress bar -->
                                                    <div class="progress progress-striped active" data-file-upload-progress="progress()"><div class="progress-bar progress-bar-success" data-ng-style="{literal}{width: num + '%'}{/literal}"></div></div>
                                                    <!-- The extended global progress state -->
                                                    <div class="progress-extended">&nbsp;</div>
                                                </div>
                                            </div>

                                            <!--div class="scroller">
                                                <ul class="files ng-cloak anjuploadfiles" data-ng-repeat="file in queue" data-ng-class="{literal}{'processing': file.$processing()}{/literal} ">
                                                    <li data-ng-switch data-on="!!file.thumbnailUrl">
                                                        <div class="preview fileptipload" data-ng-switch-when="true">
                                                            <a data-ng-href="{literal}{{file.url}}{/literal}" title="{literal}{{file.name}}{/literal}" download="{literal}{{file.name}}{/literal}" data-gallery><img data-ng-src="{literal}{{file.thumbnailUrl}}{/literal}" alt=""></a>
                                                        </div>
                                                        <div class="preview fileptipload" data-ng-switch-default data-file-upload-preview="file"></div>
                                            <!--                                    </li>
                                                                                <li>--
                                            <p class="name" data-ng-switch data-on="!!file.url">
                                                <span data-ng-switch-when="true" data-ng-switch data-on="!!file.thumbnailUrl">
                                                    <a data-ng-switch-when="true" data-ng-href="{literal}{{file.url}}{/literal}" title="{literal}{{file.name}}{/literal}" download="{literal}{{file.name}}{/literal}" data-gallery>{literal}{{file.name}}{/literal}</a>
                                                    <a data-ng-switch-default data-ng-href="{literal}{{file.url}}{/literal}" title="{literal}{{file.name}}{/literal}" download="{literal}{{file.name}}{/literal}">{literal}{{file.name}}{/literal}</a>
                                                </span>
                                                <span data-ng-switch-default>{literal}{{file.name}}{/literal}</span>
                                            </p>
                                            <strong data-ng-show="file.error" class="error text-danger">{literal}{{file.error}}{/literal}</strong>
                                            <!--                                    </li>
                                                                                <li>--
                                            <p class="size">{literal}{{file.size| formatFileSize}}{/literal}</p>
                                            <div class="progress progress-striped active fade" data-ng-class="{literal}{pending: 'in'}{/literal}[file.$state()]" data-file-upload-progress="file.$progress()">
                                                <div class="progress-bar progress-bar-success" data-ng-style="{literal}{width: num + '%'}{/literal}"></div>
                                            </div>
                                            <!--                                    </li>

                                                                                <li>--
                                            <button style="float: left;" type="button" class="btn btn-primary start" data-ng-click="file.$submit()" data-ng-hide="!file.$submit || options.autoUpload" data-ng-disabled="file.$state() == 'pending' || file.$state() == 'rejected'">
                                                <i class="glyphicon glyphicon-upload"></i>
                                                <span>ابدأ</span>
                                            </button>
                                            <button type="button" class="btn btn-warning cancel" data-ng-click="file.$cancel()" data-ng-hide="!file.$cancel">
                                                <i class="glyphicon glyphicon-ban-circle"></i>
                                                <span>الغاء</span>
                                            </button>
                                            <button data-ng-controller="FileDestroyController" type="button" class="btn btn-danger destroy" data-ng-click="file.$destroy()" data-ng-hide="!file.$destroy">
                                                <i class="glyphicon glyphicon-trash"></i>
                                                <span>حذف</span>
                                            </button>
                                            </li>
                                            </ul>
                                            </div-->
                                        </div>

                                        {/if}
                                        <div class="col-md-8">
                                            <input type="hidden" name="patientid" value="{$getOnePatient->id}" />
                                            <input type="hidden" name="ptntid" id="ptntid" value="{$getOnePatient->id}" />
                                            <input type="submit" class="btn green btn-block btn-lg" id="patient_submit"  name="submit" value="حفظ">
                                        </div>
                                    </div>
                                    </form>
                                </div>
                            </div>
                            <!-- END SAMPLE FORM PORTLET-->
                    </div>
                </div>
                <div style="clear: both;">
                </div>
                <!-- END PAGE CONTENT-->
            </div>
        </div>

        <!-- END CONTENT -->
        <div class="modal fade" id="datareceivedwifejob" tabindex="-1" role="basic" aria-hidden="true">
        </div>
        <div class="modal fade" id="allEducation" tabindex="-1" role="basic" aria-hidden="true">
        </div>
        <div class="modal fade" id="wifestatusmodel" tabindex="-1" role="basic" aria-hidden="true">
        </div>
        <div class="modal fade" id="wifetypedel" tabindex="-1" role="basic" aria-hidden="true">
        </div>
        <div class="modal fade" id="husbandtypedel" tabindex="-1" role="basic" aria-hidden="true">
        </div>





