Put $pluginName . '_' . $this->getName() on same line
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
71ac9f7143
commit
112f02b1fa
@ -18,10 +18,9 @@ class BoolPropertyItem extends OptionsPropertyOneItem
|
||||
{
|
||||
$ret = '<li class="list-group-item">';
|
||||
$ret .= '<div class="form-check form-switch">';
|
||||
$ret .= '<input class="form-check-input" type="checkbox" role="switch" name="' . $pluginName . '_'
|
||||
. $this->getName() . '"'
|
||||
. ' value="y" id="checkbox_' . $pluginName . '_'
|
||||
. $this->getName() . '"'
|
||||
$ret .= '<input class="form-check-input" type="checkbox" role="switch" name="'
|
||||
. $pluginName . '_' . $this->getName() . '"'
|
||||
. ' value="y" id="checkbox_' . $pluginName . '_' . $this->getName() . '"'
|
||||
. ' '
|
||||
. Plugins::checkboxCheck(
|
||||
$pluginType,
|
||||
@ -39,8 +38,7 @@ class BoolPropertyItem extends OptionsPropertyOneItem
|
||||
}
|
||||
|
||||
$ret .= '>';
|
||||
$ret .= '<label class="form-check-label" for="checkbox_' . $pluginName . '_'
|
||||
. $this->getName() . '">'
|
||||
$ret .= '<label class="form-check-label" for="checkbox_' . $pluginName . '_' . $this->getName() . '">'
|
||||
. $plugin->getTranslatedText($this->getText() ?? '') . '</label></div>';
|
||||
$ret .= Plugins::getDocumentationLinkHtml($this);
|
||||
|
||||
|
||||
@ -18,8 +18,7 @@ class HiddenPropertyItem extends OptionsPropertyOneItem
|
||||
{
|
||||
public function getHtml(Plugin $plugin, PluginType $pluginType, string $pluginName): string
|
||||
{
|
||||
return '<li class="list-group-item"><input type="hidden" name="' . $pluginName . '_'
|
||||
. $this->getName() . '"'
|
||||
return '<li class="list-group-item"><input type="hidden" name="' . $pluginName . '_' . $this->getName() . '"'
|
||||
. ' value="'
|
||||
. htmlspecialchars($plugin->getTranslatedText(Plugins::getDefault(
|
||||
$pluginType,
|
||||
|
||||
@ -19,18 +19,15 @@ class NumberPropertyItem extends OptionsPropertyOneItem
|
||||
public function getHtml(Plugin $plugin, PluginType $pluginType, string $pluginName): string
|
||||
{
|
||||
$ret = '<li class="list-group-item">';
|
||||
$ret .= '<label for="number_' . $pluginName . '_'
|
||||
. $this->getName() . '" class="form-label">'
|
||||
$ret .= '<label for="number_' . $pluginName . '_' . $this->getName() . '" class="form-label">'
|
||||
. $plugin->getTranslatedText($this->getText() ?? '') . '</label>';
|
||||
$ret .= '<input class="form-control" type="number" name="' . $pluginName . '_'
|
||||
. $this->getName() . '"'
|
||||
$ret .= '<input class="form-control" type="number" name="' . $pluginName . '_' . $this->getName() . '"'
|
||||
. ' value="'
|
||||
. htmlspecialchars($plugin->getTranslatedText(Plugins::getDefault(
|
||||
$pluginType,
|
||||
$pluginName . '_' . $this->getName(),
|
||||
))) . '"'
|
||||
. ' id="number_' . $pluginName . '_'
|
||||
. $this->getName() . '"'
|
||||
. ' id="number_' . $pluginName . '_' . $this->getName() . '"'
|
||||
. ' min="0"'
|
||||
. '>';
|
||||
|
||||
|
||||
@ -26,16 +26,15 @@ class RadioPropertyItem extends OptionsPropertyOneItem
|
||||
$ret = '<li class="list-group-item">';
|
||||
|
||||
foreach ($this->getValues() as $key => $val) {
|
||||
$ret .= '<div class="form-check"><input type="radio" name="' . $pluginName
|
||||
. '_' . $this->getName() . '" class="form-check-input" value="' . $key
|
||||
. '" id="radio_' . $pluginName . '_'
|
||||
. $this->getName() . '_' . $key . '"';
|
||||
$ret .= '<div class="form-check"><input type="radio" name="' . $pluginName . '_' . $this->getName()
|
||||
. '" class="form-check-input" value="' . $key
|
||||
. '" id="radio_' . $pluginName . '_' . $this->getName() . '_' . $key . '"';
|
||||
if ($key == $default) {
|
||||
$ret .= ' checked';
|
||||
}
|
||||
|
||||
$ret .= '><label class="form-check-label" for="radio_' . $pluginName . '_'
|
||||
. $this->getName() . '_' . $key . '">'
|
||||
$ret .= '><label class="form-check-label" for="radio_'
|
||||
. $pluginName . '_' . $this->getName() . '_' . $key . '">'
|
||||
. $plugin->getTranslatedText($val) . '</label></div>';
|
||||
}
|
||||
|
||||
|
||||
@ -19,13 +19,10 @@ class SelectPropertyItem extends OptionsPropertyOneItem
|
||||
public function getHtml(Plugin $plugin, PluginType $pluginType, string $pluginName): string
|
||||
{
|
||||
$ret = '<li class="list-group-item">';
|
||||
$ret .= '<label for="select_' . $pluginName . '_'
|
||||
. $this->getName() . '" class="form-label">'
|
||||
$ret .= '<label for="select_' . $pluginName . '_' . $this->getName() . '" class="form-label">'
|
||||
. $plugin->getTranslatedText($this->getText() ?? '') . '</label>';
|
||||
$ret .= '<select class="form-select" name="' . $pluginName . '_'
|
||||
. $this->getName() . '"'
|
||||
. ' id="select_' . $pluginName . '_'
|
||||
. $this->getName() . '">';
|
||||
$ret .= '<select class="form-select" name="' . $pluginName . '_' . $this->getName() . '"'
|
||||
. ' id="select_' . $pluginName . '_' . $this->getName() . '">';
|
||||
$default = htmlspecialchars($plugin->getTranslatedText(Plugins::getDefault(
|
||||
$pluginType,
|
||||
$pluginName . '_' . $this->getName(),
|
||||
|
||||
@ -19,18 +19,15 @@ class TextPropertyItem extends OptionsPropertyOneItem
|
||||
public function getHtml(Plugin $plugin, PluginType $pluginType, string $pluginName): string
|
||||
{
|
||||
$ret = '<li class="list-group-item">';
|
||||
$ret .= '<label for="text_' . $pluginName . '_'
|
||||
. $this->getName() . '" class="form-label">'
|
||||
$ret .= '<label for="text_' . $pluginName . '_' . $this->getName() . '" class="form-label">'
|
||||
. $plugin->getTranslatedText($this->getText() ?? '') . '</label>';
|
||||
$ret .= '<input class="form-control" type="text" name="' . $pluginName . '_'
|
||||
. $this->getName() . '"'
|
||||
$ret .= '<input class="form-control" type="text" name="' . $pluginName . '_' . $this->getName() . '"'
|
||||
. ' value="'
|
||||
. htmlspecialchars($plugin->getTranslatedText(Plugins::getDefault(
|
||||
$pluginType,
|
||||
$pluginName . '_' . $this->getName(),
|
||||
))) . '"'
|
||||
. ' id="text_' . $pluginName . '_'
|
||||
. $this->getName() . '"'
|
||||
. ' id="text_' . $pluginName . '_' . $this->getName() . '"'
|
||||
. ($this->getSize() !== 0
|
||||
? ' size="' . $this->getSize() . '"'
|
||||
: '')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user