use wcf\system\option\IOptionHandler;
use wcf\system\option\IOptionType;
use wcf\system\option\ISelectOptionOptionType;
+use wcf\system\option\TextOptionType;
use wcf\system\Regex;
use wcf\system\WCF;
use wcf\util\DirectoryUtil;
*/
public $i18nOptionTypes = [];
+ /**
+ * list of option types with i18n support extending `TextOptionType`
+ * (in addition to `text`)
+ * @var string[]
+ */
+ public $textOptionTypes = ['text'];
+
/**
* list of option types with a pre-defined list of options via `selectOptions`
* @var string[]
$this->selectOptionOptionTypes[] = $optionType;
}
+ if (is_subclass_of($classname, TextOptionType::class)) {
+ $this->textOptionTypes[] = $optionType;
+ }
+
$options[] = $optionType;
}
}
->field($optionType)
->values(['select'])
),
+
+ BooleanFormField::create('disableAutocomplete')
+ ->label('wcf.acp.pip.abstractOption.options.optionType.text.disableAutocomplete')
+ ->description('wcf.acp.pip.abstractOption.options.optionType.text.disableAutocomplete.description')
+ ->addDependency(
+ ValueFormFieldDependency::create('optionType')
+ ->field($optionType)
+ ->values($this->textOptionTypes)
+ )
]);
break;
'maxlength',
'issortable',
'allowemptyvalue',
+ 'disableAutocomplete'
];
foreach ($optionals as $optionalPropertyName) {
'suffix' => '',
'minlength' => null,
'maxlength' => null,
- 'issortable' => false,
- 'allowemptyvalue' => false
+ 'issortable' => 0,
+ 'allowemptyvalue' => 0,
+ 'disableAutocomplete' => 0
];
foreach ($fields as $field => $defaultValue) {
if (isset($formData[$field]) && $formData[$field] !== $defaultValue) {
<item name="wcf.acp.pip.objectType.com.woltlab.wcf.user.recentActivityEvent.supportsReactions"><![CDATA[Supports Reactions]]></item>
<item name="wcf.acp.pip.objectType.com.woltlab.wcf.user.recentActivityEvent.supportsReactions.description"><![CDATA[TODO]]></item>
<item name="wcf.acp.pip.objectType.com.woltlab.wcf.user.recentActivityEvent.data.title"><![CDATA[Recent Activity Event Data]]></item>
+ <item name="wcf.acp.pip.abstractOption.options.optionType.text.disableAutocomplete"><![CDATA[Disable Autocomplete]]></item>
+ <item name="wcf.acp.pip.abstractOption.options.optionType.text.disableAutocomplete.description"><![CDATA[Disables the browser’s autocomplete support for the input field.]]></item>
</category>
<category name="wcf.acp.reactionType">