Project

General

Profile

« Previous | Next » 

Revision 25b82b20

Added by Steve Beaver almost 8 years ago

Fixed #7728
Revised enabled/disabled diplay to match other firewall pages

View differences:

src/usr/local/www/firewall_nat_1to1.php
136 136
$tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
137 137
$tab_array[] = array(gettext("NPt"), false, "firewall_nat_npt.php");
138 138
display_top_tabs($tab_array);
139

  
139 140
?>
140 141
<form action="firewall_nat_1to1.php" method="post">
141 142
	<div class="panel panel-default">
......
156 157
				</thead>
157 158
				<tbody class="user-entries">
158 159
<?php
159
		$textse = "</span>";
160 160
		$i = 0;
161 161
		foreach ($a_1to1 as $natent):
162 162
			if (isset($natent['disabled'])) {
163
				$textss = "<span class=\"gray\">";
164 163
				$iconfn = "pass_d";
165 164
			} else {
166
				$textss = "<span>";
167 165
				$iconfn = "pass";
168 166
			}
167

  
168
			$alias = rule_columns_with_alias(
169
			$natent['source']['address'],
170
			pprint_port($natent['source']['port']),
171
			$natent['destination']['address'],
172
			pprint_port($natrent['destination']['port'])
173
);
169 174
?>
170
					<tr id="fr<?=$i;?>" onClick="fr_toggle(<?=$i;?>)" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
175
					<tr id="fr<?=$i;?>" onClick="fr_toggle(<?=$i;?>)" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';" <?=(isset($natent['disabled']) ? ' class="disabled"' : '')?>>
171 176
						<td >
172 177
							<input type="checkbox" id="frc<?=$i;?>" onClick="fr_toggle(<?=$i;?>)" name="rule[]" value="<?=$i;?>"/>
173 178
						</td>
......
182 187
						</td>
183 188
						<td>
184 189
<?php
185
					echo $textss;
186 190
					if (!$natent['interface']) {
187 191
						echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan"));
188 192
					} else {
189 193
						echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface']));
190 194
					}
191
					echo $textse;
192 195
?>
193 196
						</td>
194 197
						<td>
195 198
<?php
196 199
					$source_net = pprint_address($natent['source']);
197 200
					$source_cidr = strstr($source_net, '/');
198
					echo $textss . $natent['external'] . $source_cidr . $textse;
201
					echo $natent['external'] . $source_cidr;
199 202
?>
200 203
						</td>
201 204
						<td>
202 205
<?php
203
					echo $textss . $source_net . $textse;
206
					echo $source_net;
204 207
?>
205 208
						</td>
206 209
						<td>
207
<?php
208
					echo $textss . pprint_address($natent['destination']) . $textse;
209
?>
210
							<?php if (isset($alias['dst'])): ?>
211
								<a href="/firewall_aliases_edit.php?id=<?=$alias['dst']?>" data-toggle="popover" data-trigger="hover focus" title="<?=gettext('Alias details')?>" data-content="<?=alias_info_popup($alias['dst'])?>" data-html="true">
212
									<?=str_replace('_', '_<wbr>', htmlspecialchars(pprint_address($natent['destination'])))?>
213
								</a>
214
							<?php else: ?>
215
								<?=htmlspecialchars(pprint_address($natent['destination']))?>
216
							<?php endif; ?>
210 217
						</td>
211 218
						<td>
212 219
<?php
213
					echo $textss . htmlspecialchars($natent['descr']) . '&nbsp;' . $textse;
220
					echo htmlspecialchars($natent['descr']) . '&nbsp;';
214 221
?>
215 222
						</td>
216 223

  

Also available in: Unified diff