mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[BridgeCard] Make HTML default, remove other buttons (#2101)
This commit is contained in:
parent
378f78d6eb
commit
63ebf5ceec
@ -20,27 +20,6 @@
|
|||||||
* @todo Return error if a caller creates an object of this class.
|
* @todo Return error if a caller creates an object of this class.
|
||||||
*/
|
*/
|
||||||
final class BridgeCard {
|
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
|
* 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) {
|
if($isActive) {
|
||||||
$form .= self::buildFormatButtons($formats);
|
$form .= '<button type="submit" name="format" value="Html">Generate feed</button>';
|
||||||
} else {
|
} else {
|
||||||
$form .= '<span style="font-weight: bold;">Inactive</span>';
|
$form .= '<span style="font-weight: bold;">Inactive</span>';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user