fixed login dialogue
git-svn-id: http://yolanda.mister-muffin.de/svn@150 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
46ec3555af
commit
8575d7509f
3 changed files with 65 additions and 45 deletions
|
@ -144,9 +144,8 @@ if($query->param('action'))
|
|||
}
|
||||
else
|
||||
{
|
||||
#someone is messing with the args
|
||||
$page->{'message'}->{'type'} = "error";
|
||||
$page->{'message'}->{'text'} = "error_202c";
|
||||
#if not, print login form
|
||||
$page->{'loginform'}->{'action'} = 'openid';
|
||||
|
||||
#print xml http header along with session cookie
|
||||
print $session->header(-type=>'text/xml', -charset=>'UTF-8');
|
||||
|
@ -183,7 +182,7 @@ elsif($username)
|
|||
else
|
||||
{
|
||||
#if not, print login form
|
||||
$page->{loginform} = [''];
|
||||
$page->{'loginform'} = [''];
|
||||
|
||||
#print xml http header along with session cookie
|
||||
print $session->header(-type=>'text/xml', -charset=>'UTF-8');
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
<str id=""></str>-->
|
||||
<str id="page_account">/account.pl</str>
|
||||
<str id="page_bookmarks"></str>
|
||||
<str id="page_login">login.pl</str>
|
||||
<str id="page_login-openid">login-openid.pl</str>
|
||||
<str id="page_logout">login.pl?action=logout</str>
|
||||
<str id="page_login">/login.pl</str>
|
||||
<str id="page_login-openid">/login.pl?action=openid</str>
|
||||
<str id="page_logout">/login.pl?action=logout</str>
|
||||
<str id="page_gnutube-authors">INSERT LINK TO GNUTUBE AUTHORS HERE</str>
|
||||
<str id="page_gnutube-license">http://gplv3.fsf.org/agplv3-dd1.html</str>
|
||||
<str id="page_gnutube-source-code">http://mister-muffin.de/proj/browser</str>
|
||||
<str id="page_register">register.pl</str>
|
||||
<str id="page_register">/register.pl</str>
|
||||
<str id="page_results">search.pl?query=</str>
|
||||
<str id="page_upload">/upload.pl</str>
|
||||
<str id="page_uploader">uploader.pl</str>
|
||||
|
|
|
@ -358,7 +358,36 @@
|
|||
<xsl:call-template name="searchbar"/>
|
||||
|
||||
<div class="loginform">
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="//loginform/@action='openid'">
|
||||
<form method="post">
|
||||
<xsl:attribute name="action">
|
||||
<xsl:value-of select="$site_strings[@id='page_login']" />
|
||||
</xsl:attribute>
|
||||
<fieldset>
|
||||
<input name="action" type="hidden" value="openid" />
|
||||
OpenID:
|
||||
<br />
|
||||
<input name="user" type="text" style="background: url(http://stat.livejournal.com/img/openid-inputicon.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px;" />
|
||||
<br />
|
||||
e.g. http://username.myopenid.com
|
||||
<br />
|
||||
<input type="submit" name="login" >
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_login']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
<br />
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="$site_strings[@id='page_login']" />
|
||||
</xsl:attribute>
|
||||
login with normal account
|
||||
</a>
|
||||
</fieldset>
|
||||
</form>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<form method="post">
|
||||
<xsl:attribute name="action">
|
||||
<xsl:value-of select="$site_strings[@id='page_login']" />
|
||||
|
@ -378,25 +407,17 @@
|
|||
<xsl:value-of select="$locale_strings[@id='button_login']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
<br />
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="$site_strings[@id='page_login-openid']" />
|
||||
</xsl:attribute>
|
||||
login with openid
|
||||
</a>
|
||||
</fieldset>
|
||||
</form>
|
||||
<form method="post">
|
||||
<xsl:attribute name="action">
|
||||
<xsl:value-of select="$site_strings[@id='page_login']" />
|
||||
</xsl:attribute>
|
||||
<fieldset>
|
||||
<input name="action" type="hidden" value="openid" />
|
||||
<xsl:value-of select="$locale_strings[@id='username']" />:
|
||||
<br />
|
||||
<input name="user" type="text" size="30" maxlength="30" />
|
||||
<br />
|
||||
<input type="submit" name="login" >
|
||||
<xsl:attribute name="value">
|
||||
<xsl:value-of select="$locale_strings[@id='button_login']" />
|
||||
</xsl:attribute>
|
||||
</input>
|
||||
</fieldset>
|
||||
</form>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
|
||||
</xsl:template>
|
||||
|
|
Loading…
Reference in a new issue