Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
May 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 1 addition & 22 deletions lib/BridgeCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -134,7 +113,7 @@ private static function getForm($bridgeName,
}

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>';
}
Expand Down