

@{view('~partial/image/CropperHeadONE',{'width':200,'height':200,'padding':90})}

@{section header}
<title>لوگو</title>
<style>
    #showlist{text-align: center !important;}
    #showlist>div{display:inline-block !important;float:none;background:#fff;box-shadow: 0px 0px 5px #ddd;;} 
</style>

@{end}




<div class="Hrow HpaddR-1per HpaddL-1per HpaddT-3per HpaddB-1per Htxt-center">

  @{view('~partial/image/CropperInsertONE',{'ax':['1'],'id':'','regid':"","caption":""})}
  @{view('~partial/image/imgShowList',{'delete':true,'ax':['1'],'id':'','address':"../../../images/logo/logo"})}


</div>


@{section footer}

@{view('~partial/image/CropperFooterONE',{'delete':true,'uprate':2,'downrate':2,'width_out':225,'height_out':225,"myurl_ins":"'/user/insert/pictuer/'",'myurl_del':"'/user/delete/pictuer/'","limitPic":1})}



<script type="text/javascript">


    function show_melkres(result){ 
        switch(result.status){
            case 200:
                Hnotification({status:"success",Ttext:"",Ctext:result.data});
                break;
            default:
                Hnotification({status:"warning",Ttext:"خطای ارسال داده - ",Ctext:result.data});
        }
    }

$(document).ready(function(){

     $("#UPDcontact").click(async function(){
        var ok=1;
        $(".fieldCheck").each(function(){

          if($(this).val()!=null){
            if($(this).val().replace(/\s/g, '')==""){
              ok=0;
              Hnotification({status:"red",Ttext:"خطا : ",Ctext:$(this).parent().attr("title")+" نمیتواند خالی باشد "});
              return false;
            }
          }else{
            ok=0;
            Hnotification({status:"red",Ttext:"خطا : ",Ctext:$(this).parent().attr("title")+" نمیتواند خالی باشد "});
            return false;
          }
          
        });
        if(ok){
          var formdata=new FormData(contactUPD);
          var result=await jqajax("/api/contacts",formdata,"post","loader");
          show_melkres(result); 
        }
    
    });

 
});


</script>


@{end}
