From 3ca2f030e7a6555b22b74b644fff69391603a199 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Mon, 15 Aug 2016 02:21:07 +0200 Subject: [PATCH] [HTMLUtils] Add common function for form header --- lib/HTMLUtils.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/HTMLUtils.php b/lib/HTMLUtils.php index 5742117..674d067 100644 --- a/lib/HTMLUtils.php +++ b/lib/HTMLUtils.php @@ -40,11 +40,7 @@ CARD; // If we don't have any parameter for the bridge, we print a generic form to load it. if(count($bridgeElement->parameters) == 0) { - $card .= << - - -CARD; + $card .= HTMLUtils::getFormHeader($bridgeName); if ($isActive){ $card .= HTMLUtils::getHelperButtonsFormat($formats); @@ -72,11 +68,7 @@ CARD; if(!is_numeric($parameterName)) $card .= '
' . $parameterName . '
' . PHP_EOL; - $card .= << - - -CARD; + $card .= HTMLUtils::getFormHeader($bridgeName); foreach($parameter as $inputEntry) { $additionalInfoString = ''; @@ -128,6 +120,14 @@ CARD; return $card; } + + private static function getFormHeader($bridge){ + return << + + +EOD; + } } class HTMLSanitizer {