Project

General

Profile

Download (19.3 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
 * pkg.php
4
 *
5
 * part of pfSense (https://www.pfsense.org)
6
 * Copyright (c) 2004-2013 BSD Perimeter
7
 * Copyright (c) 2013-2016 Electric Sheep Fencing
8
 * Copyright (c) 2014-2024 Rubicon Communications, LLC (Netgate)
9
 * All rights reserved.
10
 *
11
 * Licensed under the Apache License, Version 2.0 (the "License");
12
 * you may not use this file except in compliance with the License.
13
 * You may obtain a copy of the License at
14
 *
15
 * http://www.apache.org/licenses/LICENSE-2.0
16
 *
17
 * Unless required by applicable law or agreed to in writing, software
18
 * distributed under the License is distributed on an "AS IS" BASIS,
19
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
 * See the License for the specific language governing permissions and
21
 * limitations under the License.
22
 */
23

    
24
##|+PRIV
25
##|*IDENT=page-package-settings
26
##|*NAME=Package: Settings
27
##|*DESCR=Allow access to the 'Package: Settings' page.
28
##|*MATCH=pkg.php*
29
##|-PRIV
30

    
31
require_once("guiconfig.inc");
32
require_once("pkg-utils.inc");
33

    
34
function domTT_title($title_msg) {
35
	print "onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\" onmouseover=\"domTT_activate(this, event, 'content', '".gettext($title_msg)."', 'trail', true, 'delay', 0, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle');\"";
36
}
37

    
38
$xml = $_REQUEST['xml'];
39

    
40
if ($xml == "") {
41
	$pgtitle = array(gettext("Package"), gettext("Editor"));
42
	$pglinks = array("", "@self");
43
	include("head.inc");
44
	print_info_box(gettext("No valid package defined."), 'danger', false);
45
	include("foot.inc");
46
	exit;
47
} else {
48
	$pkg_xml_prefix = "/usr/local/pkg/";
49
	$pkg_full_path = "{$pkg_xml_prefix}/{$xml}";
50
	$pkg_realpath = realpath($pkg_full_path);
51
	if (empty($pkg_realpath)) {
52
		$path_error = sprintf(gettext("Package path %s not found."), htmlspecialchars($pkg_full_path));
53
	} else if (substr_compare($pkg_realpath, $pkg_xml_prefix, 0, strlen($pkg_xml_prefix))) {
54
		$path_error = sprintf(gettext("Invalid path %s specified."), htmlspecialchars($pkg_full_path));
55
	}
56

    
57
	if (!empty($path_error)) {
58
		include("head.inc");
59
		print_info_box($path_error . "<br />" . gettext("Try reinstalling the package."), 'danger', false);
60
		include("foot.inc");
61
		die;
62
	}
63

    
64
	if (file_exists($pkg_full_path)) {
65
		$pkg = parse_xml_config_pkg($pkg_full_path, "packagegui");
66
	} else {
67
		include("head.inc");
68
		print_info_box(sprintf(gettext("File not found %s."), htmlspecialchars($xml)), 'danger', false);
69
		include("foot.inc");
70
		exit;
71
	}
72
}
73

    
74
if ($pkg['donotsave'] != "") {
75
	header("Location: pkg_edit.php?xml=" . $xml);
76
	exit;
77
}
78

    
79
if ($pkg['include_file'] != "") {
80
	require_once($pkg['include_file']);
81
}
82

    
83
if ($_REQUEST['startdisplayingat']) {
84
	$startdisplayingat = $_REQUEST['startdisplayingat'];
85
}
86

    
87
if ($_REQUEST['display_maximum_rows']) {
88
	if ($_REQUEST['display_maximum_rows']) {
89
		$display_maximum_rows = $_REQUEST['display_maximum_rows'];
90
	}
91
}
92

    
93
$pkg_config_path = sprintf('installedpackages/%s', xml_safe_fieldname($pkg['name']));
94

    
95
$evaledvar = config_get_path("{$pkg_config_path}/config", []);
96

    
97
if ($_POST['act'] == "update") {
98

    
99
	if (is_array(config_get_path($pkg_config_path)) && $pkg['name'] != "" && $_POST['ids'] !="") {
100
		// get current values
101
		$current_values = config_get_path("{$pkg_config_path}/config", []);
102
		// get updated ids
103
		parse_str($_POST['ids'], $update_list);
104
		// sort ids to know what to change
105
		// useful to do not lose data when using sorting and paging
106
		$sort_list=$update_list['ids'];
107
		sort($sort_list);
108
		// apply updates
109
		foreach ($update_list['ids'] as $key=> $value) {
110
			config_set_path("{$pkg_config_path}/config/{$sort_list[$key]}", $current_values[$update_list['ids'][$key]]);
111
		}
112
		// save current config
113
		write_config(gettext("Package configuration changes saved from package settings page."));
114
		// sync package
115
		eval ("{$pkg['custom_php_resync_config_command']}");
116
	}
117
	// function called via jquery, no need to continue after save changes.
118
	exit;
119
}
120
if ($_REQUEST['act'] == "del") {
121
	// loop through our fieldnames and automatically setup the fieldnames
122
	// in the environment.	ie: a fieldname of username with a value of
123
	// testuser would automatically eval $username = "testuser";
124
	foreach ($evaledvar as $ip) {
125
		if ($pkg['adddeleteeditpagefields']['columnitem']) {
126
			foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
127
				${xml_safe_fieldname($column['fielddescr'])} = $ip[xml_safe_fieldname($column['fieldname'])];
128
			}
129
		}
130
	}
131

    
132
	if (config_get_path("{$pkg_config_path}/config/{$_REQUEST['id']}")) {
133
		config_del_path("{$pkg_config_path}/config/{$_REQUEST['id']}");
134
		write_config(gettext("Package configuration item deleted from package settings page."));
135
		if ($pkg['custom_delete_php_command'] != "") {
136
			if ($pkg['custom_php_command_before_form'] != "") {
137
				eval($pkg['custom_php_command_before_form']);
138
			}
139
			eval($pkg['custom_delete_php_command']);
140
		}
141
		header("Location:  pkg.php?xml=" . $xml);
142
		exit;
143
	}
144
}
145

    
146
ob_start();
147

    
148
$iflist = get_configured_interface_with_descr(true);
149
$evaledvar = config_get_path("{$pkg_config_path}/config", []);
150

    
151
if ($pkg['custom_php_global_functions'] != "") {
152
	eval($pkg['custom_php_global_functions']);
153
}
154

    
155
if ($pkg['custom_php_command_before_form'] != "") {
156
	eval($pkg['custom_php_command_before_form']);
157
}
158

    
159
// Breadcrumb
160
if ($pkg['title'] != "") {
161
	/*if (!$only_edit) {						// Is any package still making use of this?? Is this something that is still wanted, considering the breadcrumb policy https://redmine.pfsense.org/issues/5527
162
 		$pkg['title'] = $pkg['title'] . '/Edit';		// If this needs to live on, then it has to be moved to run AFTER "foreach ($pkg['tabs']['tab'] as $tab)"-loop. This due to $pgtitle[] = $tab['text'];
163
	}*/
164
	if (strpos($pkg['title'], '/')) {
165
		$title = explode('/', $pkg['title']);
166

    
167
		foreach ($title as $subtitle) {
168
			$pgtitle[] = gettext($subtitle);
169
			$pglinks[] = "@self";
170
		}
171
	} else {
172
		$pgtitle = array(gettext("Package"), gettext($pkg['title']));
173
		$pglinks = array("", "@self");
174
	}
175
} else {
176
	$pgtitle = array(gettext("Package"), gettext("Editor"));
177
	$pglinks = array("", "@self");
178
}
179

    
180
if ($pkg['tabs'] != "") {
181
	$tab_array = array();
182
	foreach ($pkg['tabs']['tab'] as $tab) {
183
		if ($tab['tab_level']) {
184
			$tab_level = $tab['tab_level'];
185
		} else {
186
			$tab_level = 1;
187
		}
188
		if (isset($tab['active'])) {
189
			$active = true;
190
			$pgtitle[] = $tab['text'];
191
			$pglinks[] = "@self";
192
		} else {
193
			$active = false;
194
		}
195
		$urltmp = "";
196
		if ($tab['url'] != "") {
197
			$urltmp = $tab['url'];
198
		}
199
		if ($tab['xml'] != "") {
200
			$urltmp = "pkg_edit.php?xml=" . $tab['xml'];
201
		}
202

    
203
		$addresswithport = getenv("HTTP_HOST");
204
		$colonpos = strpos($addresswithport, ":");
205
		if ($colonpos !== False) {
206
			//my url is actually just the IP address of the pfsense box
207
			$myurl = substr($addresswithport, 0, $colonpos);
208
		} else {
209
			$myurl = $addresswithport;
210
		}
211
		// eval url so that above $myurl item can be processed if need be.
212
		$url = str_replace('$myurl', $myurl, $urltmp);
213

    
214
		$tab_array[$tab_level][] = array(
215
			$tab['text'],
216
			$active,
217
			$url
218
		);
219
	}
220

    
221
	ksort($tab_array);
222
}
223

    
224
if (!empty($pkg['tabs'])) {
225
	$shortcut_section = $pkg['shortcut_section'];
226
}
227

    
228
include("head.inc");
229
if (isset($tab_array)) {
230
	foreach ($tab_array as $tab) {
231
		display_top_tabs($tab);
232
	}
233
}
234

    
235
?>
236

    
237
<script type="text/javascript">
238
//<![CDATA[
239
events.push(function() {
240

    
241
	function setFilter(filtertext) {
242
		$('#pkg_filter').val(filtertext);
243
		document.pkgform.submit();
244
	}
245

    
246
<?php
247
	if ($pkg['adddeleteeditpagefields']['movable']) {
248
?>
249
		$('#mainarea table tbody').sortable({
250
		items: 'tr.sortable',
251
			cursor: 'move',
252
			distance: 10,
253
			opacity: 0.8,
254
			helper: function(e, ui) {
255
				ui.children().each(function() {
256
					$(this).width($(this).width());
257
				});
258
			return ui;
259
			},
260
		});
261
<?php
262
	}
263
?>
264
});
265

    
266
function save_changes_to_xml(xml) {
267
	var ids = $('#mainarea table tbody').sortable('serialize', {key:"ids[]"});
268
	var strloading="<?=gettext('Saving changes...')?>";
269
	if (confirm("<?=gettext("Confirmation Required to save changes.")?>")) {
270
		$.ajax({
271
			type: 'post',
272
			cache: false,
273
			url: "<?=$_SERVER['SCRIPT_NAME']?>",
274
			data: {xml:'<?=$xml?>', act:'update', ids: ids},
275
			beforeSend: function() {
276
				$('#savemsg').empty().html(strloading);
277
			},
278
			error: function(data) {
279
				$('#savemsg').empty().html('Error:' + data);
280
			},
281
			success: function(data) {
282
				$('#savemsg').empty().html(data);
283
			}
284
		});
285
	}
286
}
287

    
288
//]]>
289
</script>
290

    
291
<?php
292
if ($_REQUEST['savemsg'] != "") {
293
	$savemsg = htmlspecialchars($_REQUEST['savemsg']);
294
}
295

    
296
if ($savemsg) {
297
	print_info_box($savemsg, 'success');
298
}
299
?>
300

    
301
<form action="pkg.php" name="pkgform" method="get">
302
	<input type='hidden' name='xml' value='<?=$_REQUEST['xml']?>' />
303
		<div id="mainarea" class="panel panel-default">
304
			<table id="mainarea" class="table table-striped table-hover table-condensed">
305
				<thead>
306
<?php
307
	/* Handle filtering bar A-Z */
308
	$include_filtering_inputbox = false;
309
	$colspan = 0;
310
	if ($pkg['adddeleteeditpagefields']['columnitem'] != "") {
311
		foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
312
			$colspan++;
313
		}
314
	}
