<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">fpt_mockshopbrand_brand_form.fpt_mockshopbrand_brand_form_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Staff Information</item>
<item name="template" xsi:type="string">templates/form/collapsible</item>
</argument>
<settings>
<buttons>
<button name="save" class="Isobar\Bai22\Block\Adminhtml\Index\Edit\SaveButton"/>
<button name="delete" class="Isobar\Bai22\Block\Adminhtml\Index\Edit\DeleteButton"/>
<button name="back" class="Isobar\Bai22\Block\Adminhtml\Index\Edit\BackButton"/>
</buttons>
<namespace>fpt_mockshopbrand_brand_form</namespace>
<dataScope>data</dataScope>
<deps>
<dep>fpt_mockshopbrand_brand_form.fpt_mockshopbrand_brand_form_data_source</dep>
</deps>
</settings>
<dataSource name="fpt_mockshopbrand_brand_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<settings>
<submitUrl path="staff/index/save"/>
</settings>
<dataProvider class="Fpt\Mockshopbrand\Model\Brand\DataProvider" name="fpt_mockshopbrand_brand_form_data_source">
<settings>
<requestFieldName>brand_id</requestFieldName>
<primaryFieldName>brand_id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="general">
<settings>
<label/>
</settings>
<field name="brand_id" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">staff</item>
</item>
</argument>
<settings>
<dataType>text</dataType>
<visible>false</visible>
<dataScope>brand_id</dataScope>
</settings>
</field>
<field name="option_id3" formElement="select">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">computer_games</item>
</item>
</argument>
<settings>
<dataType>number</dataType>
<label translate="true">Trial Period</label>
<dataScope>trial_period</dataScope>
</settings>
<formElements>
<select>
<settings>
<options class="Fpt\Mockshopbrand\Ui\Component\Options\BrandOptionId"/>
</settings>
</select>
</formElements>
</field>
<field name="option_id2" class="Fpt\Mockshopbrand\Ui\Component\Options\OptionsId">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="dataScope" xsi:type="string">option_id</item>
<item name="dataType" xsi:type="string">int</item>
<item name="label" xsi:type="string" translate="true">Brand</item>
<item name="component" xsi:type="string">Magento_Ui/js/form/element/select</item>
<item name="template" xsi:type="string">ui/form/field</item>
<item name="elementTmpl" xsi:type="string">ui/form/element/select</item>
<item name="formElement" xsi:type="string">select</item>
<item name="source" xsi:type="string">brand</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
<item name="sortOrder" xsi:type="number">10</item>
</item>
</argument>
</field>
<field name="option_id" formElement="select" class="Fpt\Mockshopbrand\Ui\Component\Options\OptionsId">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">computer_games</item>
</item>
</argument>
<settings>
<dataType>number</dataType>
<label translate="true">Brand</label>
<dataScope>option_id</dataScope>
</settings>
</field>
<field name="is_featured" sortOrder="10" formElement="checkbox">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="default" xsi:type="number">1</item>
</item>
</argument>
<settings>
<dataType>boolean</dataType>
<label translate="true">Featured Brand</label>
<dataScope>status</dataScope>
</settings>
<formElements>
<checkbox>
<settings>
<valueMap>
<map name="false" xsi:type="number">0</map>
<map name="true" xsi:type="number">1</map>
</valueMap>
<prefer>toggle</prefer>
</settings>
</checkbox>
</formElements>
</field>
<field name="url_key" sortOrder="20" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">staff</item>
</item>
</argument>
<settings>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">URL Key</label>
<dataScope>staff</dataScope>
</settings>
</field>
<field name="website_ids" formElement="multiselect">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">catalog_rule</item>
</item>
</argument>
<settings>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<dataType>number</dataType>
<tooltip>
<link>https://docs.magento.com/user-guide/configuration/scope.html</link>
<description>What is this?</description>
</tooltip>
<label translate="true">Websites</label>
<dataScope>website_ids</dataScope>
</settings>
<formElements>
<multiselect>
<settings>
<options class="Magento\CatalogRule\Model\Rule\WebsitesOptionsProvider"/>
</settings>
</multiselect>
</formElements>
</field>
<field name="image" formElement="imageUploader">
<settings>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<notice translate="true">Allowed file types: jpeg, gif, png.</notice>
<label translate="true">Image</label>
<componentType>imageUploader</componentType>
</settings>
<formElements>
<imageUploader>
<settings>
<maxFileSize>2097152</maxFileSize>
<uploaderConfig>
<param xsi:type="string" name="url">brand/mockbrand_logo/upload</param>
</uploaderConfig>
</settings>
</imageUploader>
</formElements>
</field>
<field name="logo">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Logo</item>
<item name="formElement" xsi:type="string">fileUploader</item>
<item name="componentType" xsi:type="string">fileUploader</item>
<item name="notice" xsi:type="string" translate="true">Allowed file types: png, gif, jpg, jpeg.</item>
<item name="maxFileSize" xsi:type="number">2097152</item>
<item name="allowedExtensions" xsi:type="string">jpg jpeg gif png</item>
<item name="uploaderConfig" xsi:type="array">
<item name="url" xsi:type="string">aw_sbb/brand_logo/upload</item>
</item>
<item name="sortOrder" xsi:type="number">40</item>
</item>
</argument>
</field>
<field name="name2" sortOrder="20" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">staff</item>
</item>
</argument>
<settings>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<dataType>text</dataType>
<label translate="true">Staff Name</label>
<dataScope>staff</dataScope>
</settings>
</field>
</fieldset>
</form>