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
|
else
|
||||||
{
|
{
|
||||||
#someone is messing with the args
|
#if not, print login form
|
||||||
$page->{'message'}->{'type'} = "error";
|
$page->{'loginform'}->{'action'} = 'openid';
|
||||||
$page->{'message'}->{'text'} = "error_202c";
|
|
||||||
|
|
||||||
#print xml http header along with session cookie
|
#print xml http header along with session cookie
|
||||||
print $session->header(-type=>'text/xml', -charset=>'UTF-8');
|
print $session->header(-type=>'text/xml', -charset=>'UTF-8');
|
||||||
|
@ -183,7 +182,7 @@ elsif($username)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if not, print login form
|
#if not, print login form
|
||||||
$page->{loginform} = [''];
|
$page->{'loginform'} = [''];
|
||||||
|
|
||||||
#print xml http header along with session cookie
|
#print xml http header along with session cookie
|
||||||
print $session->header(-type=>'text/xml', -charset=>'UTF-8');
|
print $session->header(-type=>'text/xml', -charset=>'UTF-8');
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
<str id=""></str>-->
|
<str id=""></str>-->
|
||||||
<str id="page_account">/account.pl</str>
|
<str id="page_account">/account.pl</str>
|
||||||
<str id="page_bookmarks"></str>
|
<str id="page_bookmarks"></str>
|
||||||
<str id="page_login">login.pl</str>
|
<str id="page_login">/login.pl</str>
|
||||||
<str id="page_login-openid">login-openid.pl</str>
|
<str id="page_login-openid">/login.pl?action=openid</str>
|
||||||
<str id="page_logout">login.pl?action=logout</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-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-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_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_results">search.pl?query=</str>
|
||||||
<str id="page_upload">/upload.pl</str>
|
<str id="page_upload">/upload.pl</str>
|
||||||
<str id="page_uploader">uploader.pl</str>
|
<str id="page_uploader">uploader.pl</str>
|
||||||
|
|
|
@ -358,45 +358,66 @@
|
||||||
<xsl:call-template name="searchbar"/>
|
<xsl:call-template name="searchbar"/>
|
||||||
|
|
||||||
<div class="loginform">
|
<div class="loginform">
|
||||||
|
<xsl:choose>
|
||||||
<form method="post">
|
<xsl:when test="//loginform/@action='openid'">
|
||||||
<xsl:attribute name="action">
|
<form method="post">
|
||||||
<xsl:value-of select="$site_strings[@id='page_login']" />
|
<xsl:attribute name="action">
|
||||||
</xsl:attribute>
|
<xsl:value-of select="$site_strings[@id='page_login']" />
|
||||||
<fieldset>
|
|
||||||
<input name="action" type="hidden" value="login" />
|
|
||||||
<xsl:value-of select="$locale_strings[@id='username']" />:
|
|
||||||
<br />
|
|
||||||
<input name="user" type="text" size="30" maxlength="30" />
|
|
||||||
<br />
|
|
||||||
<xsl:value-of select="$locale_strings[@id='password']" />:
|
|
||||||
<br />
|
|
||||||
<input name="pass" type="password" 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>
|
</xsl:attribute>
|
||||||
</input>
|
<fieldset>
|
||||||
</fieldset>
|
<input name="action" type="hidden" value="openid" />
|
||||||
</form>
|
OpenID:
|
||||||
<form method="post">
|
<br />
|
||||||
<xsl:attribute name="action">
|
<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;" />
|
||||||
<xsl:value-of select="$site_strings[@id='page_login']" />
|
<br />
|
||||||
</xsl:attribute>
|
e.g. http://username.myopenid.com
|
||||||
<fieldset>
|
<br />
|
||||||
<input name="action" type="hidden" value="openid" />
|
<input type="submit" name="login" >
|
||||||
<xsl:value-of select="$locale_strings[@id='username']" />:
|
<xsl:attribute name="value">
|
||||||
<br />
|
<xsl:value-of select="$locale_strings[@id='button_login']" />
|
||||||
<input name="user" type="text" size="30" maxlength="30" />
|
</xsl:attribute>
|
||||||
<br />
|
</input>
|
||||||
<input type="submit" name="login" >
|
<br />
|
||||||
<xsl:attribute name="value">
|
<a>
|
||||||
<xsl:value-of select="$locale_strings[@id='button_login']" />
|
<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']" />
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</input>
|
<fieldset>
|
||||||
</fieldset>
|
<input name="action" type="hidden" value="login" />
|
||||||
</form>
|
<xsl:value-of select="$locale_strings[@id='username']" />:
|
||||||
|
<br />
|
||||||
|
<input name="user" type="text" size="30" maxlength="30" />
|
||||||
|
<br />
|
||||||
|
<xsl:value-of select="$locale_strings[@id='password']" />:
|
||||||
|
<br />
|
||||||
|
<input name="pass" type="password" 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>
|
||||||
|
<br />
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="$site_strings[@id='page_login-openid']" />
|
||||||
|
</xsl:attribute>
|
||||||
|
login with openid
|
||||||
|
</a>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
Loading…
Reference in a new issue