315
	if ($pkg['fields']['field']) {
316
		// First find the sorting type field if it exists
317
		foreach ($pkg['fields']['field'] as $field) {
318
			if ($field['type'] == "sorting") {
319
				if (isset($field['include_filtering_inputbox'])) {
320
					$include_filtering_inputbox = true;
321
				}
322
				if ($display_maximum_rows < 1) {
323
					if ($field['display_maximum_rows']) {
324
						$display_maximum_rows = $field['display_maximum_rows'];
325
					}
326
				}
327
				echo "<tr><td colspan='$colspan' class='text-center'>";
328
				echo gettext("Filter by: ");
329
				$isfirst = true;
330
				for ($char = 65; $char < 91; $char++) {
331
					if (!$isfirst) {
332
						echo " | ";
333
					}
334
					echo "<a href=\"#\" onclick=\"setFilter('" . chr($char) . "');\">" . chr($char) . "</a>";
335
					$isfirst = false;
336
				}
337
				echo "</td></tr>";
338
				echo "<tr><td colspan='$colspan' class='text-center'>";
339
				if ($field['sortablefields']) {
340
					echo gettext("Filter field: ") . "<select name='pkg_filter_type'>";
341
					foreach ($field['sortablefields']['item'] as $si) {
342
						if ($si['name'] == $_REQUEST['pkg_filter_type']) {
343
							$SELECTED = "selected";
344
						} else {
345
							$SELECTED = "";
346
						}
347
						echo "<option value='{$si['name']}' {$SELECTED}>{$si['name']}</option>";
348
					}
349
					echo "</select>";
350
				}
351
				if ($include_filtering_inputbox) {
352
					echo '&nbsp;&nbsp;' . gettext("Filter text: ") . '<input id="pkg_filter" name="pkg_filter" value="' . htmlspecialchars($_REQUEST['pkg_filter']) . '" />';
353
					echo '&nbsp;<button type="submit" value="Filter" class="btn btn-primary btn-xs">';
354
					echo '<i class="fa-solid fa-filter icon-embed-btn"></i>';
355
					echo gettext("Filter");
356
					echo "</button>";
357
				}
358
				echo "</td></tr><tr><td><font size='-3'>&nbsp;</font></td></tr>";
359
			}
360
		}
361
	}
