Opens the confirm delete locale dialog.<p>
188052
void confirmDeleteLocale() {

        CmsConfirmDialog dialog = new CmsConfirmDialog(
            Messages.get().key(Messages.GUI_CONFIRM_DELETE_LOCALE_TITLE_0),
            Messages.get().key(Messages.GUI_CONFIRM_DELETE_LOCALE_TEXT_0));
        dialog.setHandler(new I_CmsConfirmDialogHandler() {

            public void onClose() {

                // nothing to do
            }

            public void onOk() {

                deleteCurrentLocale();
            }
        });
        dialog.center();
    }
590851
public static CloseCallback confirming(String question)
    {
        return new CloseCallback()
        {
            @Override
            public boolean mayClose(Component componentInTab)
            {
                int option = JOptionPane.showConfirmDialog(
                    componentInTab, question, 
                    "Confirm", JOptionPane.YES_NO_OPTION);
                return option == JOptionPane.YES_OPTION;
            }
        };
    }
977625
protected void onClickOk() {

        CmsResource res1 = m_context.getResources().get(0);
        CmsResource res2 = m_otherResource;
        try {
            CmsObject cms = A_CmsUI.getCmsObject();
            CmsLocaleGroupService groupService = cms.getLocaleGroupService();
            groupService.detachLocaleGroup(res1, res2);
            m_context.finish(Arrays.asList(m_context.getResources().get(0).getStructureId()));
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage());
            m_context.error(e);
        }

    }
1342607
function() {
            var that = this;

            return dialogs.confirm(i18n.t("reports.remove.title"))
            .then(function() {
                return that.report.remove();
            })
            .then(function() {
                that.report.clear();
                return that.reports.loadAll();
            })
            .then(function() {
                that.update();
            })
            .fail(dialogs.error);
        }
259369
public CLDR.Locale resolve(java.util.Locale javaLocale) {
    MetaLocale meta = MetaLocale.fromJavaLocale(javaLocale);
    return resolve(meta);
  }
1223364
public void resetPage() {

        CmsConfirmDialog dialog = new CmsConfirmDialog(
            Messages.get().key(Messages.GUI_DIALOG_RESET_TITLE_0),
            "<p>" + Messages.get().key(Messages.GUI_DIALOG_PAGE_RESET_0) + "</p>");
        dialog.setCloseText(Messages.get().key(Messages.GUI_BUTTON_CANCEL_TEXT_0));
        dialog.setOkText(Messages.get().key(Messages.GUI_BUTTON_DISCARD_TEXT_0));
        dialog.setHandler(new I_CmsConfirmDialogHandler() {

            /**
             * @see org.opencms.gwt.client.ui.I_CmsCloseDialogHandler#onClose()
             */
            public void onClose() {

                deactivateCurrentButton();
                activateSelection();
            }

            /**
             * @see org.opencms.gwt.client.ui.I_CmsConfirmDialogHandler#onOk()
             */
            public void onOk() {

                m_controller.resetPage();
            }
        });
        dialog.center();
    }
168935
public void acceptConfirmation() {
        String action = "Clicking 'OK' on a confirmation";
        String expected = "Confirmation is present to be clicked";
        if (isNotConfirmation(action, expected)) {
            return;
        }
        accept(action, expected, "confirmation");
    }
1281779
void switchLocale(final String locale) {

        if (locale.equals(m_locale)) {
            return;
        }
        m_locale = locale;
        m_basePanel.clear();
        destroyForm(false);
        final CmsEntity entity = m_entityBackend.getEntity(m_entityId);
        m_entityId = getIdForLocale(locale);
        // if the content does not contain the requested locale yet, a new node will be created
        final boolean addedNewLocale = !m_contentLocales.contains(locale);
        if (m_registeredEntities.contains(m_entityId)) {
            unregistereEntity(m_entityId);
        }
        if (addedNewLocale) {
            loadNewDefinition(m_entityId, entity, new I_CmsSimpleCallback<CmsContentDefinition>() {

                public void execute(final CmsContentDefinition contentDefinition) {

                    setContentDefinition(contentDefinition);
                    renderFormContent();
                    setChanged();

                }
            });
        } else {
            loadDefinition(m_entityId, entity, new I_CmsSimpleCallback<CmsContentDefinition>() {

                public void execute(CmsContentDefinition contentDefinition) {

                    setContentDefinition(contentDefinition);
                    renderFormContent();
                }
            });
        }
    }
