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 committed by Mitsukarenai
parent 53ac336111
commit 715ad3bf3f
2 changed files with 6 additions and 2 deletions

View file

@ -203,7 +203,9 @@ CARD;
foreach($bridgeElement->parameters as $parameterName => $parameter)
{
$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="?">
<input type="hidden" name="action" value="display" />
<input type="hidden" name="bridge" value="' . $bridgeName . '" />' . PHP_EOL;
@ -212,6 +214,8 @@ CARD;
foreach($parameter as $inputEntry) {
if(!isset($inputEntry['exampleValue'])) $inputEntry['exampleValue'] = "";
$idArg = 'arg-' . $bridgeName . '-' . $parameterName . '-' . $inputEntry['identifier'];
$card .= '<label for="' .$idArg. '">' .$inputEntry['name']. ' : </label>' . PHP_EOL;

View file

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