shr.defineClass("shr.customer.gtiit.ResumeEditPersonDegreeEx",shr.preentry.resume.resumeEditPersonDegree , {
	
	
	
	initalizeDOM: function () {
		shr.customer.gtiit.ResumeEditPersonDegreeEx.superClass.initalizeDOM.call(this);
		/*if(this.operateState.toUpperCase() != 'VIEW'){
			// var talentId = $("#id").val();
			// this.remoteCall({
	  //           type:"post",
	  //           async: false,
	  //           method:"isHighest",
	  //           param:{"talentId" : talentId},
	  //           success:function(res){
	  //               if(res.flag){
			// 			var checkbox_json = {id:"isHighestuuid1",readonly: "",value: 1};
			// 			$('input[name="isHighest"]').shrCheckbox(checkbox_json);
			// 		}
	  //           }
	  //       });
	        var checkbox_json = {id:"isHighestuuid1",readonly: "",value: 1};
						$('input[name="isHighest"]').shrCheckbox(checkbox_json);
		}*/
	},
	
	verify: function() {
		var EFFDT = this.getFieldValue("enrollDate");
		var LEFFDT = this.getFieldValue("graduateDate");
		var effectDate = new Date(EFFDT);
		var lEffectDate = new Date(LEFFDT);
		if(effectDate.getTime()>lEffectDate.getTime()){
			shr.showInfo({message: jsBizMultLan.emp_personDegreeEdit_i18n_1});
			return false;
		}
		var now = new Date(); 
		if(now.getTime() < lEffectDate.getTime()){
			shr.showInfo({message: "The graduation time cannot be longer than the current time !"});
			return false;
		}
		return true;
	},
	saveAction: function(event) {
	    var _self = this;

	    var isDiplomaModality = false;
	    var talentId = shr.getUrlRequestParam('relatedFieldId');
	    var diplomaModality = this.getFieldValue('diplomaModality');
	    var fid = this.getFieldValue('id');
	    _self.remoteCall({
            method: "checkDiploma",
            param: {talentId:talentId,diplomaModality:diplomaModality,fid:fid}, 
            async: false,
            success: function(data) {
                if(data.isDiplomaModality){
                	isDiplomaModality = data.isDiplomaModality;
                }
            },
            error : function(){
                
            }
        });
        if(isDiplomaModality){
        	shr.showError({message: "Employee qualifications are not allowed to be repeated !"});
        	return;
        }

	    var isHighest = this.getFieldValue('isHighest');
	    if (isHighest == true) {
	       highestArray = $("span[id^='isHighestuuid']");
	       for (var i = 0; i < highestArray.length; i++) {
	          span = highestArray.get(i);
	          if (span.getAttribute('value') == '1') $(span)
	          .text(jsBizMultLan.ssc_resumeEditPersonDegree_26568746_i18n_0);
	       }
	    }
	    var isHighestDegree = this.getFieldValue('isHighestDegree');
	    if (isHighestDegree == true) {
	      highestArray = $("span[id^='isHighestDegreeuuid']");
	      for (var i = 0; i < highestArray.length; i++) {
	        span = highestArray.get(i);
	        if (span.getAttribute('value') == '1') $(span)
	        .text(jsBizMultLan.ssc_resumeEditPersonDegree_26568746_i18n_0);
	      }
	    }
	    shr.preentry.resume.resumeEditPersonDegree.superClass.saveAction.call(_self);
  }
	
});