docs: protected String displayLoginForm() {
  
          StringBuffer html = new StringBuffer(8192);
  
          html.append("<!DOCTYPE html>\n");
          html.append("<html><head>\n");
          html.append("<title>");
          html.append(getTitle(m_locale));
  
          html.append("</title>\n");
  
          String encoding = getRequestContext().getEncoding();
          html.append("<meta HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=");
          html.append(encoding);
          html.append("\">\n");
  
          // append workplace CSS
          html.append("<link rel=\"stylesheet\" type=\"text/css\" href=\"");
          html.append(CmsWorkplace.getStyleUri(this, "workplace.css"));
          html.append("\">\n");
  
          // append favicon relation
          html.append("<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"");
          html.append(CmsWorkplace.getSkinUri()).append("commons/favicon.ico");
          html.append("\">\n");
  
          if (m_action == ACTION_DISPLAY) {
              // append default script
              appendDefaultLoginScript(html, m_message);
          } else if (m_action == ACTION_LOGIN) {
              // append window opener script
              if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_directEditPath)) {
                  appendDirectEditOpenerScript(html);
              } else {
                  appendWorkplaceOpenerScript(html, m_requestedResource, m_message);
              }
          }
  
          html.append("</head>\n");
  
          html.append("<body class=\"dialog\" onload=\"doOnload();\">\n");
  
          html.append("<div style=\"text-align: center; padding-top: 50px;\">");
          html.append("<img src=\"");
          html.append(CmsWorkplace.getResourceUri("commons/login_logo.png"));
          html.append("\" alt=\"OpenCms Logo\">");
          html.append("</div>\n");
  
          html.append("<table class=\"logindialog\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>\n");
          html.append("<table class=\"dialogbox\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>\n");
          html.append("<div class=\"dialoghead\">");
  
          if (m_oufqn == null) {
              m_oufqn = CmsOrganizationalUnit.SEPARATOR;
          }
          if (m_action == ACTION_DISPLAY) {
              html.append("<div id='titleId'");
              if (!m_oufqn.equals(CmsOrganizationalUnit.SEPARATOR)) {
                  html.append(" style='display: none;'");
              }
              html.append(">\n");
              html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_HEADLINE_0));
              html.append("</div>\n");
              html.append("<div id='titleIdOu'");
              if (m_oufqn.equals(CmsOrganizationalUnit.SEPARATOR)) {
                  html.append(" style='display: none;'");
              }
              html.append(">\n");
              html.append(
                  Messages.get().getBundle(m_locale).key(
                      Messages.GUI_LOGIN_HEADLINE_SELECTED_ORGUNIT_1,
                      m_ou.getDescription(getCmsObject().getRequestContext().getLocale())));
              html.append("</div>\n");
          } else if (m_action == ACTION_LOGIN) {
              html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_HEADLINE_ALREADY_IN_0));
          }
  
          html.append("</div>\n");
  
          if (m_action == ACTION_DISPLAY) {
              // start form
              html.append("<form style=\"margin: 0px; padding: 0px;\" action=\"");
              html.append(getFormLink());
              html.append("\"");
              if (PCTYPE_PUBLIC.equals(m_pcType)) {
                  html.append(" autocomplete=\"off\"");
              }
              appendId(html, PARAM_FORM);
              html.append("method=\"POST\">\n");
          }
  
          html.append("<div class=\"dialogcontent\">\n");
          html.append("<table border=\"0\">\n");
  
          // show security option box if enabled in configuration
          if ((m_action == ACTION_DISPLAY) && OpenCms.getLoginManager().isEnableSecurity()) {
              html.append("<tr>\n");
              html.append("<td rowspan=\"2\">\n");
              // security image should not be shown any more
              //html.append("<img src=\"");
              //html.append(CmsWorkplace.getResourceUri("commons/login_security.png"));
              //html.append("\" height=\"48\" width=\"48\" alt=\"\">");
              html.append("</td>\n");
              html.append("<td colspan=\"2\" style=\"white-space: nowrap;\">\n");
              html.append("<div style=\"padding-bottom: 5px;\"><b>");
              html.append(
                  CmsStringUtil.escapeHtml(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_SECURITY_0)));
              html.append("</b></div>\n");
              html.append("</td>\n");
              html.append("</tr>\n");
              html.append("<tr>\n");
              html.append("<td colspan=\"2\" style=\"white-space: nowrap;\">");
              html.append("<div class=\"loginsecurity\">");
              html.append("<input type=\"radio\" value=\"");
              html.append(PCTYPE_PUBLIC);
              html.append("\" name=\"");
              html.append(PARAM_PCTYPE);
              html.append("\"");
              if (PCTYPE_PUBLIC.equals(m_pcType)) {
                  html.append(" checked=\"checked\"");
              }
              html.append(">&nbsp;");
              html.append(
                  CmsStringUtil.escapeHtml(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_PCTYPE_PUBLIC_0)));
              html.append("<br/>");
              html.append("<input type=\"radio\" value=\"");
              html.append(PCTYPE_PRIVATE);
              html.append("\" name=\"");
              html.append(PARAM_PCTYPE);
              html.append("\"");
              if (PCTYPE_PRIVATE.equals(m_pcType)) {
                  html.append(" checked=\"checked\"");
              }
              html.append(">&nbsp;");
              html.append(
                  CmsStringUtil.escapeHtml(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_PCTYPE_PRIVATE_0)));
              html.append("</div></td>\n");
              html.append("</tr>\n");
          }
  
          html.append("<tr>\n");
          html.append("<td></td>\n<td colspan=\"2\" style=\"white-space: nowrap;\">\n");
          html.append("<div style=\"padding-bottom: 10px;\">");
  
          if (m_action == ACTION_DISPLAY) {
              html.append(CmsStringUtil.escapeHtml(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_MESSAGE_0)));
          } else if (m_action == ACTION_LOGIN) {
              html.append(
                  CmsStringUtil.escapeHtml(
                      Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_MESSAGE_ALREADY_IN_0)));
          }
  
          html.append("</div>\n");
          html.append("</td>\n");
          html.append("</tr>\n");
  
          html.append("<tr>\n");
  
          html.append("<td style=\"width: 60px; text-align: center; vertical-align: top\" rowspan=\"5\">");
          html.append("<img src=\"");
          html.append(CmsWorkplace.getResourceUri("commons/login.png"));
          html.append("\" height=\"48\" width=\"48\" alt=\"\">");
          html.append("</td>\n");
  
          html.append("<td style=\"white-space: nowrap;\"><b>");
          html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_USERNAME_0));
          html.append("</b>&nbsp;&nbsp;</td>\n");
          html.append("<td style=\"width: 300px; white-space: nowrap;\">");
  
          if (m_action == ACTION_DISPLAY) {
              // append input for user name
              html.append("<input style=\"width: 300px;\" type=\"text\"");
              if (PCTYPE_PUBLIC.equals(m_pcType)) {
                  html.append(" autocomplete=\"off\"");
              }
              appendId(html, PARAM_USERNAME);
              html.append("value=\"");
              html.append(
                  (CmsStringUtil.isEmpty(m_username) || PCTYPE_PUBLIC.equals(m_pcType))
                  ? ""
                  : CmsEncoder.escapeXml(m_username));
              html.append("\">");
          } else if (m_action == ACTION_LOGIN) {
              // append name of user that has been logged in
              html.append(getRequestContext().getCurrentUser().getFullName());
          }
  
          html.append("</td>\n");
          html.append("</tr>\n");
  
          if (m_action == ACTION_DISPLAY) {
              // append 2 rows: input for user name and login button
              html.append("<tr>\n");
              html.append("<td style=\"white-space: nowrap;\"><b>");
              html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_PASSWORD_0));
              html.append("</b>&nbsp;&nbsp;</td>\n");
              html.append("<td style=\"width: 300px; white-space: nowrap;\">");
              html.append("<input style=\"width: 300px;\" type=\"password\"");
              if (PCTYPE_PUBLIC.equals(m_pcType)) {
                  html.append(" autocomplete=\"off\"");
              }
              appendId(html, PARAM_PASSWORD);
              html.append(">");
              html.append("</td>\n");
              html.append("</tr>\n");
  
              html.append("<tr>\n");
              html.append("<td style=\"white-space: nowrap;\"><div id='ouLabelId' style='display: none;'><b>");
              html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_ORGUNIT_0)).append(
                  "</b>&nbsp;&nbsp;\n");
              html.append("</div></td>\n");
              html.append(
                  "<td style=\"width: 300px; white-space: nowrap;\"><div id='ouSearchId' style='display: none;'><input class=\"inactive\" style=\"width: 300px;\" type=\"text\" value=\"");
              html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_ORGUNIT_SEARCH_0));
              html.append("\"");
              appendId(html, PARAM_OUSEARCH);
              html.append(" onfocus=\"checkOuValue();\"");
              html.append(" onblur=\"checkOuValue();\"");
              html.append(" onkeyup=\"searchOu();\"");
              html.append("/>");
              html.append("<input type=\"hidden\" value=\"");
              html.append(m_oufqn == null ? "" : m_oufqn);
              html.append("\"");
              appendId(html, PARAM_OUFQN);
              html.append("/>");
              html.append("</div></td>\n");
              html.append("</tr>\n");
  
              html.append("<tr>\n");
              html.append("<td colspan=\"2\"><div id='ouSelId' style='display: none;'>");
              html.append("</div></td>\n");
              html.append("</tr>\n");
  
              html.append("<tr>\n");
              html.append("<td>\n");
              html.append("</td>\n");
              html.append("<td style=\"white-space: nowrap;\">\n");
              html.append("<input type=\"hidden\"");
              appendId(html, PARAM_ACTION_LOGIN);
              html.append("value=\"true\">\n");
  
              if (m_requestedResource != null) {
                  html.append("<input type=\"hidden\"");
                  appendId(html, CmsWorkplaceManager.PARAM_LOGIN_REQUESTED_RESOURCE);
                  html.append("value=\"");
                  html.append(CmsEncoder.escapeXml(m_requestedResource));
                  html.append("\">\n");
              }
  
              html.append("<input class=\"loginbutton\" type=\"submit\" value=\"");
              html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_BUTTON_0));
              html.append("\">\n");
  
              if ((getOus().size() > 1)
                  && ((getPreDefOuFqn() == null) || getPreDefOuFqn().equals(CmsOrganizationalUnit.SEPARATOR))) {
                  // options
                  html.append("&nbsp;<input id='ouBtnId' class='loginbutton' type='button' value='");
                  html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_ORGUNIT_SELECT_ON_0));
                  html.append("' onclick='javascript:orgUnitSelection();'>\n");
              }
              html.append("</td>\n");
              html.append("</tr>\n");
          } else if (m_action == ACTION_LOGIN) {
              // append 2 rows: one empty, other for button with re-open window script
              html.append("<tr><td></td><td></td></tr>\n");
  
              html.append("<tr>\n");
              html.append("<td></td>\n");
              html.append("<td style=\"width:100%; white-space: nowrap;\">\n");
              html.append("<input class=\"loginbutton\" type=\"button\" value=\"");
              html.append(Messages.get().getBundle(m_locale).key(Messages.GUI_LOGIN_BUTTON_ALREADY_IN_0));
              html.append("\" onclick=\"doOnload()\">\n");
              html.append("</td>\n");
              html.append("</tr>\n");
          }
  
          html.append("</table>\n");
          html.append("</div>");
  
          if (m_action == ACTION_DISPLAY) {
              // end form
              html.append("</form>\n");
          }
  
          html.append("</td></tr></table>\n");
          html.append("</td></tr></table>\n");
          html.append(getCopyrightHtml(m_locale));
  
          html.append("<noscript>\n");
          html.append(
              "<div style=\"text-align: center; font-size: 14px; border: 2px solid black; margin: 50px; padding: 20px; background-color: red; color: white; white-space: nowrap;\"><b>");
          html.append(
              CmsStringUtil.escapeHtml(
                  Messages.get().getBundle(m_locale).key(
                      Messages.GUI_LOGIN_NOSCRIPT_1,
                      OpenCms.getSiteManager().getWorkplaceSiteMatcher())));
          html.append("</b></div>\n");
          html.append("</noscript>\n");
  
          html.append("</body></html>");
  
          return html.toString();
      }