Просмотр исходного кода

Fix more UI bugs (#3311)

* Fix counter "Ip list page"

* Remove extra tabs / white lines text area ssl

* Remove also for ip white list
Jaap Marcus 3 лет назад
Родитель
Сommit
7eb9d8ddaf
2 измененных файлов с 9 добавлено и 12 удалено
  1. 4 10
      web/templates/pages/edit_server.php
  2. 5 2
      web/templates/pages/list_firewall_ipset.php

+ 4 - 10
web/templates/pages/edit_server.php

@@ -945,9 +945,7 @@
 							class="form-control u-min-height100 u-console"
 							name="v_ssl_crt"
 							id="v_ssl_crt"
-						>
-							<?= htmlentities(trim($v_ssl_crt, "'")) ?>
-						</textarea>
+						><?= htmlentities(trim($v_ssl_crt, "'")) ?></textarea>
 					</div>
 					<div class="u-mb20">
 						<label for="v_ssl_key" class="form-label">
@@ -957,9 +955,7 @@
 							class="form-control u-min-height100 u-console"
 							name="v_ssl_key"
 							id="v_ssl_key"
-						>
-							<?= htmlentities(trim($v_ssl_key, "'")) ?>
-						</textarea>
+						><?= htmlentities(trim($v_ssl_key, "'")) ?></textarea>
 					</div>
 					<ul class="values-list">
 						<li class="values-list-item">
@@ -1049,13 +1045,11 @@
 									<?= _("Allowed IP addresses for API") ?>
 									<span class="optional">1 IP address per line</span>
 								</label>
-								<textarea class="form-control" name="v_api_allowed_ip" id="v_api_allowed_ip">
-									<?php
+								<textarea class="form-control" name="v_api_allowed_ip" id="v_api_allowed_ip"><?php
 										foreach (explode(",", $_SESSION["API_ALLOWED_IP"]) as $ip) {
 											echo trim($ip)."\n";
 										}
-									?>
-								</textarea>
+									?></textarea>
 							</div>
 						</div>
 						<h3 class="u-mt20 u-mb10">

+ 5 - 2
web/templates/pages/list_firewall_ipset.php

@@ -37,7 +37,8 @@
 	</div>
 
 	<!-- Begin firewall IP address list item loop -->
-	<?php foreach ($data as $key => $value) {
+	<?php
+	foreach ($data as $key => $value) {
  	$listname = $key; ?>
 		<div class="l-unit animate__animated animate__fadeIn">
 			<div class="l-unit__col l-unit__col--right">
@@ -75,7 +76,9 @@
 				<div class="clearfix l-unit__stat-col--left u-text-center compact-4"><?= $data[$key]["TIME"] ?></div>
 			</div>
 		</div>
-	<?php } ?>
+	<?php
+	$i++;
+} ?>
 </div>
 
 <footer class="app-footer">