362
?>
363
				<tr>
364

    
365
<?php
366
	if ($display_maximum_rows) {
367
		$totalpages = ceil(round((count($evaledvar) / $display_maximum_rows), 9));
368
		$page = 1;
369
		$tmpcount = 0;
370
		$tmppp = 0;
371
		if (is_array($evaledvar)) {
372
			foreach ($evaledvar as $ipa) {
373
				if ($tmpcount == $display_maximum_rows) {
374
					$page++;
375
					$tmpcount = 0;
376
				}
377
				if ($tmppp == $startdisplayingat) {
378
					break;
379
				}
380
				$tmpcount++;
381
				$tmppp++;
382
			}
383
		}
384
		echo "<tr><th colspan='" . count($pkg['adddeleteeditpagefields']['columnitem']) . "'>";
385
		echo "<table width='100%' summary=''>";
386
		echo "<tr>";
387
		echo "<td class='text-left'>" . sprintf(gettext('Displaying page %1$s of %2$s'), $page, $totalpages) . "</b></td>";
388
		echo "<td class='text-right'>" . gettext("Rows per page: ") . "<select onchange='document.pkgform.submit();' name='display_maximum_rows'>";
389
		for ($x = 0; $x < 250; $x++) {
390
			if ($x == $display_maximum_rows) {
391
				$SELECTED = "selected";
392
			} else {
393
				$SELECTED = "";
394
			}
395
			echo "<option value='$x' $SELECTED>$x</option>\n";
396
			$x = $x + 4;
397
		}
398
		echo "</select></td></tr>";
399
		echo "</table>";
400
		echo "</th></tr>";
401
	}
