<Dialog
    xmlns="sap.m"
    id="copyDialog"
    title="{i18n>CopyDialog.Title}"
    beforeOpen=".onBeforeOpen"
    afterClose=".destroy"
    xmlns:f="sap.ui.layout.form"
    xmlns:core="sap.ui.core">
    <content>
        <f:SimpleForm id="copyForm" editable="true">
            <Text id="copyMessage" text="{
                parts: ['i18n>CopyDialog.Message', '/sourceId'],
                formatter: 'jQuery.sap.formatMessage'
            }" />
            <Label id="copyPageIdLabel" text="{i18n>Label.PageID}" labelFor="copyId" />
            <Input
                maxLength="35"
                required="true"
                id="copyPageIdInput"
                placeholder="{
                    parts: ['i18n>Placeholder.CopyPageTitle', '/sourceId'],
                    formatter: 'jQuery.sap.formatMessage'
                }"
                change=".onIdChange"
                liveChange=".onIdLiveChange"
                valueLiveUpdate="true"
                value="{ path: '/targetId', type: 'sap.ui.model.type.String' }" />
            <Label id="copyTitleLabel" text="{i18n>Label.Title}" labelFor="copyTitle" />
            <Input
                id="copyTitle"
                required="true"
                maxLength="100"
                value="{ path: '/title', type: 'sap.ui.model.type.String' }"
                liveChange=".onTitleLiveChange"
                valueLiveUpdate="true"
                valueStateText="{i18n>Message.EmptyTitle}"
                placeholder="{
                    parts: ['i18n>Placeholder.CopyPageTitle', '/sourceTitle'],
                    formatter: 'jQuery.sap.formatMessage'
                }" />
        </f:SimpleForm>
        <core:ComponentContainer id="transportContainer" lifecycle="Application"/>
    </content>
    <beginButton>
        <Button
            id="copyPageSaveButton"
            type="Emphasized"
            text="{i18n>Button.Copy}"
            press=".onConfirm"
            enabled="{ path: '/validation', formatter: '.validate' }" />
    </beginButton>
    <endButton>
        <Button id="copyPageCancelButton" text="{i18n>Button.Cancel}" press=".onCancel" />
    </endButton>
</Dialog>