143772
public void confirm(final int title, final int message,
                        final DialogInterface.OnClickListener onClickListener) {
        final AlertDialog.Builder builder = new AlertDialog.Builder(
                getContext());
        builder.setTitle(title).setIcon(android.R.drawable.ic_dialog_info).setMessage(message);
        builder.setPositiveButton(android.R.string.ok,
                new DialogInterface.OnClickListener() {

                    @Override
                    public void onClick(final DialogInterface dialog,
                                        final int which) {
                        if (onClickListener != null) {
                            onClickListener.onClick(dialog, which);
                        }

                    }
                });
        builder.setNegativeButton(android.R.string.cancel,
                new DialogInterface.OnClickListener() {

                    @Override
                    public void onClick(final DialogInterface dialog,
                                        final int which) {
                        if (onClickListener != null) {
                            onClickListener.onClick(dialog, which);
                        }
                    }
                });
        builder.show();
    }
1083577
protected void onWindowClose() {

        boolean savePage = Window.confirm(
            Messages.get().key(Messages.GUI_EDITOR_SAVE_BEFORE_LEAVING_1, m_editableData.getSitePath()));
        if (savePage) {
            saveEditorContent();
        }
    }
1292951
protected void clearEditor() {

        removeEditOverlays();
        CmsUndoRedoHandler.getInstance().clear();
        m_validationHandler.clear();
        m_entity = null;
        m_entityId = null;
        m_tabInfos = null;
        m_rootHandler = null;
        m_formPanel = null;
        m_formTabs = null;
    }
541651
public function confirmDelete()
    {
        if (null === $this->confirm_delete) {
            return (bool) config('cms-models.defaults.confirm_delete', false);
        }

        return (bool) $this->confirm_delete;
    }
321176
public void removeValue(String name, Locale locale) {

        I_CmsXmlContentValue value = removeBookmark(CmsXmlUtils.createXpath(name, 1), locale);
        if (value != null) {
            Element element = value.getElement();
            element.detach();
        }
    }
1312227
function confirmClear() {
        var promptSchema = {
            properties: {
                confirm: {
                    description: 'Delete everything in the ' + config.env.toUpperCase() + ' database? (y or n) ',
                    pattern: /^[yn]$/,
                    message: 'Please respond with y or n. ',
                    required: true
                }
            }
        };

        // for safety reasons, we can't use this in production
        if (config.env === 'production') {
            return Q.reject('purging is NOT available for prod.');
        }

        // prompt the user to confirm they are deleting everything in the database
        var deferred = Q.defer();
        prompt.start();
        prompt.get(promptSchema, function (err, result) {
            if (err) {
                deferred.reject(err);
            }
            else if (result.confirm !== 'y') {
                log.info('purge cancelled');
                deferred.resolve(false);
            }
            // else user confirmed deletion so do it
            else {
                deferred.resolve(true);
            }
        });

        return deferred.promise;
    }
267034
public void openDialog(String dialogId, String contextType, List<CmsUUID> resources) {

        openDialog(dialogId, contextType, resources, null);
    }
1368186
protected function deleteAction()
    {
        $deleteConfirm = trans('merchant.delete_confirm');
        $confirm = trans('merchant.confirm');
        $cancel = trans('merchant.cancel');

        $script = <<<SCRIPT

$('.grid-row-delete').unbind('click').click(function() {

    var id = $(this).data('id');

    swal({
      title: "$deleteConfirm",
      type: "warning",
      showCancelButton: true,
      confirmButtonColor: "#DD6B55",
      confirmButtonText: "$confirm",
      closeOnConfirm: false,
      cancelButtonText: "$cancel"
    },
    function(){
        $.ajax({
            method: 'post',
            url: '{$this->getResource()}/' + id,
            data: {
                _method:'delete',
                _token:LA.token,
            },
            success: function (data) {
                $.pjax.reload('#pjax-container');

                if (typeof data === 'object') {
                    if (data.status) {
                        swal(data.message, '', 'success');
                    } else {
                        swal(data.message, '', 'error');
                    }
                }
            }
        });
    });
});

SCRIPT;

        Merchant::script($script);

        return <<<EOT
<a href="javascript:void(0);" data-id="{$this->getKey()}" class="grid-row-delete">
    <i class="fa fa-trash"></i>
</a>
EOT;
    }
329320
public void removeTranslation(String locale) {
        LocaleCodeSpecification.assertCode(locale);

        Translation translation = getTranslation(locale);
        if (translation != null) {
            this.translations.remove(translation.getId());
        }
    }