~ubuntu-branches/debian/stretch/alpine/stretch

« back to all changes in this revision

Viewing changes to web/cgi/alpine/1.0/querysave.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2010-10-03 15:31:55 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20101003153155-2exypc96j1e8tw0p
Tags: 2.02-1
* New upstream release, based on re-alpine project
* Updated debian/copyright to reflect this fact
* re-alpine removed the non-free from the tarball, so now
  we do not repack the upstream tarball. (Yay!)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!./tclsh
 
2
# $Id: querysave.tcl 1204 2009-02-02 19:54:23Z hubert@u.washington.edu $
 
3
# ========================================================================
 
4
# Copyright 2006 University of Washington
 
5
#
 
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
 
9
#
 
10
#     http://www.apache.org/licenses/LICENSE-2.0
 
11
#
 
12
# ========================================================================
 
13
 
 
14
#  querysave.tcl
 
15
#
 
16
#  Purpose:  CGI script to generate html form used to gather folder
 
17
#            name and collection for aggregate save
 
18
 
 
19
#  Input:
 
20
#     conftext : 
 
21
#     params : array of key/value pairs to submit with form
 
22
#     oncancel : url to reference should user cancel dialog
 
23
set qsave_vars {
 
24
}
 
25
 
 
26
#  Output:
 
27
#
 
28
#       HTML/CSS data representing the form for save folder dialog
 
29
 
 
30
# inherit global config
 
31
source ./alpine.tcl
 
32
source cmdfunc.tcl
 
33
 
 
34
set query_menu {
 
35
  {
 
36
    {}
 
37
    {
 
38
      {
 
39
        # * * * * OK * * * *
 
40
        cgi_image_button save=[WPimg but_save] border=0 alt="Save"
 
41
      }
 
42
    }
 
43
  }
 
44
  {
 
45
    {}
 
46
    {
 
47
      {
 
48
        # * * * * CANCEL * * * *
 
49
        cgi_puts [cgi_url [cgi_img [WPimg but_cancel] border=0 alt="Cancel"] wp.tcl?${oncancel}]
 
50
      }
 
51
    }
 
52
  }
 
53
}
 
54
 
 
55
WPEval $qsave_vars {
 
56
  cgi_http_head {
 
57
    WPStdHttpHdrs
 
58
  }
 
59
 
 
60
  cgi_html {
 
61
    cgi_head {
 
62
      WPStdHtmlHdr "Aggregate Save"
 
63
      WPStyleSheets
 
64
    }
 
65
 
 
66
    cgi_body BGCOLOR="$_wp(bordercolor)" {
 
67
      cgi_form $_wp(appdir)/$_wp(ui1dir)/wp method=get {
 
68
        if {[info exists params]} {
 
69
          foreach p $params {
 
70
            cgi_text "[lindex $p 0]=[lindex $p 1]" type=hidden notab
 
71
          }
 
72
        }
 
73
 
 
74
        cgi_table border=0 cellspacing=0 cellpadding=2 width="100%" height="100%" {
 
75
          cgi_table_row {
 
76
            cgi_table_data valign=top align=center class=dialog {
 
77
              cgi_text "page=selsave" type=hidden notab
 
78
              cgi_text "by=text" type=hidden notab
 
79
              cgi_text "postpage=index" type=hidden notab
 
80
 
 
81
              cgi_puts [cgi_nl][cgi_nl][cgi_nl][cgi_nl]
 
82
              cgi_puts "You are attempting to Save to a folder, '$folder', that does not exist."
 
83
              cgi_br
 
84
              cgi_puts "[cgi_nl]Click 'Create' to create the folder and save the message, or 'Cancel' to abort the save."
 
85
            }
 
86
            cgi_table_row {
 
87
              cgi_table_data {
 
88
                cgi_submit_button save=Save
 
89
                cgi_submit_button cancel=Cancel
 
90
              }
 
91
            }
 
92
          }
 
93
        }
 
94
      }
 
95
    }
 
96
  }
 
97
 
 
98
}