mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-25 01:04:25 -04:00
Revise the user login code.
* Remove user registration link and popup from the theme; this shouldn't be done in a popup. Use ajaxform to simplify the way that we load the login popup. * Create form.html.php, this is a template for Forge based forms. * Move user validation rules into User_Model and let forms populate the rules into their forms as useful. * Undo r18688's changes regarding the REST code. We should never accept a null resource, this breaks the REST abstraction. * Change login and user controllers to use Forge which lets us delete login.html.php and user.html.php since those now are generated by the theme-owned form template
This commit is contained in:
@@ -2,31 +2,25 @@
|
||||
<img id="gLogo" alt="<?= _("Logo") ?>" src="<?= $theme->url("images/logo.png") ?>" />
|
||||
<h1><?= $item->title_edit ?></h1>
|
||||
|
||||
<div id="gLoginMenu">
|
||||
<ul id="gLoginMenu">
|
||||
<? if ($user): ?>
|
||||
<a href="<?= url::site("user/update")?>"><?= _("Modify Profile") ?></a>
|
||||
| <a href="<?= url::site("logout")?>" id="gLogoutLink"><?= _("Logout") ?></a>
|
||||
<a href="<?= url::site("user/update")?>"><?= _("Modify Profile") ?></a>
|
||||
| <a href="<?= url::site("logout?continue=" . url::current(true)) ?>" id="gLogoutLink">
|
||||
<?= _("Logout") ?>
|
||||
</a>
|
||||
<? else: ?>
|
||||
<a href="#"><?=_("Recover password") ?></a>
|
||||
<span id="gUserLink" >
|
||||
| <a href="javascript:show_form('#gUser')"><?= _("Register") ?></a>
|
||||
</span>
|
||||
<span id="gUserLinkText" class="gDisplayNone">
|
||||
| <?= _("Register") ?>
|
||||
</span>
|
||||
<span id="gLoginLink">
|
||||
| <a href="javascript:show_form('#gLogin')"><?= _("Login") ?></a>
|
||||
</span>
|
||||
<span id="gLoginText" class="gDisplayNone">
|
||||
| <?= _("Login") ?>
|
||||
</span>
|
||||
<span id="gLoginClose" class="gDisplayNone">
|
||||
| <a href="javascript:hide_form('#gLogin')">X</a>
|
||||
</span>
|
||||
<span id="gLoginLink">
|
||||
<a href="javascript:show_login('<?= url::site("login") ?>')">
|
||||
<?= _("Login") ?>
|
||||
</a>
|
||||
</span>
|
||||
<span id="gLoginClose" class="gDisplayNone">
|
||||
<?= _("Login") ?> | <a href="javascript:close_login()">X</a>
|
||||
</span>
|
||||
<div id="gLoginFormContainer"></div>
|
||||
<? endif; ?>
|
||||
<span id="gUserForm" class="gDisplayNone" formSrc="<?= url::site("user/dispatch/") ?>"></span>
|
||||
<span id="gLoginForm" class="gDisplayNone" formSrc="<?= url::site("login") ?>"></span>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
<ul id="gSiteMenu">
|
||||
<li><a href="<?= url::base() ?>"><?= _("HOME") ?></a></li>
|
||||
<li><a class="active" href="<?= url::site("album/1") ?>"><?= _("BROWSE") ?></a></li>
|
||||
@@ -38,7 +32,7 @@
|
||||
<form id="gSearchForm" class="gInline">
|
||||
<ul class="gNoLabels">
|
||||
<li><input type="text" value="<?= _("Search Gallery ...") ?>"/></li>
|
||||
<li><input type="submit" value="search" /></li>
|
||||
<li><input type="submit" value="<?= _("search") ?>" /></li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user