aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-09-21 22:02:28 +0000
committermkanat%bugzilla.org <>2009-09-21 22:02:28 +0000
commit3e0d373be5b1736837e711e5983e704aa906cc06 (patch)
tree24a8c01b70e8fd0baba7bd57f1496316ae8f3fa6 /js
parentBug 516157: MySQL 6.x/5.2/5.4 uses "ENGINE", not "TYPE", for altering tables ... (diff)
downloadbugzilla-3e0d373be5b1736837e711e5983e704aa906cc06.tar.gz
bugzilla-3e0d373be5b1736837e711e5983e704aa906cc06.tar.bz2
bugzilla-3e0d373be5b1736837e711e5983e704aa906cc06.zip
Bug 388830: Use JS to make sure there's a Description value when submitting an attachment
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=LpSolit
Diffstat (limited to 'js')
-rw-r--r--js/attachment.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/attachment.js b/js/attachment.js
index d3ba26796..b62555fbe 100644
--- a/js/attachment.js
+++ b/js/attachment.js
@@ -21,6 +21,15 @@
* Marc Schumann <wurblzap@gmail.com>
*/
+function validateAttachmentForm(theform) {
+ var desc_value = YAHOO.lang.trim(theform.description.value);
+ if (desc_value == '') {
+ alert(BUGZILLA.string.attach_desc_required);
+ return false;
+ }
+ return true;
+}
+
function updateCommentPrivacy(checkbox) {
var text_elem = document.getElementById('comment');
if (checkbox.checked) {