2
# $Id: selstat.tcl 391 2007-01-25 03:53:59Z mikes@u.washington.edu $
3
# ========================================================================
4
# Copyright 2006 University of Washington
6
# Licensed under the Apache License, Version 2.0 (the "License");
7
# you may not use this file except in compliance with the License.
8
# You may obtain a copy of the License at
10
# http://www.apache.org/licenses/LICENSE-2.0
12
# ========================================================================
16
# Purpose: CGI script to generate html form used to gather info
17
# for status selection
26
# HTML/CSS data representing form for status select input
28
# inherit global config
34
if {[catch {WPCmd PEMessage $uid number} thisnum]} {
48
WPStdHtmlHdr "Search By Status"
52
cgi_body BGCOLOR="$_wp(bordercolor)" {
54
catch {WPCmd PEInfo set help_context selstat}
55
catch {WPCmd PEInfo set wp_index_script fr_selstat.tcl}
57
cgi_form $_wp(appdir)/wp method=get name=auth target=body {
58
cgi_text page=index type=hidden notab
59
cgi_text doselect=1 type=hidden notab
60
cgi_text by=status type=hidden notab
61
cgi_table border=0 cellspacing=0 cellpadding=2 width="100%" height="100%" {
63
cgi_table_data align=center valign=top class=dialog {
64
cgi_table width="80%" {
66
cgi_table_data colspan=2 {
68
cgi_puts "[cgi_nl][cgi_nl]This page provides a way to search for messages in [cgi_bold [WPCmd PEMailbox mailboxname]] based on their status flags. Messages matching the status selected below will be marked with a check in the box next to their line in the Message List."
69
cgi_puts "[cgi_nl][cgi_nl]Choose the status criteria below and click 'Search', or 'Cancel' to return to the Message List.[cgi_nl][cgi_nl]"
73
if {[WPCmd PEMailbox selected]} {
74
cgi_table_row class=dialog {
75
cgi_table_data colspan=2 align=center valign=middle class=dialog colspan=2 {
76
cgi_put [cgi_font face=tahoma,verdana,geneva "Since some messages are already marked, choose whether criteria specified here should "]
78
cgi_option "search all messages in '[WPCmd PEMailbox mailboxname]'" value=broad selected
79
cgi_option "search within marked messages only." value=narrow
80
cgi_option "discard previous marks and search anew." value=new
88
cgi_text result=broad type=hidden notab
91
cgi_table_row class=dialog {
92
cgi_table_data valign=top align=center nowrap class=dialog colspan=2 {
93
cgi_puts [cgi_font face=tahoma,verdana,geneva "Search for messages "]
95
cgi_option "flagged" value=ton
96
cgi_option "NOT flagged" value=not
99
cgi_puts [cgi_font face=tahoma,verdana,geneva " :"]
112
cgi_table_data align=center colspan=2 {
114
foreach {x y} $statuses {
115
cgi_option $x value=$y
121
foreach {x y} $statuses {
123
cgi_table_data align=right width="42%" {
124
cgi_radio_button flag=$y
127
cgi_table_data align=left {
135
cgi_table_data class=dialog align=center colspan=2 {
137
cgi_submit_button ok=Search
138
cgi_submit_button cancel=Cancel
143
cgi_table_row class=dialog {
144
cgi_table_data valign=top align=center class=dialog colspan=2 {
145
cgi_puts [cgi_nl][cgi_nl][cgi_font size=-1 "Note, if the number of messages in this folder is larger than the number of lines in the Message List, then some matching messages may not be visible without paging/scrolling."]