Commit b5d135de authored by Franco Fichtner's avatar Franco Fichtner

www: fix more apply vs. translation foo #431

parent ae3ffb28
...@@ -216,15 +216,24 @@ EOFnp; ...@@ -216,15 +216,24 @@ EOFnp;
function print_info_box_apply($msg) function print_info_box_apply($msg)
{ {
$value = gettext('Apply changes'); $iface = !empty($_POST['if']) ? $_POST['if'] : (!empty($_GET['if']) ? $_GET['if'] : '');
$label = gettext('Apply changes');
$value = 'Apply changes';
$name= 'apply'; $name= 'apply';
$savebutton = '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post">'; $savebutton = sprintf('<form action="' . $_SERVER['REQUEST_URI'] . '" method="post">', $_SERVER['REQUEST_URI']);
$savebutton .= '<input name="' . $name . '" type="submit" class="btn btn-primary pull-right" id="' . $name . '" value="' . $value . '" />'; $savebutton .= sprintf(
if (!empty($_POST['if'])) { '<button type="submit" name="%s" id="%s" class="btn btn-primary pull-right" value="%s">%s</button>',
$savebutton .= '<input type="hidden" name="if" value="' . htmlspecialchars($_POST['if']) . '" />'; $name,
} elseif (!empty($_GET['if'])) { $name,
$savebutton .= '<input type="hidden" name="if" value="' . htmlspecialchars($_GET['if']) . '" />'; $value,
$label
);
if (!empty($iface)) {
$savebutton .= sprintf(
'<input type="hidden" name="if" value="%s"/>',
htmlspecialchars($iface)
);
} }
$savebutton .= '</form>'; $savebutton .= '</form>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment