<style type="text/css">
.modal-header .close {
    margin-top: -24px;
    float: left;

}

</style>

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

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


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

                    {/literal}
                    
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">كود المورد </label>
                        <div class="col-lg-4">
                            <input type="text" name="suppliercode" class="form-control" value="{$supplierdata.suppliercode}"/>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">  اسم    المورد   </label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="suppliername" 
                            class="form-control checkcolumn"  placeholder="اسم   المورد  "  
                            data-table="supplier" data-filter=" suppliername = ? and conditions = 0 " 
                            data-tableid="" data-parentid="" data-parentcol="" value="{$supplierdata.suppliername}" />
                            
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">المحمول</label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="supplierphone" 
                             class="form-control checkcolumn nummbers" placeholder=" المحمول   "  
                             data-table="supplier" data-filter=" supplierphone = ? and conditions = 0 "  data-tableid=""
                            data-parentid="" data-parentcol="" value="{$supplierdata.supplierphone}" />
                            
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">الارضى</label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="suppliermobile" 
                             class="form-control checkcolumn nummbers" placeholder=" الارضى " 
                             data-table="supplier" data-filter=" suppliermobile = ? and conditions = 0 "  data-tableid=""
                            data-parentid="" data-parentcol="" value="{$supplierdata.suppliermobile}" />    
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">عنوان   المورد    </label>
                        <div class="col-lg-4">
                            <input    required="required"    type="text" name="supplieraddress" 
                             class="form-control" placeholder=" عنوان  المورد    "
                             data-table="" data-tablecol="" data-tableid=""
                            data-parentid="" data-parentcol="" value="{$supplierdata.supplieraddress}" />    
                            
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">  المحافظه    /  المدينة   </label>
                        <div class="col-lg-4">
                             <input id="goverareaid" type="text" name="goverarea"  class="getselectjoin"  data-placeholder=" المحافظه    /  المدينة    "   data-table="goverarea" data-tableid="clientareaid" 
                              data-join=" LEFT JOIN government on government.governmetid = goverarea.governmentid
                              LEFT JOIN clientarea on clientarea.id = goverarea.clientareaid "   data-filter="" 
                              data-parent="" data-itr=""  
                              data-search="governmentname,'/',name"/>
                             <input  type="hidden" name="goverareaid" class="selectedit" data-tableidname="goverareaid"  data-itr="" data-join=" LEFT JOIN government on government.governmetid = goverarea.governmentid
                              LEFT JOIN clientarea on clientarea.id = goverarea.clientareaid "
                             data-table="goverarea" data-tableid="goverareaid"
                              data-search="governmentname,'/',name" value="{$supplierdata.goverareaid}" />
                        </div>
                        
                        <button type="button" class="btn btn-primary adddatamodal" data-table="goverarea" data-tableid="goverareaid" data-toggle="modal" data-target="#Modalgoverareaid" data-whatever="@goverarea" data-formt="formgoverarea" data-selectitr="">اضافة  مدينه</button>
                        <button type="button" class="btn btn-primary editdatamodal"  data-model="#Modalgoverareaid" data-table="goverarea" data-name="goverareaid" data-tableid="goverareaid" data-join="LEFT JOIN government on government.governmetid = goverarea.governmentid LEFT JOIN clientarea on clientarea.id = goverarea.clientareaid" data-formt="formgoverarea" data-selectitr="">تعديل  مدينه</button>
                    </div>
                    <div class="form-group">
                         <label for="txtName" class="col-lg-2 control-label">اسم المستفيد فى الشيك</label>
                        <div class="col-lg-4">
                            <input type="text" name="namepayeecheck" class="form-control" value="{$supplierdata.namepayeecheck}"/>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <div class="form-group">
                         <label for="txtName" class="col-lg-2 control-label">مسئول الضمانات</label>
                        <div class="col-lg-4">
                            <input type="text" name="warrantyOfficer" class="form-control" value="{$supplierdata.warrantyOfficer}"/>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <div class="form-group">
                         <label for="txtName" class="col-lg-2 control-label">موبايل الضمانات</label>
                        <div class="col-lg-4">
                            <input type="text" name="warrantymobile" class="form-control" value="{$supplierdata.warrantymobile}"/>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <div class="form-group">
                         <label for="txtName" class="col-lg-2 control-label">اسم البائع</label>
                        <div class="col-lg-4">
                            <input type="text" name="sellername" class="form-control" value="{$supplierdata.sellername}"/>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">موبايل البائع</label>
                        <div class="col-lg-4">
                            <input type="text" name="sellermobile" class="form-control" value="{$supplierdata.sellermobile}"/>
                            <div class="clearfix"></div>
                        </div>
                    </div>

                    <input type="hidden" name="supplierid" value="{$supplierdata.supplierid}" />


                   {if $del == 0}
                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                             <button type="button" class="btn btn-primary pull-left saveformajax" data-form="saveformajax">تعديل الامر</button>
                        </div>
                    </div>
                    {/if}




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




    </div>
</div>

<div class="modal fade" id="Modalgoverareaid" tabindex="-1" role="dialog" aria-labelledby="ModalgoverareaidLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="ModalgoverareaidLabel"> اضافة </h3>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form class="form-horizontal"  action="maintenancesuppliers.php"  id="formgoverarea" 
        method="post"  enctype="multipart/form-data" data-dosave="?do=savegoverarea"  data-direction="">
          <div class="form-group hideshow">
            <label for="recipient-name" class="col-form-label"> المحافظه    </label>
            <input id="" type="text" name="governmentid"  class="getselectjoin"  data-placeholder=" البحث عن   محافظه   "   data-table="government" data-tableid="governmetid" data-join=""   data-filter="" data-parent="" data-itr=""  
            data-search="governmentname"/> 
          </div>

          <div class="form-group">
            <label for="recipient-name" class="col-form-label"> اسم المحافظه   </label>
            <input     type="text" name="governmentname" 
            class="form-control checkcolumn"  placeholder=" الاسم   "  
            data-table="government" data-filter=" governmentname = ? " 
            data-tableid="" data-parentid="" data-parentcol="" />
          </div>
          <div class="form-group">
            <label for="recipient-name" class="col-form-label"> المنطقه    </label>
            <input    required="required"    type="text" name="name" 
            class="form-control "  placeholder=" الاسم   "  
            data-table="" data-filter="" 
            data-tableid="" data-parentid="" data-parentcol="" />
          </div>
          <input id="popgoverarea" type="hidden" name="goverareaid" value=""  />
          <input id="itrgoverarea" type="hidden" name="selectitr" value=""  />

        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">الغاء</button>
        <button type="button" class="btn btn-primary saveformajax" data-form="formgoverarea"> حفظ</button>
      </div>
    </div>
  </div>
</div>




