Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
3e0d373b
Commit
3e0d373b
authored
Sep 21, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
parent
a92f9a32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
attachment.js
js/attachment.js
+9
-0
create.html.tmpl
template/en/default/attachment/create.html.tmpl
+3
-1
header.html.tmpl
template/en/default/global/header.html.tmpl
+5
-0
No files found.
js/attachment.js
View file @
3e0d373b
...
...
@@ -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
)
{
...
...
template/en/default/attachment/create.html.tmpl
View file @
3e0d373b
...
...
@@ -38,7 +38,9 @@
doc_section = "attachments.html"
%]
<form name="entryform" method="post" action="attachment.cgi" enctype="multipart/form-data">
<form name="entryform" method="post" action="attachment.cgi"
enctype="multipart/form-data"
onsubmit="return validateAttachmentForm(this)">
<input type="hidden" name="bugid" value="[% bug.bug_id %]">
<input type="hidden" name="action" value="insert">
<input type="hidden" name="token" value="[% token FILTER html %]">
...
...
template/en/default/global/header.html.tmpl
View file @
3e0d373b
...
...
@@ -206,6 +206,11 @@
var
BUGZILLA
=
{
param
:
{
cookiepath
:
'[% Param('
cookiepath
') FILTER js %]'
},
string
:
{
attach_desc_required
:
'You must enter a Description for this attachment.'
}
};
[
%
IF
javascript
%
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment