2
# $Id: querydelfldr.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 confirm
21
{fid "No Folder Specified"}
26
# HTML/CSS data representing the message specified
27
# by the 'uid' argument
29
# inherit global config
38
# * * * * HELP * * * *
46
if {[catch {WPCmd PEFolder collections} collections]} {
47
error [list _action "Collection list" $collections]
56
WPStdHtmlHdr "Confirm Delete"
60
cgi_body BGCOLOR="$_wp(bordercolor)" {
61
cgi_form $_wp(appdir)/wp method=get name=confirm target=_top {
62
cgi_text "page=folders" type=hidden notab
63
cgi_text "fid=$fid" type=hidden
64
cgi_text "cid=[WPCmd PEInfo key]" type=hidden
65
cgi_text "frestore=1" type=hidden
67
cgi_table border=0 cellspacing=0 cellpadding=2 width="100%" height="100%" {
70
cgi_table_data $_wp(menuargs) {
71
WPTFCommandMenu query_menu {}
75
cgi_table_data valign=top align=center class=dialog {
76
cgi_table border=0 cellspacing=0 cellpadding=2 width="75%" {
78
cgi_table_data align=center {
79
cgi_puts [cgi_nl][cgi_nl][cgi_nl][cgi_nl]
81
regsub -all { } [lindex $fid end] {\ } dfn
83
cgi_puts "Please confirm that you would like to permanently remove [cgi_bold $dfn]"
85
if {[llength $fid] > 2} {
86
if {[catch {WPCmd PEFolder delimiter [lindex $fid 0]} delim]} {
91
for {set i 1} {$i < ([llength $fid] - 1)} {incr i} {
92
append dirname "[lindex $fid $i]$delim"
95
if {[string length $dirname]} {
96
cgi_put " from the directory [cgi_bold $dirname] "
99
if {[llength $collections] > 1} {
100
cgi_put "in the collection '[lindex [lindex $collections [lindex $fid 0]] 1]'."
107
cgi_puts "Click [cgi_italic Delete] to remove the folder permanently, or [cgi_italic Cancel] to return to the Folder List."
110
cgi_submit_button delete=Delete
111
cgi_submit_button delete=Cancel