From 945721f48f74d5cfffef7c7cf3a3d6bc2521f5dd Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 15 Jul 2003 13:16:32 +0000 Subject: import of rt 3.0.4 --- rt/html/Elements/Login | 101 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 rt/html/Elements/Login (limited to 'rt/html/Elements/Login') diff --git a/rt/html/Elements/Login b/rt/html/Elements/Login new file mode 100644 index 000000000..42c49c4af --- /dev/null +++ b/rt/html/Elements/Login @@ -0,0 +1,101 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<%INIT> +if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') { + $r->content_type("text/plain"); + $m->error_format("text"); + $m->out("RT/$RT::VERSION 401 Credentials required\n"); + $m->out("\n$Error\n") if $Error; + $m->abort; +} + + +<& /Elements/Callback, %ARGS, _CallbackName => 'Header' &> +<& /Elements/Header, Title => loc('Login'), Focus => 'user' &> + +
+% if ($Error) { +<& /Elements/TitleBoxStart, title => loc('Error') &> +<% $Error %> +<& /Elements/TitleBoxEnd &> +% } +
+<& /Elements/TitleBoxStart, width=> "40%", titleright => loc("RT [_1]", $RT::VERSION), title => loc('Login') , +contentbg=>"#cccccc" &> + +% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { +
+ + + + + +
<&|/l&>Username:
<&|/l&>Password:
+ +
+ +%# Give callbacks a chance to add more control elements +<& /Elements/Callback, %ARGS &> + +<&/Elements/TitleBoxEnd&> +% # From mason 1.0.1 forward, this doesn't work. in fact, it breaks things. +% # But on Mason 1.15 it's fixed again, so we still use it. +% # The code below iterates through everything in the passed in arguments +% # Preserving all the old parameters +% # This would be easier, except mason is 'smart' and calls multiple values +% # arrays rather than multiple hash keys +% my $key; my $val; +% foreach $key (keys %ARGS) { +% if (($key ne 'user') and ($key ne 'pass')) { +% if (ref($ARGS{$key}) =~ /ARRAY/) { +% foreach $val (@{$ARGS{$key}}) { + +% } +% } +% else { + +% } +% } +% } +
+% } +
+ +
+ +
+
+
+
+<&|/l, '2003'&>RT is © Copyright 1996-[_1] Jesse Vincent <jesse@bestpractical.com>. It is distributed under Version 2 of the GNU General Public License. + +<%ARGS> +$user => "" +$pass => undef +$goto => undef +$Error => undef + -- cgit v1.2.1