1
0
Fork 0
forked from blallo/rss-bridge

Checking if the parameter mode has a name, same for exampleValue.

Change the default bridge name.

Signed-off-by: teromene <teromene@teromene.fr>
This commit is contained in:
teromene 2015-11-05 15:49:55 +00:00
parent ca2f6f425d
commit 2b54377148
2 changed files with 6 additions and 2 deletions

View file

@ -185,7 +185,9 @@ CARD;
foreach($bridgeElement->parameters as $parameterName => $parameter) foreach($bridgeElement->parameters as $parameterName => $parameter)
{ {
$card .= '<ol class="list-use">' . PHP_EOL; $card .= '<ol class="list-use">' . PHP_EOL;
$card .= '<h5>'.$parameterName.'</h5>' . PHP_EOL; if(!is_numeric($parameterName)) {
$card .= '<h5>'.$parameterName.'</h5>' . PHP_EOL;
}
$card .= '<form method="POST" action="?"> $card .= '<form method="POST" action="?">
<input type="hidden" name="action" value="display" /> <input type="hidden" name="action" value="display" />
<input type="hidden" name="bridge" value="' . $bridgeName . '" />' . PHP_EOL; <input type="hidden" name="bridge" value="' . $bridgeName . '" />' . PHP_EOL;
@ -194,6 +196,8 @@ CARD;
foreach($parameter as $inputEntry) { foreach($parameter as $inputEntry) {
if(!isset($inputEntry['exampleValue'])) $inputEntry['exampleValue'] = "";
$idArg = 'arg-' . $bridgeName . '-' . $parameterName . '-' . $inputEntry['identifier']; $idArg = 'arg-' . $bridgeName . '-' . $parameterName . '-' . $inputEntry['identifier'];
$card .= '<label for="' .$idArg. '">' .$inputEntry['name']. ' : </label>' . PHP_EOL; $card .= '<label for="' .$idArg. '">' .$inputEntry['name']. ' : </label>' . PHP_EOL;

View file

@ -17,7 +17,7 @@ abstract class BridgeAbstract implements BridgeInterface{
protected $cache; protected $cache;
protected $items = array(); protected $items = array();
public $name = "Bridge sans nom"; public $name = "Unnamed bridge";
public $uri = ""; public $uri = "";
public $description = 'No description provided'; public $description = 'No description provided';
public $maintainer = 'No maintainer'; public $maintainer = 'No maintainer';