402

    
403
	$cols = 0;
404
	if ($pkg['adddeleteeditpagefields']['columnitem'] != "") {
405
		foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
406
			echo "<th class=\"listhdrr\">" . $column['fielddescr'] . "</th>";
407
			$cols++;
408
		}
409
	}
410
?>
411
				</tr>
412
				</thead>
413
				<tbody>
414
<?php
415
	$i = 0;
416
	$pagination_counter = 0;
417
	if ($evaledvar && is_array($evaledvar)) {
418
		foreach ($evaledvar as $ip) {
419
			if ($startdisplayingat) {
420
				if ($i < $startdisplayingat) {
421
					$i++;
422
					continue;
423
				}
424
			}
425
			if ($_REQUEST['pkg_filter']) {
426
				// Handle filtered items
427
				if ($pkg['fields']['field'] && !$filter_regex) {
428
					// First find the sorting type field if it exists
429
					foreach ($pkg['fields']['field'] as $field) {
430
						if ($field['type'] == "sorting") {
431
							if ($field['sortablefields']['item']) {
432
								foreach ($field['sortablefields']['item'] as $sf) {
433
									if ($sf['name'] == $_REQUEST['pkg_filter_type']) {
434
										$filter_fieldname = $sf['fieldname'];
435
										#Use a default regex on sortable fields when none is declared
436
										$pkg_filter = cleanup_regex_pattern(htmlspecialchars(strip_tags($_REQUEST['pkg_filter'])));
437
										if ($sf['regex']) {
438
											$filter_regex = str_replace("%FILTERTEXT%", $pkg_filter, trim($sf['regex']));
439
										} else {
440
											$filter_regex = "/{$pkg_filter}/i";
441
										}
442
									}
443
								}
444
							}
445
						}
446
					}
447
				}
448
				// Do we have something to filter on?
449
				unset($filter_matches);
450
				if ($pkg['adddeleteeditpagefields']['columnitem'] != "") {
451
					foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
452
						$fieldname = $ip[xml_safe_fieldname($column['fieldname'])];
453
						if ($column['fieldname'] == $filter_fieldname) {
454
							if ($filter_regex) {
455
								preg_match($filter_regex, $fieldname, $filter_matches);
456
								break;
457
							}
458
						}
459
					}
460
				}
461
				if (!$filter_matches) {
462
					$i++;
463
					continue;
464
				}
465
			}
466
			if ($pkg['adddeleteeditpagefields']['movable']) {
467
				echo "<tr style=\"vertical-align: top\" class=\"sortable\" id=\"id_{$i}\">\n";
468
			} else {
469
				echo "<tr style=\"vertical-align: top\">\n";
470
			}
471
			if ($pkg['adddeleteeditpagefields']['columnitem'] != "") {
472
				foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
473
					if ($column['fieldname'] == "description") {
474
						$class = "listbg";
475
					} else {
476
						$class = "listlr";
477
					}
478
?>
479
					<td class="<?=$class?>" ondblclick="document.location='pkg_edit.php?xml=<?=$xml?>&amp;act=edit&amp;id=<?=$i?>';">
480
<?php
481
					$fieldname = $ip[xml_safe_fieldname($column['fieldname'])];
482
					#Check if columnitem has a type field declared
483
					if ($column['type'] == "checkbox") {
484
						if ($fieldname == "") {
485
							echo gettext("No");
486
						} else {
487
							echo gettext("Yes");
488
						}
489
					} else if ($column['type'] == "interface") {
490
						echo $column['prefix'] . $iflist[$fieldname] . $column['suffix'];
491
					} else {
492
						$display_text = "";
493
						#Check if columnitem has an encoding field declared
494
						if ($column['encoding'] == "base64") {
495
							$display_text = $column['prefix'] . base64_decode($fieldname) . $column['suffix'];
496
						#Check if there is a custom info to show when $fieldname is not empty
497
						} else if ($column['listmodeon'] && $fieldname != "") {
498
							$display_text = $column['prefix'] . gettext($column['listmodeon']). $column['suffix'];
499
						#Check if there is a custom info to show when $fieldname is empty
500
						} else if ($column['listmodeoff'] && $fieldname == "") {
501
							$display_text = $column['prefix'] .gettext($column['listmodeoff']). $column['suffix'];
502
						} else {
503
							$display_text = $column['prefix'] . $fieldname ." ". $column['suffix'];
504
						}
505
						if (!isset($column['allow_html'])) {
506
							$display_text = htmlspecialchars($display_text);
507
						}
508
						echo $display_text;
509
					}
510
?>
511
					</td>
512
<?php
513
				} // foreach columnitem
514
			} // if columnitem
