mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-22 19:02:12 +00:00
Updated Inputs
This commit is contained in:
parent
ee266e719f
commit
28de4669fe
@ -12,4 +12,9 @@ class ChoiceInput extends TextInput
|
||||
'choices'
|
||||
);
|
||||
}
|
||||
|
||||
public function getTemplate(): string
|
||||
{
|
||||
return "@AdminPanel/form/choice.twig";
|
||||
}
|
||||
}
|
||||
|
@ -11,4 +11,9 @@ class DateInput extends TextInput
|
||||
'value',
|
||||
);
|
||||
}
|
||||
|
||||
public function getTemplate(): string
|
||||
{
|
||||
return "@AdminPanel/form/date.twig";
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,13 @@ class TextInput implements Input
|
||||
|
||||
public function getTemplate(): string
|
||||
{
|
||||
return "@AdminPanel/form/text.twig";
|
||||
$tpName = strtolower(
|
||||
str_replace(
|
||||
"Input",
|
||||
"",
|
||||
str_split('\\', self::class)[1]
|
||||
)
|
||||
);
|
||||
return "@AdminPanel/form/" . $tpName . ".twig";
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<label for="{{name}}">{{label}}</label>
|
||||
{% endif %}
|
||||
|
||||
<input type="text" name="{{name}}" id="{{name}}" list="{{name}}_list" {% for index, item in attr %}{{index}}="{{item}}" {% endfor %}/>
|
||||
<input type="text" name="{{name}}" id="{{name}}" list="{{name}}_list" {% for index, item in attr %}{{index}}="{{item}}" {% endfor %}/>
|
||||
<datalist id="{{name}}_list">
|
||||
{% for entity in entities %}
|
||||
<option>{{entity.name}}</option>
|
||||
|
Loading…
x
Reference in New Issue
Block a user