HTTP status field is red when its value is invalid
This commit is contained in:
		@@ -13,6 +13,10 @@ const removeMessageName = 'removeMessage';
 | 
			
		||||
const C_UUID = 'mock-uuid';
 | 
			
		||||
const C_ID = 'last-displayed-id';
 | 
			
		||||
const C_ADV = 'advanced-mode';
 | 
			
		||||
 | 
			
		||||
const color_red = "#ff8f8f";
 | 
			
		||||
const color_grey = "#6b6b6b";
 | 
			
		||||
 | 
			
		||||
const setModified = function(){
 | 
			
		||||
    setDataModified();
 | 
			
		||||
}
 | 
			
		||||
@@ -61,16 +65,16 @@ function httpStatusInvalid(){
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function setDataModified(){
 | 
			
		||||
    console.log("dupadupagówno")
 | 
			
		||||
    if(dataModified) return;
 | 
			
		||||
    if(httpStatusInvalid()){
 | 
			
		||||
        $('#btn-save').removeClass('active');
 | 
			
		||||
        $('#btn-save').off();
 | 
			
		||||
        document.getElementById("httpStatus").style.backgroundColor = color_red;
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    dataModified = true;
 | 
			
		||||
    $('#btn-save').addClass('active');
 | 
			
		||||
    $('#btn-save').click(getUpdate);
 | 
			
		||||
    document.getElementById("httpStatus").style.backgroundColor = null;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//Adding change listener to fields
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user