Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0c99005
)
MDL-30839 Fixing extra line breaks in error msg
author
Jason Fowler
<phalacee@gmail.com>
Wed, 21 Aug 2013 06:58:50 +0000
(14:58 +0800)
committer
Jason Fowler
<phalacee@gmail.com>
Wed, 21 Aug 2013 06:58:50 +0000
(14:58 +0800)
lib/formslib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/formslib.php
b/lib/formslib.php
index
075bd80
..
80e9e0d
100644
(file)
--- a/
lib/formslib.php
+++ b/
lib/formslib.php
@@
-2157,6
+2157,8
@@
function qf_errorHandler(element, _qfMsg) {
&& div.className != "error") {
div.className += " error";
linebreak = document.createElement("br");
&& div.className != "error") {
div.className += " error";
linebreak = document.createElement("br");
+ linebreak.className = "error";
+ linebreak.id = \'id_error_break_\'+element.name;
errorSpan.parentNode.insertBefore(linebreak, errorSpan.nextSibling);
}
errorSpan.parentNode.insertBefore(linebreak, errorSpan.nextSibling);
}
@@
-2166,6
+2168,10
@@
function qf_errorHandler(element, _qfMsg) {
if (errorSpan) {
errorSpan.parentNode.removeChild(errorSpan);
}
if (errorSpan) {
errorSpan.parentNode.removeChild(errorSpan);
}
+ var linebreak = document.getElementById(\'id_error_break_\'+element.name);
+ if (linebreak) {
+ linebreak.parentNode.removeChild(linebreak);
+ }
if (div.className.substr(div.className.length - 6, 6) == " error") {
div.className = div.className.substr(0, div.className.length - 6);
if (div.className.substr(div.className.length - 6, 6) == " error") {
div.className = div.className.substr(0, div.className.length - 6);