Commits
Martins Talbergs authored 19ce6826332
..F....... [ZBXNEXT-7689] added topitems widget edit forms - Decision record: - Field name usage is linked via constant values - easy to look up references. - Each modal view has it's own class, all client code is controlled there - no `js.php` is used and no php-component generated js-scripts are used. - Modal class has API that is controlled via method calls expressed in corresponding view. It is strived to pass in less parameters - ideally, only field name. - For submodal, items field is transferred in JSON form for convenience and validated as a whole field (allows to validate field elements in context of a set, once needed). - Html components reused from existing field views, ensuring consistent widget html. - View factory layer either proxies to standart components or gives developer control over custom field views. - Many of these decisions are influenced due to CWidgetForm being to opinionated in handling sumbodal views via `addField` method. - Known issues: - Time period component validation rules depend on field value resulting in ambiguous type. - js-api calls in view should only primarily pass field name and component data shall utilize `data-` HTML attribute.