515
?>
516
					<td style="vertical-align: middle" class="list text-nowrap">
517
						<table border="0" cellspacing="0" cellpadding="1" summary="icons">
518
							<tr>
519
<?php
520
			#Show custom description to edit button if defined
521
			$edit_msg=($pkg['adddeleteeditpagefields']['edittext']?$pkg['adddeleteeditpagefields']['edittext']:gettext("Edit this item"));
522
?>
523
								<td><a class="fa-solid fa-pencil" href="pkg_edit.php?xml=<?=$xml?>&amp;act=edit&amp;id=<?=$i?>" title="<?=$edit_msg?>"></a></td>
524
<?php
525
			#Show custom description to delete button if defined
526
			$delete_msg=($pkg['adddeleteeditpagefields']['deletetext']?$pkg['adddeleteeditpagefields']['deletetext']:gettext("Delete this item"));
527
?>
528
								<td>&nbsp;<a class="fa-solid fa-trash-can" href="pkg.php?xml=<?=$xml?>&amp;act=del&amp;id=<?=$i?>" title="<?=$delete_msg?>"></a></td>
529
							</tr>
530
						</tbody>
531
					</table>
532
				</td>
533
<?php
534
			echo "</tr>\n"; // Pairs with an echo tr some way above
535
			// Handle pagination and display_maximum_rows
