[BridgeCard] Make HTML default, remove other buttons (#2101)

This commit is contained in:
Bockiii 2021-05-08 12:10:16 +02:00 committed by GitHub
parent 378f78d6eb
commit 63ebf5ceec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,27 +20,6 @@
* @todo Return error if a caller creates an object of this class.
*/
final class BridgeCard {
/**
* Build a HTML document string of buttons for each of the provided formats
*
* @param array $formats A list of format names
* @return string The document string
*/
private static function buildFormatButtons($formats) {
$buttons = '';
foreach($formats as $name) {
$buttons .= '<button type="submit" name="format" value="'
. $name
. '">'
. $name
. '</button>'
. PHP_EOL;
}
return $buttons;
}
/**
* Get the form header for a bridge card
*
@ -134,7 +113,7 @@ This bridge is not fetching its content through a secure connection</div>';
}
if($isActive) {
$form .= self::buildFormatButtons($formats);
$form .= '<button type="submit" name="format" value="Html">Generate feed</button>';
} else {
$form .= '<span style="font-weight: bold;">Inactive</span>';
}