Update persist_form.php

This commit is contained in:
FusionPBX 2018-06-29 20:02:00 -06:00 committed by GitHub
parent c011fcbb90
commit dd8c6bb3d3
1 changed files with 3 additions and 3 deletions

View File

@ -27,15 +27,15 @@
function persistform($form_array) {
// Remember Form Input Values
if (is_array($form_array)) {
$content .= "<form method='post' action='".$_SERVER["HTTP_REFERER"]."' target='_self'>\n";
$content .= "<form method='post' action='".escape($_SERVER["HTTP_REFERER"])."' target='_self'>\n";
foreach ($form_array as $key => $val) {
if ($key == "XID" || $key == "ACT" || $key == "RET") continue;
if ($key != "persistform") { //clears the persistform value
$content .= "<input type='hidden' name='".escape($key)."' value='".escape($val)."' />\n";
}
}
$content .= "<input type='hidden' name='persistform' value='1' />\n"; //sets persistform to yes
$content .= "<input class='btn' type='submit' value='Back' />\n";
$content .= " <input type='hidden' name='persistform' value='1' />\n"; //sets persistform to yes
$content .= " <input class='btn' type='submit' value='Back' />\n";
$content .= "</form>\n";
}
return $content;