2
# $Id: promptsave.tcl 1204 2009-02-02 19:54:23Z hubert@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 folder
17
# name and collection for aggregate save
21
# params : array of key/value pairs to submit with form
22
# oncancel : url to reference should user cancel dialog
29
# HTML/CSS data representing the form for save folder dialog
31
# inherit global config
41
cgi_image_button save=[WPimg but_save] border=0 alt="Save"
49
# * * * * CANCEL * * * *
50
cgi_puts [cgi_url [cgi_img [WPimg but_cancel] border=0 alt="Cancel"] wp.tcl?${oncancel}]
63
WPStdHtmlHdr "Aggregate Save"
67
cgi_body BGCOLOR="$_wp(bordercolor)" {
69
catch {WPCmd PEInfo set help_context promptsave}
70
catch {WPCmd PEInfo set wp_index_script fr_promptsave.tcl}
72
cgi_form $_wp(appdir)/$_wp(ui1dir)/wp method=get name=auth target=body {
73
cgi_text page=body type=hidden notab
75
cgi_table border=0 cellspacing=0 cellpadding=2 width="100%" height="100%" {
77
cgi_table_data align=center valign=top class=dialog {
78
cgi_table width="80%" {
80
cgi_table_data colspan=2 {
82
cgi_puts "[cgi_nl][cgi_nl]This page provides a way to save messages to a folder"
86
cgi_table_row class=dialog {
87
cgi_table_data valign=top align=center nowrap class=dialog colspan=2 {
88
cgi_puts [cgi_font face=tahoma,verdana,geneva "Save for messages "]
93
set n [WPCmd PEMailbox selected]
94
cgi_put "all [cgi_bold [WPcomma $n]] marked message[WPplural $n] "
95
if {[catch {WPCmd PEMessage $uid savedefault} savedefault]} {
96
set savedefault [list 1 saved-messages]
99
set savedefault [list 1 saved-messages]
105
cgi_text "savename=[lindex $savedefault 1]" type=text size=14 maxlength=256 class=aggop style=vertical-align:middle onFocus=this.select()
106
if {[catch {WPCmd PEFolder collections} collections] == 0 && [llength $collections] > 1} {
107
cgi_put "[cgi_nbspace]in "
108
cgi_select savecolid class=aggop style=vertical-align:middle {
109
set defcol [lindex $savedefault 0]
111
foreach i $collections {
113
set selected selected
117
if {[string length [set f [lindex $i 1]]] > 12} {
118
set f "[string range $f 0 10]..."
121
cgi_option $f value=$j $selected
126
cgi_text "savecolid=0" type=hidden notab
130
cgi_puts "[cgi_nl]Click [cgi_italic Save] to save the message the folder, or [cgi_italic Cancel] to abort the save."
135
cgi_table_data class=dialog align=center colspan=2 {
137
cgi_submit_button save=Save
138
cgi_submit_button savecancel=Cancel