Commit ead9413d authored by Clément OUDOT's avatar Clément OUDOT
Browse files

Possibility to control form method of info and confirm screen (references #125)

parent 9445690b
......@@ -69,6 +69,7 @@ if ( $portal->process() ) {
URL => $portal->{urldc},
HIDDEN_INPUTS => $portal->buildHiddenForm(),
ACTIVE_TIMER => $portal->{activeTimer},
FORM_METHOD => $portal->{infoFormMethod},
);
}
......@@ -138,6 +139,7 @@ elsif ( $portal->{error} == PE_CONFIRM ) {
SKIN => $skin,
HIDDEN_INPUTS => $portal->buildHiddenForm(),
ACTIVE_TIMER => $portal->{activeTimer},
FORM_METHOD => $portal->{confirmFormMethod},
);
}
......@@ -152,6 +154,7 @@ elsif ( my $info = $portal->info() ) {
URL => $portal->{urldc},
HIDDEN_INPUTS => $portal->buildHiddenForm(),
ACTIVE_TIMER => $portal->{activeTimer},
FORM_METHOD => $portal->{infoFormMethod},
);
}
......
......@@ -8,7 +8,7 @@
</div>
<hr class="solid" />
<p id="timer" class="text-error"><lang en="Automaticaly accept in 5 seconds" fr="Acceptation automatique dans 5 secondes"/></p>
<form id="form" action="<TMPL_VAR NAME="URL">" method="get" class="login">
<form id="form" action="<TMPL_VAR NAME="URL">" method="<TMPL_VAR NAME="FORM_METHOD">" class="login">
<TMPL_VAR NAME="HIDDEN_INPUTS">
<input type="hidden" name="url" value="<TMPL_VAR NAME="AUTH_URL">" />
<input type="hidden" id="confirm" name="confirm" value="1" />
......
......@@ -8,7 +8,7 @@
</div>
<hr class="solid" />
<p id="timer" class="text-error"><lang en="You'll be redirected in 10 seconds" fr="Vous allez &ecirc;tre redirig&eacute;(e) automatiquement dans 10 secondes"/></p>
<form id="form" action="<TMPL_VAR NAME="URL">" method="get" class="login">
<form id="form" action="<TMPL_VAR NAME="URL">" method="<TMPL_VAR NAME="FORM_METHOD">" class="login">
<TMPL_VAR NAME="HIDDEN_INPUTS">
<div id="content-all-info">
<TMPL_VAR NAME="MSG">
......
......@@ -6,7 +6,7 @@
<div class="loginlogo"></div>
<form id="form" action="<TMPL_VAR NAME="URL">" method="post" class="login">
<form id="form" action="<TMPL_VAR NAME="URL">" method="<TMPL_VAR NAME="FORM_METHOD">" class="login">
<TMPL_VAR NAME="HIDDEN_INPUTS">
<p><input type="hidden" name="url" value="<TMPL_VAR NAME="AUTH_URL">" /></p>
<input type="hidden" id="confirm" name="confirm" value="1" />
......
......@@ -6,7 +6,7 @@
<div class="loginlogo"></div>
<form id="form" action="<TMPL_VAR NAME="URL">" method="get" class="login">
<form id="form" action="<TMPL_VAR NAME="URL">" method="<TMPL_VAR NAME="FORM_METHOD">" class="login">
<TMPL_VAR NAME="HIDDEN_INPUTS">
<TMPL_VAR NAME="MSG">
<p id="timer"><lang en="You'll be redirected in 10 seconds" fr="Vous allez &ecirc;tre redirig&eacute;(e) automatiquement dans 10 secondes"/></p>
......
......@@ -367,6 +367,8 @@ sub setDefaultValues {
$self->{issuerDB} ||= 'Null';
$self->{multiValuesSeparator} ||= '; ';
$self->{activeTimer} = 1 unless ( defined( $self->{activeTimer} ) );
$self->{infoFormMethod} ||= "get";
$self->{confirmFormMethod} ||= "post";
# Set default userDB and passwordDB to DBI if authentication is DBI
if ( $self->{authentication} =~ /DBI/i ) {
......@@ -1631,6 +1633,12 @@ sub returnSOAPMessage {
sub autoPost {
my $self = shift;
# Display info before redirecting
if ( $self->info() ) {
$self->{infoFormMethod} = "post";
return PE_INFO;
}
# Get URL and Form fields
my $url = $self->{postUrl};
my $formFields = $self->{postFields};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment