|
@@ -710,6 +710,12 @@ CORE STYLES ABOVE - NO TOUCHY
|
|
|
<input type="text" name="MaxChargingDuration" id="MaxChargingDuration" class="form-control" value="<?php echo $obj['MaxChargingDuration'];?>" placeholder="<?php echo ($obj['MaxChargingDuration']==0||$obj['MaxChargingDuration']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
|
|
|
<small class="form-text text-muted-red"><label id="MaxChargingDurationText" style="display:none;">'0' means unlimit</label></small>
|
|
|
</div>
|
|
|
+ <div class="form-group" style="display:<?php echo $am001;?>">
|
|
|
+ <label id="MaxChargingSocLbl">Max Charging Soc</label>
|
|
|
+ <small class="form-text text-muted-red">percent</small>
|
|
|
+ <input type="text" name="MaxChargingSoc" id="MaxChargingSoc" class="form-control" value="<?php echo $obj['MaxChargingSoc'];?>" placeholder="<?php echo ($obj['MaxChargingSoc']==0||$obj['MaxChargingSoc']=="")?"'0' means unlimit":"";?>" title="'0' means unlimit">
|
|
|
+ <small class="form-text text-muted-red"><label id="MaxChargingSocText" style="display:none;">'0' means unlimit</label></small>
|
|
|
+ </div>
|
|
|
<div class="form-group" style="display:<?php echo $am001;?>">
|
|
|
<label>Stop Charging By Button</label>
|
|
|
<select class="form-control" id="StopChargingByButton" name="StopChargingByButton">
|
|
@@ -2091,6 +2097,9 @@ CORE STYLES ABOVE - NO TOUCHY
|
|
|
if(document.getElementById("MaxChargingDuration").value=="0" || document.getElementById("MaxChargingDuration").value==""){
|
|
|
document.getElementById("MaxChargingDurationText").style.display="block";
|
|
|
}
|
|
|
+ if(document.getElementById("MaxChargingSoc").value=="0" || document.getElementById("MaxChargingSoc").value==""){
|
|
|
+ document.getElementById("MaxChargingSocText").style.display="block";
|
|
|
+ }
|
|
|
if(document.getElementById("ModelName").value.substr(8,1) != "0"){
|
|
|
document.getElementById("AcMaxChargingCurrentDiv").style.display="block";
|
|
|
if(document.getElementById("AcMaxChargingCurrent").value=="0" || document.getElementById("AcMaxChargingCurrent").value==""){
|
|
@@ -2100,6 +2109,7 @@ CORE STYLES ABOVE - NO TOUCHY
|
|
|
document.getElementById("MaxChargingPowerLbl").innerHTML="DC MaxCharging Power";
|
|
|
document.getElementById("MaxChargingCurrentLbl").innerHTML="DC MaxCharging Current";
|
|
|
document.getElementById("MaxChargingDurationLbl").innerHTML="DC MaxCharging Duration";
|
|
|
+ document.getElementById("MaxChargingSocLbl").innerHTML="DC MaxCharging Soc";
|
|
|
}
|
|
|
else{
|
|
|
document.getElementById("AcMaxChargingCurrentDiv").style.display="none";
|
|
@@ -2137,6 +2147,14 @@ CORE STYLES ABOVE - NO TOUCHY
|
|
|
document.getElementById(this.id+"Text").style.display="none";
|
|
|
}
|
|
|
});
|
|
|
+ document.getElementById("MaxChargingSoc").addEventListener("change", function() {
|
|
|
+ if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
|
|
|
+ document.getElementById(this.id+"Text").style.display="block";
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ document.getElementById(this.id+"Text").style.display="none";
|
|
|
+ }
|
|
|
+ });
|
|
|
document.getElementById("AcMaxChargingCurrent").addEventListener("change", function() {
|
|
|
if(document.getElementById(this.id).value == "0" || document.getElementById(this.id).value == ""){
|
|
|
document.getElementById(this.id+"Text").style.display="block";
|
|
@@ -2186,6 +2204,7 @@ CORE STYLES ABOVE - NO TOUCHY
|
|
|
"&MaxChargingCurrent=" + document.getElementById("MaxChargingCurrent").value+
|
|
|
"&AcMaxChargingCurrent=" + document.getElementById("AcMaxChargingCurrent").value+
|
|
|
"&MaxChargingDuration=" + document.getElementById("MaxChargingDuration").value+
|
|
|
+ "&MaxChargingSoc=" + document.getElementById("MaxChargingSoc").value+
|
|
|
"&StopChargingByButton=" + document.getElementById("StopChargingByButton").value+
|
|
|
"&LocalWhiteCard0=" + document.getElementById("LocalWhiteCard0").value+
|
|
|
"&LocalWhiteCard1=" + document.getElementById("LocalWhiteCard1").value+
|
|
@@ -2264,6 +2283,7 @@ CORE STYLES ABOVE - NO TOUCHY
|
|
|
var MaxChargingCurrent = document.getElementById("MaxChargingCurrent").value;
|
|
|
var AcMaxChargingCurrent = document.getElementById("AcMaxChargingCurrent").value;
|
|
|
var MaxChargingDuration = document.getElementById("MaxChargingDuration").value;
|
|
|
+ var MaxChargingSoc = document.getElementById("MaxChargingSoc").value;
|
|
|
|
|
|
if(LocalWhiteCard0 != ""){
|
|
|
if(LocalWhiteCard0.length>32){
|
|
@@ -2455,6 +2475,24 @@ CORE STYLES ABOVE - NO TOUCHY
|
|
|
document.getElementById("MaxChargingDuration").focus();
|
|
|
return false;
|
|
|
}
|
|
|
+ if((document.getElementById("ModelName").value.substr(0,1)=="D") && (MaxChargingSoc > 100))
|
|
|
+ {
|
|
|
+ alert("MaxChargingSoc must <= 100!");
|
|
|
+ document.getElementById("MaxChargingSoc").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if((document.getElementById("ModelName").value.substr(0,1)=="D") && (MaxChargingSoc == ""))
|
|
|
+ {
|
|
|
+ alert("Fill Max Charging Soc !");
|
|
|
+ document.getElementById("MaxChargingSoc").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if((document.getElementById("ModelName").value.substr(0,1)=="D") && (MaxChargingSoc < 0))
|
|
|
+ {
|
|
|
+ alert("MaxChargingSoc must >= 0!");
|
|
|
+ document.getElementById("MaxChargingSoc").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
if(document.getElementById("ModelName").value.substr(0,1)=="A" && MaxChargingCurrent < 6 && MaxChargingCurrent !=0)
|
|
|
{
|