code: @Override
      public String dialogScriptSubmit() {
  
          if (useNewStyle()) {
              return super.dialogScriptSubmit();
          }
          StringBuffer result = new StringBuffer(512);
          result.append("function submitAction(actionValue, theForm, formName) {\n");
          result.append("\tif (theForm == null) {\n");
          result.append("\t\ttheForm = document.forms[formName];\n");
          result.append("\t}\n");
          result.append("\ttheForm." + PARAM_FRAMENAME + ".value = window.name;\n");
          result.append("\tif (actionValue == \"" + DIALOG_OK + "\") {\n");
          result.append("\t\treturn true;\n");
          result.append("\t}");
          String declinedMessage = getConfigurationContentStringValue(NODE_MESSAGE_DECLINED);
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(declinedMessage)) {
              // add the alert to show the declined message
              result.append(" else if (actionValue == \"" + DIALOG_CANCEL + "\") {\n");
              result.append("\t\talert(\"");
              result.append(CmsStringUtil.escapeJavaScript(declinedMessage));
              result.append("\");\n");
              result.append("\t}\n");
          }
          result.append("\ttheForm." + PARAM_ACTION + ".value = actionValue;\n");
          result.append("\ttheForm.submit();\n");
          result.append("\treturn false;\n");
          result.append("}\n");
  
          return result.toString();
      }
docs: The standard JavaScript for submitting the dialog is overridden to show an alert in case that
  an agreement is declined.<p>
  
  See also {@link CmsDialog#dialogScriptSubmit()}
  
  @return the standard JavaScript for submitting the dialog