ソースを参照

2023-02-10 / ct_chen

Actions:
1. Webservice add password hide/show function
2. bug fix with "billing" on charging tab
3. change description of JP

Files:
1. EVSE/rootfs/var/www/set_backend.php
   EVSE/rootfs/var/www/set_network.php
2. EVSE/rootfs/var/www/set_charging.php
3. EVSE/rootfs/var/www/lang.db
ct_chen 2 年 前
コミット
0ce59ec2a3

BIN
EVSE/rootfs/var/www/lang.db


+ 20 - 2
EVSE/rootfs/var/www/set_backend.php

@@ -256,7 +256,8 @@ CORE STYLES ABOVE - NO TOUCHY
 										</div>
 										<div id="OcppSecurityPasswordDiv" class="form-group" style="display:<?php echo $am101;?>">
 											<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'});?>">
+											<input type="password" name="OcppSecurityPassword" id="OcppSecurityPassword" class="form-control floatingPassword" value="<?php echo htmlspecialchars($obj->{'OcppSecurityPassword'});?>">
+											<i id="checkEye1" class="fa fa-eye" style="opacity: 0.5;color: red;"></i>
 										</div>
 										<div id="TLSwithClientSideCertificatesDiv" class="form-group file-upload" style="display:<?php echo $am101;?>">
 											<div class="file-upload">
@@ -335,7 +336,8 @@ CORE STYLES ABOVE - NO TOUCHY
 										</div>
 										<div id="MaintainServerSecurityPasswordDiv" class="form-group" style="display:<?php echo $am101;?>">
 											<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'});?>">
+											<input type="password" name="MaintainServerSecurityPassword" id="MaintainServerSecurityPassword" class="form-control floatingPassword" value="<?php echo htmlspecialchars($obj->{'MaintainServerSecurityPassword'});?>">
+											<i id="checkEye2" class="fa fa-eye" style="opacity: 0.5;color: red;"></i>
 										</div>
 									</section>
 								</article>
@@ -689,6 +691,22 @@ CORE STYLES ABOVE - NO TOUCHY
 		};
 		return text.replace(/[&<>"']/g, function(m) { return map[m]; });
 	}
+	$("#checkEye1").click(function () {
+		if($(this).hasClass('fa-eye')){
+			$("#OcppSecurityPassword").attr('type', 'text');
+		}else{
+			$("#OcppSecurityPassword").attr('type', 'password');
+		}
+		$("#checkEye1").toggleClass('fa-eye').toggleClass('fa-eye-slash');
+	});
+	$("#checkEye2").click(function () {
+		if($(this).hasClass('fa-eye')){
+			$("#MaintainServerSecurityPassword").attr('type', 'text');
+		}else{
+			$("#MaintainServerSecurityPassword").attr('type', 'password');
+		}
+		$("#checkEye2").toggleClass('fa-eye').toggleClass('fa-eye-slash');
+	});
 </script>
 
 

+ 1 - 1
EVSE/rootfs/var/www/set_charging.php

@@ -2293,7 +2293,7 @@ CORE STYLES ABOVE - NO TOUCHY
 			formData.append("LocalWhiteCard7", escapeHtml(document.getElementById("LocalWhiteCard7").value));
 			formData.append("LocalWhiteCard8", escapeHtml(document.getElementById("LocalWhiteCard8").value));
 			formData.append("LocalWhiteCard9", escapeHtml(document.getElementById("LocalWhiteCard9").value));
-			formData.append("isBilling", document.getElementById("isBilling").value);
+			formData.append("isBilling", (document.getElementById("isBilling").checked?"1":"0"));
 			formData.append("Currency", document.getElementById("Currency").value);
 			formData.append("Fee0", document.getElementById("Fee0").value);
 			formData.append("Fee1", document.getElementById("Fee1").value);

+ 24 - 5
EVSE/rootfs/var/www/set_network.php

@@ -204,7 +204,8 @@ img {
 										</div>
 										<div class="form-group" id="WifiPasswordDiv">
 											<label>Password</label>
-											<input type="text" name="WifiPassword" id="WifiPassword" class="form-control" value="<?php echo $obj->{'WifiPassword'};?>">
+											<input type="password" name="WifiPassword" id="WifiPassword" class="form-control floatingPassword" value="<?php echo $obj->{'WifiPassword'};?>">
+											<i id="checkEye1" class="fa fa-eye" style="opacity: 0.5;color: red;"></i>
 										</div>
 										<div class="form-group" id="WifiBroadcastSsidDiv">
 											<label>Wifi Broadcast SSID</label>
@@ -295,7 +296,8 @@ img {
 										</div>
 										<div class="form-group">
 											<label><?php echo $lang->showWord("chap_pap_pwd"); ?></label>
-											<input type="text" name="TelcomChapPapPwd" id="TelcomChapPapPwd" class="form-control" value="<?php echo $obj->{'TelcomChapPapPwd'};?>">
+											<input type="password" name="TelcomChapPapPwd" id="TelcomChapPapPwd" class="form-control floatingPassword" value="<?php echo $obj->{'TelcomChapPapPwd'};?>">
+											<i id="checkEye2" class="fa fa-eye" style="opacity: 0.5;color: red;"></i>
 										</div>
 										<div class="form-group">
 											<label><?php echo $lang->showWord("modem_imei"); ?></label>
@@ -671,9 +673,9 @@ img {
 	}
 
 	function scan_wifi()
-        {
-          window.open("scan_wifi.php","_blank","height=200,width=400, status=yes,toolbar=no,menubar=no,location=no");
-        }
+	{
+		window.open("scan_wifi.php","_blank","height=200,width=400, status=yes,toolbar=no,menubar=no,location=no");
+	}
 	$("#scan").fancybox({
 		'type'				: 'iframe',
 		'iframe' : {
@@ -683,6 +685,23 @@ img {
 			}
 		}
 	});
+	$("#checkEye1").click(function () {
+		if($(this).hasClass('fa-eye')){
+			$("#WifiPassword").attr('type', 'text');
+		}else{
+			$("#WifiPassword").attr('type', 'password');
+		}
+		$("#checkEye1").toggleClass('fa-eye').toggleClass('fa-eye-slash');
+	});
+	$("#checkEye2").click(function () {
+		if($(this).hasClass('fa-eye')){
+			$("#TelcomChapPapPwd").attr('type', 'text');
+		}else{
+			$("#TelcomChapPapPwd").attr('type', 'password');
+		}
+		$("#checkEye2").toggleClass('fa-eye').toggleClass('fa-eye-slash');
+	});
+
 </script>
 
 </html>