From: Marcel Werk Date: Thu, 27 Apr 2023 11:32:10 +0000 (+0200) Subject: Change URL form field to `input type="url"` X-Git-Tag: 6.0.0_Alpha_1~186^2^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a08a88b97d69e7760d709170c882f16f14d54ab0;p=GitHub%2FWoltLab%2FWCF.git Change URL form field to `input type="url"` Closes #5266 --- diff --git a/com.woltlab.wcf/templates/__textFormField.tpl b/com.woltlab.wcf/templates/__textFormField.tpl index edf7555379..dfcfde60bd 100644 --- a/com.woltlab.wcf/templates/__textFormField.tpl +++ b/com.woltlab.wcf/templates/__textFormField.tpl @@ -1,4 +1,4 @@ -validateMinimumLength($text, $language); $this->validateMaximumLength($text, $language); } + + /** + * Returns the value for the `type` attribute of the input field. + * @since 6.0 + */ + public function getInputType(): string + { + return 'text'; + } } diff --git a/wcfsetup/install/files/lib/system/form/builder/field/UrlFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/UrlFormField.class.php index 288e11b710..ade83d4295 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/UrlFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/UrlFormField.class.php @@ -56,4 +56,12 @@ class UrlFormField extends TextFormField } } } + + /** + * @inheritDoc + */ + public function getInputType(): string + { + return 'url'; + } }