Index: lams_tool_wiki/web/pages/learning/wiki.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_wiki/web/pages/learning/wiki.jsp,v diff -u -r1.25 -r1.25.2.1 --- lams_tool_wiki/web/pages/learning/wiki.jsp 14 Apr 2014 12:57:18 -0000 1.25 +++ lams_tool_wiki/web/pages/learning/wiki.jsp 23 Feb 2016 19:40:37 -0000 1.25.2.1 @@ -1,512 +1,539 @@ <%@ include file="/common/taglibs.jsp"%> -<%@ page import="org.lamsfoundation.lams.tool.wiki.util.WikiConstants"%> - - - - - + function validateForm() { + // Validates that there's input from the user. -
-
- -
- - - - - -

-
+ // disables the Finish button to avoid double submission + disableFinishButton(); -   + if (mode == "learner") { + // if this is learner mode, then we add this validation see (LDEV-1319) - - - - - - - - - - - - - - - - -
- - -
- - - - "> - - - - -   - "> - - - - - -   - "> - - - - - -   - "> - - - - - -   - "> - - - - - -   - ')" - title="" - > - - - - -   - " - > - - - - -
-
- -
-
-
-
- -
-

${fn:escapeXml(currentWikiPage.title)}

- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- -
-
-
- -
-
- - - - - - - - -
-
-
- - -
- -
+ if (document.learningForm.entryText.value == "") { - -   - ${fn:escapeXml(mainWikiPage.title)} - -
+ // if the input is blank, then we further inquire to make sure it is correct + if (confirm("message.learner.blank.input")) { + // if correct, submit form + return true; + } else { + // otherwise, focus on the text area + document.learningForm.entryText.focus(); + document.getElementById("finishButton").disabled = false; + return false; + } + } else { + // there was something on the form, so submit the form + return true; + } + } + } -
- - - <%@ include file="parts/finishButton.jsp"%> - - + --> + + + +
+
+
+
+
+ + ${fn:escapeXml(mainWikiPage.title)} /  + + ${fn:escapeXml(currentWikiPage.title)} + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + ')" + title="" + > + + + + + + " + > + + + + + + +
+
+
+ + + + + + + + + + + + + + - + editorInstance.wikiLinkArray = wikiLinkArray; + }); + + function refreshPage() + { + var url = "/learning.do?mode=${mode}&toolSessionID=${lrnForm.toolSessionID}¤tWikiPageId=${currentWikiPage.uid}" + window.location=url; + } + + --> + + \ No newline at end of file