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
2fbdc1d8
Commit
2fbdc1d8
authored
Apr 27, 2002
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 138284 - prepare for Bugzilla Helper replacement enter_bug template. Patch…
Bug 138284 - prepare for Bugzilla Helper replacement enter_bug template. Patch by gerv; r=bbaetz, myk.
parent
48fcdfb5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
9 deletions
+34
-9
enter_bug.cgi
enter_bug.cgi
+20
-4
globals.pl
globals.pl
+3
-0
create.html.tmpl
template/en/default/bug/create/create.html.tmpl
+3
-2
choose-product.html.tmpl
template/en/default/global/choose-product.html.tmpl
+3
-2
list-simple.html.tmpl
template/en/default/list/list-simple.html.tmpl
+5
-1
No files found.
enter_bug.cgi
View file @
2fbdc1d8
...
@@ -86,6 +86,7 @@ if (!defined $::FORM{'product'}) {
...
@@ -86,6 +86,7 @@ if (!defined $::FORM{'product'}) {
$vars
->
{
'proddesc'
}
=
\%
products
;
$vars
->
{
'proddesc'
}
=
\%
products
;
$vars
->
{
'target'
}
=
"enter_bug.cgi"
;
$vars
->
{
'target'
}
=
"enter_bug.cgi"
;
$vars
->
{
'format'
}
=
$::FORM
{
'format'
};
$vars
->
{
'title'
}
=
"Enter Bug"
;
$vars
->
{
'title'
}
=
"Enter Bug"
;
$vars
->
{
'h2'
}
=
$vars
->
{
'h2'
}
=
"First, you must pick a product on which to enter a bug."
;
"First, you must pick a product on which to enter a bug."
;
...
@@ -258,9 +259,23 @@ elsif (1 == @{$::components{$product}}) {
...
@@ -258,9 +259,23 @@ elsif (1 == @{$::components{$product}}) {
$::FORM
{
'component'
}
=
$::components
{
$product
}
->
[
0
];
$::FORM
{
'component'
}
=
$::components
{
$product
}
->
[
0
];
}
}
my
@components
;
SendSQL
(
"SELECT value, description FROM components "
.
"WHERE program = "
.
SqlQuote
(
$product
)
.
" ORDER BY value"
);
while
(
MoreSQLData
())
{
my
(
$name
,
$description
)
=
FetchSQLData
();
my
%
component
;
$component
{
'name'
}
=
$name
;
$component
{
'description'
}
=
$description
;
push
@components
,
\%
component
;
}
my
%
default
;
my
%
default
;
$vars
->
{
'component_'
}
=
$::components
{
$product
}
;
$vars
->
{
'component_'
}
=
\
@components
;
$default
{
'component_'
}
=
formvalue
(
'component'
);
$default
{
'component_'
}
=
formvalue
(
'component'
);
$vars
->
{
'assigned_to'
}
=
formvalue
(
'assigned_to'
);
$vars
->
{
'assigned_to'
}
=
formvalue
(
'assigned_to'
);
...
@@ -359,7 +374,8 @@ if ($::usergroupset ne '0') {
...
@@ -359,7 +374,8 @@ if ($::usergroupset ne '0') {
$vars
->
{
'default'
}
=
\%
default
;
$vars
->
{
'default'
}
=
\%
default
;
print
"Content-type: text/html\n\n"
;
my
$format
=
ValidateOutputFormat
(
$::FORM
{
'format'
},
"create"
);
$template
->
process
(
"bug/create/create.html.tmpl"
,
$vars
)
print
"Content-type: $format->{'contenttype'}\n\n"
;
$template
->
process
(
"bug/create/$format->{'template'}"
,
$vars
)
||
ThrowTemplateError
(
$template
->
error
());
||
ThrowTemplateError
(
$template
->
error
());
exit
;
globals.pl
View file @
2fbdc1d8
...
@@ -1750,6 +1750,9 @@ $::vars =
...
@@ -1750,6 +1750,9 @@ $::vars =
# SyncAnyPendingShadowChanges - called in the footer to sync the shadowdb
# SyncAnyPendingShadowChanges - called in the footer to sync the shadowdb
'SyncAnyPendingShadowChanges'
=>
\&
SyncAnyPendingShadowChanges
,
'SyncAnyPendingShadowChanges'
=>
\&
SyncAnyPendingShadowChanges
,
# User Agent - useful for detecting in templates
'user_agent'
=>
$ENV
{
'HTTP_USER_AGENT'
}
,
};
};
1
;
1
;
template/en/default/bug/create/create.html.tmpl
View file @
2fbdc1d8
...
@@ -78,8 +78,9 @@
...
@@ -78,8 +78,9 @@
<td>
<td>
<select name="component" size="5">
<select name="component" size="5">
[%- FOREACH c = component_ %]
[%- FOREACH c = component_ %]
<option value="[% c FILTER html %]"
<option value="[% c.name FILTER html %]"
[% " selected=\"selected\"" IF c == default.component_ %]>[% c FILTER html -%]
[% " selected=\"selected\"" IF c.name == default.component_ %]>
[% c.name FILTER html -%]
</option>
</option>
[%- END %]
[%- END %]
</select>
</select>
...
...
template/en/default/global/choose-product.html.tmpl
View file @
2fbdc1d8
...
@@ -27,8 +27,9 @@
...
@@ -27,8 +27,9 @@
[% FOREACH p = proddesc.keys.sort %]
[% FOREACH p = proddesc.keys.sort %]
<tr>
<tr>
<th align="right" valign="top">
<th align="right" valign="top">
<a href="[% target %]?product=[% p FILTER url_quote %]">
<a href="[% target %]?product=[% p FILTER url_quote %]
[% p FILTER html %]</a>:
[%- "&format=$format" IF format %]">
[% p FILTER html %]</a>:
</th>
</th>
[% IF proddesc.$p %]
[% IF proddesc.$p %]
...
...
template/en/default/list/list-simple.html.tmpl
View file @
2fbdc1d8
...
@@ -39,7 +39,11 @@
...
@@ -39,7 +39,11 @@
</head>
</head>
<body>
<body>
[% PROCESS list/table.html.tmpl %]
[% IF bugs.size == 0 %]
<h3>
Zarro Boogs found.
</h3>
[% ELSE %]
[% PROCESS list/table.html.tmpl %]
[% END %]
</body>
</body>
</html>
</html>
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