536
			if ($display_maximum_rows) {
537
				if ($pagination_counter == ($display_maximum_rows-1) or
538
					$i == (count($evaledvar)-1)) {
539
					$colcount = count($pkg['adddeleteeditpagefields']['columnitem']);
540
					$final_footer = "";
541
					$final_footer .= "<tr><td colspan='$colcount'>";
542
					$final_footer .= "<table width='100%' summary=''><tr>";
543
					$final_footer .= "<td class='text-left'>";
544
					$startingat = $startdisplayingat - $display_maximum_rows;
545
					if ($startingat > -1) {
546
						$final_footer .= "<a href='pkg.php?xml=" . $_REQUEST['xml'] . "&amp;startdisplayingat={$startingat}&amp;display_maximum_rows={$display_maximum_rows}'>";
547
					} else if ($startdisplayingat > 1) {
548
						$final_footer .= "<a href='pkg.php?xml=" . $_REQUEST['xml'] . "&amp;startdisplayingat=0&amp;display_maximum_rows={$display_maximum_rows}'>";
549
					}
550
					$final_footer .= "<font size='2'><< " . gettext("Previous page") . "</font></a>";
551
					if ($tmppp + $display_maximum_rows > count($evaledvar)) {
552
						$endingrecord = count($evaledvar);
553
					} else {
554
						$endingrecord = $tmppp + $display_maximum_rows;
555
					}
556
					$final_footer .= "</td><td class='text-center'>";
557
					$tmppp++;
558
					$final_footer .= "<font size='2'>Displaying {$tmppp} - {$endingrecord} / " . count($evaledvar) . " records";
559
					$final_footer .= "</font></td><td class='text-right'>&nbsp;";
560
					if (($i+1) < count($evaledvar)) {
561
						$final_footer .= "<a href='pkg.php?xml=" . $_REQUEST['xml'] . "&amp;startdisplayingat=" . ($startdisplayingat + $display_maximum_rows) . "&amp;display_maximum_rows={$display_maximum_rows}'>";
562
					}
563
					$final_footer .= "<font size='2'>" . gettext("Next page") . " >></font></a>";
564
					$final_footer .= "</td></tr></table></td></tr>";
565
					$i = count($evaledvar);
566
					break;
567
				}
568
			}
569
			$i++;
570
			$pagination_counter++;
571
		} // foreach evaledvar
572
	} // if evaledvar
573
?>
574
				<tr>
575
					<td colspan="<?=$cols?>"></td>
576
					<td>
577
						<table border="0" cellspacing="0" cellpadding="1" summary="icons">
578
							<tr>
579
<?php
580
	#Show custom description to add button if defined
581
	$add_msg=($pkg['adddeleteeditpagefields']['addtext']?$pkg['adddeleteeditpagefields']['addtext']:gettext("Add a new item"));
582
?>
583
								<td><a href="pkg_edit.php?xml=<?=$xml?>&amp;id=<?=$i?>" class="btn btn-sm btn-success" title="<?=$add_msg?>"><i class="fa-solid fa-plus icon-embed-btn"></i><?=gettext('Add')?></a></td>
584
<?php
585
	#Show description button and info if defined
586
	if ($pkg['adddeleteeditpagefields']['description']) {
587
?>
588
								<td>
589
									<i class="fa-solid fa-info-circle"><?=$pkg['adddeleteeditpagefields']['description']?></i>
590
								</td>
591
<?php
592
	}
593
?>
594
							</tr>
595
						</table>
596
					</td>
597
				</tr>
598
				<?=$final_footer?>
599
			</table>
600
			</div>
601
		<button class="btn btn-primary" type="button" value="Save" name="Submit" onclick="save_changes_to_xml('<?=$xml?>')"><i class="fa-solid fa-save icon-embed-btn"></i><?=gettext("Save")?></button>
602

    
603
</form>
604
<?php
605
include("foot.inc"); ?>
(96-96/232)