
<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="maintenanceproducts.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="form-horizontal"  action="maintenanceproducts.php"  id="saveformajax" method="post"  enctype="multipart/form-data" data-dosave="?do=savedata" data-direction="maintenanceproducts.php?do=show">
                    {/literal}

                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label">التصنيفات</label>
                        <div class="col-lg-4">
                             <input id="productCatId" type="text" name="productcat"  class="getselectjoin productCatId"  data-placeholder=" التصنيفات  "   data-table="productcat" 
                              data-tableid="productCatId"  data-join=""   data-filter="" data-parent="" data-itr=""  
                              data-search="productCatName"/>
                             <input  type="hidden" name="productCatId" class="selectedit" data-tableidname="productCatId"  data-itr="" 
                             data-join="" data-table="productcat" data-tableid="productCatId" data-search="productCatName" value="" />
                        </div>
                        <button type="button" class="btn btn-primary adddatamodal" data-table="productcat" data-tableid="productCatId" data-toggle="modal" data-target="#ModalproductCatId" data-whatever="@productcat" data-formt="formproductcat" data-selectitr="">اضافة   التصنيف</button>
                        <button type="button" class="btn btn-primary editdatamodal"  data-model="#ModalproductCatId" data-table="productcat" data-name="productCatId" data-tableid="productCatId" data-join="" data-formt="formproductcat" data-selectitr="">تعديل   التصنيف</button>
                    </div>

                     <div class="form-group"  >
                        <label  class="col-lg-2 control-label"> المنتجات  </label>
                        <div class="col-lg-4">
                              <input  type="text" name="productId"  class="getselectjoin gettabledata"  data-placeholder=" البحث عن   منتج   "   data-table="product" 
                              data-tableid="productId" 
                              data-join=""   data-filter=" and product.conditions = 0 " 
                              data-parent="productCatId" data-itr=""  
                              data-search="productName"/> 
                        </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="productName" 
                            class="form-control checkcolumn"  placeholder="اسم  المنتج  "  
                            data-table="product" data-filter=" productName = ? and conditions = 0 " 
                            data-tableid="" data-parentid="" data-parentcol="" />
                            
                        </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="productDescription" 
                             class="form-control" placeholder=" وصف المنتج   "  
                             data-table="product" data-filter=""  
                             data-tableid="" data-parentid="" data-parentcol=""/>
                            
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="txtName" class="col-lg-2 control-label"> Run Query</label>
                        <div class="col-lg-4">
                            <input     type="text" name="runquery" 
                             class="form-control" placeholder=" Run Query " 
                             data-table="product" data-filter=""  data-tableid=""
                            data-parentid="" data-parentcol=""/>    
                        </div>
                    </div>
                  
                     
                    
                  
                    
                    <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>
                </form>
            </div>
        </div>
    </div>
</div>



<div class="modal fade" id="ModalproductCatId" tabindex="-1" role="dialog" aria-labelledby="ModalproductCatIdLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title" id="ModalproductCatIdLabel"> اضافة </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="maintenanceproducts.php"  id="formproductcat" 
        method="post"  enctype="multipart/form-data" data-dosave="?do=saveproductcat"  data-direction="">
          <div class="form-group hideshow">
            <label for="recipient-name" class="col-form-label"> التصنيفات    </label>
            <input id="productCatParent" type="text" name="productCatParent"  class="getselectjoin"  data-placeholder=" التصنيفات  "   data-table="productcat" 
              data-tableid="productCatId" 
              data-join=""   data-filter="" 
              data-parent="" data-itr=""  
              data-search="productCatName"/>
          </div>

          <div class="form-group">
            <label for="recipient-name" class="col-form-label"> الاسم     </label>
            <input     type="text" name="productCatName" 
            class="form-control checkcolumn"  placeholder=" الاسم   "  
            data-table="productcat" data-filter=" productCatName = ? and conditions = 0 " 
            data-tableid="" data-parentid="" data-parentcol="" />
          </div>
          <input id="popproductcat" type="hidden" name="productCatId" value=""  />
          <input id="itrproductcat" 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="formproductcat"> حفظ</button>
      </div>
    </div>
  </div>
</div>


