From: Michal Vaner Date: Fri, 15 Aug 2008 12:49:23 +0000 (+0200) Subject: Use empty URLs for POST forms X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=4a2376575b2234e9fa3ed60b7527de03c58e3f0a;p=pciids.git Use empty URLs for POST forms It will use the same url as the current one. --- diff --git a/PciIds/Html/Admin.pm b/PciIds/Html/Admin.pm index a1b6cb1..e945bd7 100644 --- a/PciIds/Html/Admin.pm +++ b/PciIds/Html/Admin.pm @@ -14,7 +14,7 @@ sub genNewAdminForm( $$$$ ) { genHtmlHead( $req, 'Administration ‒ pending events', undef ); print "

Administration ‒ pending events

\n"; print "
".$error."
\n" if( defined $error ); - print '
\n"; + print "\n"; my $lastId; my $started = 0; my $cnt = 0; diff --git a/PciIds/Html/Changes.pm b/PciIds/Html/Changes.pm index ff5242b..d31c916 100644 --- a/PciIds/Html/Changes.pm +++ b/PciIds/Html/Changes.pm @@ -16,7 +16,7 @@ sub genNewItemForm( $$$$$ ) { genHtmlHead( $req, "$prettyAddr - add new item", undef ); print "

$prettyAddr - add new item

\n"; print "
$error
\n" if( defined $error ); - print "\n"; + print "\n
"; genFormEx( [ [ 'input', 'Id:', 'text', 'id', 'maxlength="50"' ], [ 'input', 'Name:', 'text', 'name', 'maxlength="200"' ], [ 'input', 'Description*:', 'text', 'description', 'maxlength="1024"' ], @@ -85,7 +85,7 @@ sub genNewCommentForm( $$$$$ ) { genHtmlHead( $req, "$prettyAddr - add a comment to discussion", undef ); print "

$prettyAddr - add a comment to discussion

\n"; print "
$error
\n" if( defined $error ); - print "\n
"; + print "\n
"; genFormEx( [ [ 'textarea', 'Text:', undef, 'text', 'rows="5" cols="50"' ], [ 'input', 'Name*:', 'text', 'name', 'maxlength="200"' ], [ 'input', 'Description*:', 'text', 'description', 'maxlength="1024"' ], diff --git a/PciIds/Html/Notifications.pm b/PciIds/Html/Notifications.pm index 8dcdaed..042f064 100644 --- a/PciIds/Html/Notifications.pm +++ b/PciIds/Html/Notifications.pm @@ -27,7 +27,7 @@ sub genNotifForm( $$$$$$ ) { } } print "\n" if( $started ); - print "\n"; + print "\n"; print "

{'recursive'} ? " checked='checked'" : "" )."> Recursive\n"; print "

Notification level

\n"; print "

\n"; diff --git a/PciIds/Html/Users.pm b/PciIds/Html/Users.pm index bea6669..c5ed90e 100644 --- a/PciIds/Html/Users.pm +++ b/PciIds/Html/Users.pm @@ -20,7 +20,7 @@ sub genRegisterForm( $$$$ ) { genHtmlHead( $req, 'Register a new user', undef ); print '

Register a new user

'; print '
'.$error.'
' if( defined $error ); - print ' + print '
'; genForm( [ [ 'Email:', 'text', 'email', 'maxlength="255"' ], [ '', 'submit', 'register', 'value="Register"' ] ], $values ); @@ -83,7 +83,7 @@ sub genConfirmForm( $$$$ ) { print '

Confirm registration

'; print '
'.$error.'
' if( defined $error ); print '

Email address: '.encode( $values->{'email'} ); - print ''; + print ''; print '

'; print '
'; genForm( [ [ 'Login (Optional):', 'text', 'login', 'maxlength="50"' ], @@ -182,7 +182,7 @@ sub genLoginForm( $$$$ ) { my $addr = PciIds::Address::new( $req->uri() ); genCustomMenu( $addr, $args, [ [ 'Register', 'register' ], [ 'Reset password', 'respass' ] ] ); print '

'.$error.'

' if( defined $error ); - print '
'; + print '
'; genForm( [ [ 'Login name or email:', 'text', 'login', 'maxlength="255"' ], [ 'Password:', 'password', 'password' ], [ '', 'submit', 'login', 'value="Login"' ] ], $values ); @@ -260,7 +260,7 @@ sub genResetPasswdForm( $$$$ ) { print "

If you forgot your password (or didn't create one yet), you can reset it to a new value here.\n"; print "Provide your email address here and further instructions will be sent to you.\n"; print '

'.$error.'
' if( defined $error ); - print ' + print '
'; genForm( [ [ 'Email:', 'text', 'email', 'maxlength="255"' ], [ '', 'submit', 'respass', 'value="Send"' ] ], $values ); @@ -308,7 +308,7 @@ sub genResetPasswdConfigForm( $$$$$$ ) { print "

Reset password

\n"; print '
'.$error.'
' if( defined $error ); print "

You can enter new password here:\n"; - print ' + print '

'; genForm( [ [ 'Password:', 'password', 'password' ], [ 'Confirm password:', 'password', 'confirm_password' ], @@ -376,7 +376,7 @@ sub genProfileForm( $$$$$ ) { print "

User profile

\n"; print '

'.$error.'

' if defined $error; print "

$info

\n" if defined $info; - print '
'; + print '
'; genForm( [ [ 'Email:', 'text', 'email', 'maxlength="255"' ], [ 'Login:', 'text', 'login', 'maxlength="50"' ], [ 'Xmpp:', 'text', 'xmpp', 'maxlength="255"' ], diff --git a/TODO b/TODO index 4931dab..5e660d5 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,2 @@ • deescape data from URL • In query, what do ? mean? Are they allowed? -• POST forms can be empty urls