diff --git a/src/AdminPanel/Form/ChoiceInput.php b/src/AdminPanel/Form/ChoiceInput.php
index ef3d551..121a1cb 100644
--- a/src/AdminPanel/Form/ChoiceInput.php
+++ b/src/AdminPanel/Form/ChoiceInput.php
@@ -12,4 +12,9 @@ class ChoiceInput extends TextInput
'choices'
);
}
+
+ public function getTemplate(): string
+ {
+ return "@AdminPanel/form/choice.twig";
+ }
}
diff --git a/src/AdminPanel/Form/DateInput.php b/src/AdminPanel/Form/DateInput.php
index 49e7b42..06edaed 100644
--- a/src/AdminPanel/Form/DateInput.php
+++ b/src/AdminPanel/Form/DateInput.php
@@ -11,4 +11,9 @@ class DateInput extends TextInput
'value',
);
}
+
+ public function getTemplate(): string
+ {
+ return "@AdminPanel/form/date.twig";
+ }
}
diff --git a/src/AdminPanel/Form/TextInput.php b/src/AdminPanel/Form/TextInput.php
index 25cd438..854458d 100644
--- a/src/AdminPanel/Form/TextInput.php
+++ b/src/AdminPanel/Form/TextInput.php
@@ -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";
}
}
diff --git a/src/AdminPanel/Twig/form/entity.twig b/src/AdminPanel/Twig/form/entity.twig
index 77020d3..2a69a71 100644
--- a/src/AdminPanel/Twig/form/entity.twig
+++ b/src/AdminPanel/Twig/form/entity.twig
@@ -4,7 +4,7 @@
{% endif %}
-
+