2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2016-2018 Ericsson. All rights reserved.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 function resultForm_activate(formParent, formHeading, formText) {
22 apexUtils_removeElement("newModelDivBackground");
24 var contentelement = document.createElement("resultFormDiv");
25 var formDiv = document.createElement("div");
26 var backgroundDiv = document.createElement("div");
27 backgroundDiv.setAttribute("id", "newModelDivBackground");
28 backgroundDiv.setAttribute("class", "newModelDivBackground");
30 backgroundDiv.appendChild(formDiv);
31 contentelement.appendChild(backgroundDiv);
32 formParent.appendChild(contentelement);
34 formDiv.setAttribute("id", "resultFormDiv");
35 formDiv.setAttribute("class", "resultFormDiv");
37 var headingSpan = document.createElement("span");
38 formDiv.appendChild(headingSpan);
40 headingSpan.setAttribute("class", "headingSpan");
41 headingSpan.innerHTML = formHeading;
43 var form = document.createElement("resultForm");
44 formDiv.appendChild(form);
46 form.setAttribute("id", "resultForm");
47 form.setAttribute("class", "form-style-1");
48 form.setAttribute("method", "post");
50 var ul = document.createElement("ul");
53 var resultTextLI = document.createElement("li");
54 form.appendChild(resultTextLI);
56 var resultTextLabel = document.createElement("label");
57 resultTextLI.appendChild(resultTextLabel);
58 resultTextLabel.setAttribute("for", "resultFormTextArea");
59 resultTextLabel.innerHTML = "resultText: ";
61 var resultTextArea = document.createElement("textarea");
62 resultTextLI.appendChild(resultTextArea);
64 resultTextArea.setAttribute("id", "resultFormTextArea");
65 resultTextArea.setAttribute("resultText", "resultFormTextArea");
66 resultTextArea.setAttribute("class", "field-long field-textarea ebTextArea ebTextArea_width_full eb_scrollbar");
67 resultTextArea.setAttribute("readonly", "readonly");
68 resultTextArea.style.cursor = "text";
70 resultTextArea.value = formText;
72 var inputLI = document.createElement("li");
73 form.appendChild(inputLI);
75 var okInput = document.createElement("input");
76 inputLI.appendChild(okInput);
78 okInput.setAttribute("id", "generateDescription");
79 okInput.setAttribute("class", "okButton ebBtn");
80 okInput.setAttribute("type", "submit");
81 okInput.setAttribute("value", "OK");
83 okInput.onclick = resultForm_okPressed;
86 function resultForm_okPressed() {
87 apexUtils_removeElement("newModelDivBackground");