From: tokul Date: Mon, 10 May 2004 17:03:20 +0000 (+0000) Subject: Adding forms for searching Gmane and SF bugtracker X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=c64dbf73f7e8ce957a638ed3e2ebef1734ddcb32;hp=15ee328a64a3a124585c5d12d9b977aaa694218f Adding forms for searching Gmane and SF bugtracker git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7425 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/bug_report/bug_report.php b/plugins/bug_report/bug_report.php index 35757acf..1c82086f 100644 --- a/plugins/bug_report/bug_report.php +++ b/plugins/bug_report/bug_report.php @@ -31,6 +31,7 @@ require_once(SM_PATH . 'functions/forms.php'); displayPageHeader($color, 'None'); include_once(SM_PATH . 'plugins/bug_report/system_specs.php'); +include_once(SM_PATH . 'plugins/bug_report/functions.php'); global $body; $body_top = "I subscribe to the squirrelmail-users mailing list.\n" . @@ -114,4 +115,25 @@ $body = htmlspecialchars($body_top) . $body; +
+ ') + ) . + html_tag('tr', + html_tag('th',_("Search SourceForge Bugtracker"),'center',$color[0]) + ) . + html_tag('tr', + html_tag('td', add_sf_bug_form()) + ) + ,'center','','width="95%"'); + ?> diff --git a/plugins/bug_report/functions.php b/plugins/bug_report/functions.php new file mode 100644 index 00000000..733bebe6 --- /dev/null +++ b/plugins/bug_report/functions.php @@ -0,0 +1,128 @@ +' . + '' . _("Email addresses only") . '','right') . + html_tag('td',addInput('email','',40),'left') + ) . + html_tag('tr', + html_tag('td',_("Mailing list:"),'right') . + html_tag('td',addSelect('group',array('gmane.mail.squirrelmail.user' + => _("SquirrelMail users list"), + 'gmane.mail.squirrelmail.plugins' + => _("SquirrelMail plugins list"), + 'gmane.mail.squirrelmail.devel' + => _("SquirrelMail developers list"), + 'gmane.mail.squirrelmail.internationalization' + => _("SquirrelMail internationalization list")) + ,'gmane.mail.squirrelmail.user',true),'left') + ) . + html_tag('tr', + html_tag('td',_("Sort by:"),'right') . + html_tag('td',addSelect('sort',array('date' => _("Date"), + 'relevance' => _("Relevance")) + ,'date',true),'left') + ) . + html_tag('tr', + html_tag('td', + '\n" . + '\n" + ,'center','','colspan="2"') + ), + 'center'); + + // Close form + $ret.="\n"; + + // Return form + return $ret; +} + +/** + * Creates SquirrelMail SF bugtracker search form + * + * Requires html v.4.0 compatible browser + * @return string html formated form + */ +function add_sf_bug_form() { + // Start form + $ret=addForm('http://sourceforge.net/tracker/index.php','post'); + + // Add hidden options (some input fields are hidden from end user) + $ret.=addHidden('group_id','311') . + addHidden('atid','100311') . + addHidden('set','custom') . + addHidden('_assigned_to','0') . + addHidden('_status','100') . + addHidden('_category','100') . + addHidden('_group','100') . + addHidden('by_submitter',''); + + // Add visible input fields and buttons + $ret.=html_tag('table', + html_tag('tr', + html_tag('td',_("Summary keyword:"),'right') . + html_tag('td',addInput('summary_keyword','',20,80),'left') + ) . + html_tag('tr', + html_tag('td',_("Sort By:"),'right') . + html_tag('td', + addSelect('order',array('artifact_id' => _("ID"), + 'priority' => _("Priority"), + 'summary' => _("Summary"), + 'open_date' => _("Open Date"), + 'close_date' => _("Close Date"), + 'submitted_by' => _("Submitter"), + 'assigned_to' => _("Assignee")), + 'artifact_id',true),'left') + ) . + html_tag('tr', + html_tag('td',_("Order:"),'right') . + html_tag('td', + addSelect('sort',array('ASC'=>_("Ascending"), + 'DESC'=>_("Descending")), + 'DESC',true), + 'left') + ) . + html_tag('tr', + html_tag('td', + '\n" . + '\n" + ,'center','','colspan="2"') + ) + ,'center'); + + // Close form + $ret.="\n"; + + // Return form + return $ret; +} +?> \ No newline at end of file