Przeglądaj źródła

2022-09-07 / ct_chen

Actions:
1. Webservice modify uploading div

Files:
1. EVSE/rootfs/var/www/set_backend.php
ct_chen 2 lat temu
rodzic
commit
eec6ba3b94
1 zmienionych plików z 21 dodań i 21 usunięć
  1. 21 21
      EVSE/rootfs/var/www/set_backend.php

+ 21 - 21
EVSE/rootfs/var/www/set_backend.php

@@ -258,6 +258,20 @@ CORE STYLES ABOVE - NO TOUCHY
 											<label><?php echo $lang->showWord("ocpp_security_password"); ?></label>
 											<input type="text" name="OcppSecurityPassword" id="OcppSecurityPassword" class="form-control" value="<?php echo htmlspecialchars($obj->{'OcppSecurityPassword'});?>">
 										</div>
+										<div id="TLSwithClientSideCertificatesDiv" class="form-group" style="display:<?php echo $am101;?>">
+											<div>
+												<label>private_key <?php echo $obj->{'Private_Key'}?></label>
+												<div class="file-loading">
+													<input name="private_key" id="private_key" type="file" class="file" data-show-preview="false" data-show-upload="false">
+												</div>
+											</div>
+											<div>
+												<label>certificate <?php echo $obj->{'Certificate'}?></label>
+												<div class="file-loading">
+													<input name="certificate" id="certificate" type="file" class="file" data-show-preview="false" data-show-upload="false">
+												</div>
+											</div>
+										</div>
 <?php if(substr($ModelName,0,2)=="AX" || substr($ModelName,0,2)=="AW" || substr($ModelName,0,1)=="D"){?>
 										<div class="form-group" style="display:block">
 											<label><?php echo $lang->showWord("ocpp_receipt_url"); ?></label>
@@ -305,20 +319,6 @@ CORE STYLES ABOVE - NO TOUCHY
 											<label><?php echo $lang->showWord("maintain_server_security_password"); ?></label>
 											<input type="text" name="MaintainServerSecurityPassword" id="MaintainServerSecurityPassword" class="form-control" value="<?php echo htmlspecialchars($obj->{'MaintainServerSecurityPassword'});?>">
 										</div>
-										<div id="TLSwithClientSideCertificatesDiv" class="form-group" style="display:<?php echo $am101;?>">
-											<div>
-												<label>private_key <?php echo $obj->{'Private_Key'}?></label>
-												<div class="file-loading">
-													<input name="private_key" id="private_key" type="file" class="file" data-show-preview="false" data-show-upload="false">
-												</div>
-											</div>
-											<div>
-												<label>certificate <?php echo $obj->{'Certificate'}?></label>
-												<div class="file-loading">
-													<input name="certificate" id="certificate" type="file" class="file" data-show-preview="false" data-show-upload="false">
-												</div>
-											</div>
-										</div>
 									</section>
 								</article>
 <?php if(substr($ModelName,0,1)=="D" && substr($ModelName,3,1)=="C"){ ?>
@@ -552,24 +552,24 @@ CORE STYLES ABOVE - NO TOUCHY
 	function OcppSecurityProfile_changed(){
 		if(document.getElementById("OcppSecurityProfile").value == "1" || document.getElementById("OcppSecurityProfile").value == "2" || document.getElementById("OcppSecurityProfile").value == "3"){
 			document.getElementById("OcppSecurityPasswordDiv").style.display="block";
+			if(document.getElementById("OcppSecurityProfile").value == "3"){
+				document.getElementById("TLSwithClientSideCertificatesDiv").style.display="block";
+			}
+			else{
+				document.getElementById("TLSwithClientSideCertificatesDiv").style.display="none";
+			}
 		}
 		else{
 			document.getElementById("OcppSecurityPasswordDiv").style.display="none";
+			document.getElementById("TLSwithClientSideCertificatesDiv").style.display="none";
 		}
 	}
 	function MaintainServerSecurityProfile_changed(){
 		if(document.getElementById("MaintainServerSecurityProfile").value == "1" || document.getElementById("MaintainServerSecurityProfile").value == "2" || document.getElementById("MaintainServerSecurityProfile").value == "3"){
 			document.getElementById("MaintainServerSecurityPasswordDiv").style.display="block";
-			if(document.getElementById("MaintainServerSecurityProfile").value == "3"){
-				document.getElementById("TLSwithClientSideCertificatesDiv").style.display="block";
-			}
-			else{
-				document.getElementById("TLSwithClientSideCertificatesDiv").style.display="none";
-			}
 		}
 		else{
 			document.getElementById("MaintainServerSecurityPasswordDiv").style.display="none";
-			document.getElementById("TLSwithClientSideCertificatesDiv").style.display="none";
 		}
 	}