<Dialog id="addNewFragmentDialog"
    xmlns="sap.m"
    xmlns:core="sap.ui.core"
    xmlns:l="sap.ui.layout"
    xmlns:f="sap.ui.layout.form"  
    title="{/title}" 
    contentWidth="500px" 
    initialFocus="aggregationName"
    class="sapUiRTABorder">
    <content>
        <f:SimpleForm id="addNewFragmentDialog_Form"
            editable="true"
            layout="ResponsiveGridLayout"
            labelSpanS="4"
            singleContainerFullSize="false">
            <f:content>
                <Label visible="{/completeView}"  text="{i18n>ADP_ADD_FRAGMENT_DIALOG_CONTROL_TYPE_LABEL}" />
                <Input
                    id="controlType"
                    visible="{/completeView}"
                    value="{/selectedControlName}"
                    editable="false" />
                <Label visible="{/completeView}" text="{i18n>ADP_ADD_FRAGMENT_DIALOG_AGGREGATION_LABEL}" />
                <Select
                    id="aggregationName"
                    visible="{/completeView}"
                    change="onAggregationChanged"
                    selectedKey="{/selectedAggregation/key}"
                    items="{
                        path: '/targetAggregation',
                        sorter: { path: 'text' }
                    }">
                    <core:Item key="{key}" text="{value}" />
                </Select>
                <Label text="{i18n>ADP_ADD_FRAGMENT_DIALOG_INDEX_LABEL}" />
                    <Select
                        id="aggregationIndex"
                        enabled="{/indexHandlingFlag}"
                        selectedKey="{path: '/selectedIndex', type: 'sap.ui.model.type.Integer'}"
                        items="{
                            path: '/index',
                            sorter: { path: 'text' }
                        }">
                        <core:Item key="{key}" text="{value}" />
                    </Select>
                    <core:Icon
                        id="aggregationIndexInfoIcon"
                        useIconTooltip="false"
                        visible="{/specialIndexHandlingIcon}" 
                        src="sap-icon://message-information" 
                        width="1rem"
                        height="2rem"
                        tooltip="{/iconTooltip}">
                        <core:layoutData>
                            <l:GridData span="S6" />
                        </core:layoutData>
                    </core:Icon>
                <Label text="{i18n>ADP_ADD_FRAGMENT_DIALOG_FRAGMENT_NAME_LABEL}" required="true" />
                <Input 
                    id="fragmentName"
                    description=".fragment.xml" 
                    value="{/newFragmentName}" 
                    liveChange="onFragmentNameInputChange">
                </Input>
            </f:content>
        </f:SimpleForm>
    </content>
    <beginButton>
        <Button 
            id="createDialogBtn" 
            text="Create"
            press="onCreateBtnPress"
            enabled="false"
            type="Emphasized" />
    </beginButton>
    <endButton>
        <Button 
            id="closeDialogBtn" 
            text="Cancel"
            press="handleDialogClose"
            type="Reject" />
    </endButton>
</Dialog>