Indentation
[squirrelmail.git] / plugins / bug_report / functions.php
CommitLineData
c64dbf73 1<?php
2/**
3 * functions for bug_report plugin
4 *
5 * functions/forms.php and functions/html.php have to be loaded before including this file.
6 *
7 * @copyright (c) 2004 The SquirrelMail Project Team
8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
9 * @version $Id$
10 * @package plugins
11 * @subpackage bug_report
12 */
13
14/**
15 * Creates gmane search form
16 *
17 * Requires html v.4.0 compatible browser
18 * @return string html formated form
19 */
20function add_gmane_form() {
21 // Start form (need target="_blank" element)
22 $ret=addForm('http://search.gmane.org/search.php','get','mform');
23
24 // Add visible options
25 $ret.=html_tag('table',
26 html_tag('tr',
27 html_tag('td',_("Search for words:"),'right') .
28 html_tag('td',addInput('query','',50),'left')
29 ) .
30 html_tag('tr',
31 html_tag('td',_("Written by:") . '<br />' .
32 '<small>' . _("Email addresses only") . '</small>','right') .
33 html_tag('td',addInput('email','',40),'left')
34 ) .
35 html_tag('tr',
36 html_tag('td',_("Mailing list:"),'right') .
37 html_tag('td',addSelect('group',array('gmane.mail.squirrelmail.user'
38 => _("SquirrelMail users list"),
39 'gmane.mail.squirrelmail.plugins'
40 => _("SquirrelMail plugins list"),
41 'gmane.mail.squirrelmail.devel'
42 => _("SquirrelMail developers list"),
43 'gmane.mail.squirrelmail.internationalization'
44 => _("SquirrelMail internationalization list"))
45 ,'gmane.mail.squirrelmail.user',true),'left')
46 ) .
47 html_tag('tr',
48 html_tag('td',_("Sort by:"),'right') .
49 html_tag('td',addSelect('sort',array('date' => _("Date"),
50 'relevance' => _("Relevance"))
51 ,'date',true),'left')
52 ) .
53 html_tag('tr',
54 html_tag('td',
55 '<button type="submit" name="submit" value="submit">' . _("Search Archives") . "</button>\n" .
56 '<button type="reset" name="reset" value="reset">' . _("Reset Form") . "</button>\n"
57 ,'center','','colspan="2"')
58 ),
59 'center');
60
61 // Close form
62 $ret.="</form>\n";
63
64 // Return form
65 return $ret;
66}
67
68/**
69 * Creates SquirrelMail SF bugtracker search form
70 *
71 * Requires html v.4.0 compatible browser
72 * @return string html formated form
73 */
74function add_sf_bug_form() {
75 // Start form
76 $ret=addForm('http://sourceforge.net/tracker/index.php','post');
77
78 // Add hidden options (some input fields are hidden from end user)
79 $ret.=addHidden('group_id','311') .
80 addHidden('atid','100311') .
81 addHidden('set','custom') .
82 addHidden('_assigned_to','0') .
83 addHidden('_status','100') .
84 addHidden('_category','100') .
85 addHidden('_group','100') .
86 addHidden('by_submitter','');
87
88 // Add visible input fields and buttons
89 $ret.=html_tag('table',
90 html_tag('tr',
91 html_tag('td',_("Summary keyword:"),'right') .
92 html_tag('td',addInput('summary_keyword','',20,80),'left')
93 ) .
94 html_tag('tr',
95 html_tag('td',_("Sort By:"),'right') .
96 html_tag('td',
97 addSelect('order',array('artifact_id' => _("ID"),
98 'priority' => _("Priority"),
99 'summary' => _("Summary"),
100 'open_date' => _("Open Date"),
101 'close_date' => _("Close Date"),
102 'submitted_by' => _("Submitter"),
103 'assigned_to' => _("Assignee")),
104 'artifact_id',true),'left')
105 ) .
106 html_tag('tr',
107 html_tag('td',_("Order:"),'right') .
108 html_tag('td',
109 addSelect('sort',array('ASC'=>_("Ascending"),
110 'DESC'=>_("Descending")),
111 'DESC',true),
112 'left')
113 ) .
114 html_tag('tr',
115 html_tag('td',
116 '<button type="submit" name="submit" value="submit">' . _("Search Bugtracker") . "</button>\n" .
117 '<button type="reset" name="reset" value="reset">' . _("Reset Form") . "</button>\n"
118 ,'center','','colspan="2"')
119 )
120 ,'center');
121
122 // Close form
123 $ret.="</form>\n";
124
125 // Return form
126 return $ret;
127}
128?>