2
# $Id: queryauth.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 ask for authentication
21
{cid "Missing Command ID"}
22
{authcol "Missing Authenticaion Collection"}
23
{authfolder "Missing Authentication Folder"}
24
{authpage "No Post Authorization Instructions"}
25
{authcancel "No Auth Cancel Instructions"}
32
# HTML/Javascript/CSS data representing the message specified
33
# by the 'uid' argument
36
# inherit global config
38
source ../$_wp(appdir)/cmdfunc.tcl
46
# * * * * Help * * * *
56
if {$cid != [WPCmd PEInfo key]} {
57
error [list _action open "Invalid Operation ID" "Click Back button to try again."]
66
WPStdHtmlHdr "Authentication Credentials"
70
if {[string length $authuser]} {
71
set onload "onLoad=document.auth.pass.focus()"
73
set onload "onLoad=document.auth.user.focus()"
76
cgi_body BGCOLOR="$_wp(bordercolor)" $onload {
77
cgi_form $_wp(serverpath)/session/setauth.tcl method=post enctype=multipart/form-data name=auth target=_top {
78
cgi_text "sessid=$sessid" type=hidden notab
79
cgi_text "cid=$cid" type=hidden notab
80
cgi_text "authcol=$authcol" type=hidden notab
81
cgi_text "authfolder=$authfolder" type=hidden notab
82
cgi_text "authpage=$authpage" type=hidden notab
83
cgi_text "authcancel=$authcancel" type=hidden notab
85
cgi_table border=0 cellspacing=0 cellpadding=2 width="100%" height="100%" {
88
cgi_table_data $_wp(menuargs) {
89
WPTFCommandMenu query_menu {}
93
cgi_table_data valign=top class=dialog {
94
cgi_division align=center class=dialog "style=\"padding:30 12%\"" {
95
if {[info exists reason] && [string compare $reason BADPASSWD]} {
98
cgi_puts "Login Required"
103
cgi_puts [cgi_font size=+1 class=dialog "Username: "]
104
cgi_text user=$authuser maxlength=30 size=25%
107
cgi_puts [cgi_font size=+1 class=dialog "Password: "]
108
cgi_text pass= type=password maxlength=30 size=25%
111
cgi_submit_button auths=Login
112
cgi_submit_button cancel=Cancel