Articles: finish admin refactor, uploads hardening, and attachment sorting (0.262)

This commit is contained in:
2026-02-13 09:00:24 +01:00
parent e984548516
commit 3e1f417ef3
31 changed files with 1951 additions and 1512 deletions

View File

@@ -29,6 +29,7 @@ class FormField
// Specyficzne dla lang_section
public ?array $langFields;
public ?string $langSectionParentTab;
public ?string $customHtml;
/**
* @param string $name Nazwa pola (name)
@@ -64,7 +65,8 @@ class FormField
string $editorToolbar = 'MyTool',
int $editorHeight = 300,
?array $langFields = null,
?string $langSectionParentTab = null
?string $langSectionParentTab = null,
?string $customHtml = null
) {
$this->name = $name;
$this->type = $type;
@@ -82,6 +84,7 @@ class FormField
$this->editorHeight = $editorHeight;
$this->langFields = $langFields;
$this->langSectionParentTab = $langSectionParentTab;
$this->customHtml = $customHtml;
$this->id = $attributes['id'] ?? $name;
}
@@ -276,6 +279,29 @@ class FormField
);
}
public static function custom(string $name, string $html, array $config = []): self
{
return new self(
$name,
FormFieldType::CUSTOM,
$config['label'] ?? '',
null,
$config['tab'] ?? 'default',
false,
$config['attributes'] ?? [],
[],
null,
null,
false,
null,
'MyTool',
300,
null,
null,
$html
);
}
/**
* Sekcja językowa - grupa pól powtarzana dla każdego języka
*

View File

@@ -20,4 +20,5 @@ class FormFieldType
public const FILE = 'file';
public const HIDDEN = 'hidden';
public const LANG_SECTION = 'lang_section';
public const CUSTOM = 'custom';
}