Correct errors in Google form

This commit is contained in:
Xavier Guimard 2013-09-28 06:17:12 +00:00
parent 760317e0f1
commit bb3c9bfac1
3 changed files with 8 additions and 2 deletions

View File

@ -17,7 +17,7 @@
<img src="<TMPL_VAR NAME="SKIN_PATH">/common/cancel.png" alt="" />
<lang en="Cancel" fr="Annuler" />
</button>
<button type="submit" class="positive" tabindex="3">
<button type="submit" class="positive" tabindex="3" name="google_go" value="1">
<img src="<TMPL_VAR NAME="SKIN_PATH">/common/accept.png" alt="" />
<lang en="Connect" fr="Se connecter" />
</button>

View File

@ -158,7 +158,7 @@ sub authForce {
## @method string getDisplayType
# @return display type
sub getDisplayType {
return "openidform";
return "googleform";
}
1;

View File

@ -189,6 +189,8 @@ sub display {
);
}
# TODO: Manage Google errors
# 2.5 Authentication has been refused OR this is the first access
else {
$skinfile = 'login.tpl';
@ -235,6 +237,7 @@ sub display {
REQUIRE_OLDPASSWORD =>
1, # Old password is required to check user credentials
DISPLAY_FORM => 0,
DISPLAY_GOOGLE_FORM => 0,
DISPLAY_OPENID_FORM => 0,
DISPLAY_YUBIKEY_FORM => 0,
DISPLAY_PASSWORD => 1,
@ -260,6 +263,7 @@ sub display {
%templateParams,
DISPLAY_RESETPASSWORD => 0,
DISPLAY_FORM => 0,
DISPLAY_GOOGLE_FORM => 0,
DISPLAY_OPENID_FORM => 0,
DISPLAY_YUBIKEY_FORM => 0,
AUTH_LOOP => [],
@ -280,6 +284,7 @@ sub display {
CHOICE_PARAM => $self->{authChoiceParam},
CHOICE_VALUE => $self->{_authChoice},
DISPLAY_FORM => 0,
DISPLAY_GOOGLE_FORM => 0,
DISPLAY_OPENID_FORM => 0,
DISPLAY_YUBIKEY_FORM => 0,
);
@ -295,6 +300,7 @@ sub display {
%templateParams = (
%templateParams,
DISPLAY_FORM => $displayType eq "standardform" ? 1 : 0,
DISPLAY_GOOGLE_FORM => $displayType eq "googleform" ? 1 : 0,
DISPLAY_OPENID_FORM => $displayType eq "openidform" ? 1 : 0,
DISPLAY_YUBIKEY_FORM => $displayType eq "yubikeyform"
? 1