import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
44
modules/users/views/scripts/login/index.phtml
Executable file → Normal file
44
modules/users/views/scripts/login/index.phtml
Executable file → Normal file
@ -10,6 +10,9 @@
|
||||
<li>
|
||||
<a href="<?php echo $this->base ?>/users/personalinfo"><?php echo $this->translate('Personal Info') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $this->base ?>/users/signinimage"><?php echo $this->translate('Sign-in Image') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $this->base ?>/sites"><?php echo $this->translate('Sites database') ?></a>
|
||||
</li>
|
||||
@ -53,9 +56,22 @@
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<form id="loginForm" action="<?php echo $this->loginTargetBase ?>/users/login/authenticate" method="post" class="formGrid">
|
||||
<div id="credentials">
|
||||
<? if ($this->image): ?>
|
||||
<div>
|
||||
<img src="<?= $this->base ?>/users/signinimage/image/id/<?= $this->image->cookie ?>"
|
||||
width="<?= $this->image->getWidth() ?>"
|
||||
height="<?= $this->image->getHeight() ?>"
|
||||
title="<?= $this->translate('This is the image that identifies your account in this computer') ?>"
|
||||
alt="<?= $this->translate('This is the image that identifies your account in this computer') ?>" />
|
||||
</div>
|
||||
<? endif ?>
|
||||
<div id="credentials">
|
||||
<?php echo $this->loginForm->username ?>
|
||||
<?php echo $this->loginForm->password ?>
|
||||
<? if ($this->yubikey->enabled && $this->yubikey->force): ?>
|
||||
<?= $this->loginForm->yubikey ?>
|
||||
<? else: ?>
|
||||
<?= $this->loginForm->password ?>
|
||||
<? endif ?>
|
||||
<?php if ($this->useCaptcha): ?>
|
||||
<?php echo $this->loginForm->captcha ?>
|
||||
<?php endif ?>
|
||||
@ -72,16 +88,18 @@
|
||||
</script>
|
||||
</div>
|
||||
<p>
|
||||
<a href="<?php echo $this->base ?>/users/recoverpassword" class="panel_link"><?php echo $this->translate('Forgot you password?') ?></a>
|
||||
<a href="<?php echo $this->base ?>/users/recoverpassword" class="panel_link"><?php echo $this->translate('Forgot your password?') ?></a>
|
||||
</p>
|
||||
</form>
|
||||
<hr/>
|
||||
<div id="registerNow">
|
||||
<p>
|
||||
<?php echo $this->translate('You don\'t have an account?') ?>
|
||||
<div>
|
||||
<a href="<?php echo $this->base ?>/users/register"><?php echo $this->translate('REGISTER NOW!') ?></a>
|
||||
</div>
|
||||
</p> <!-- safari bug workaround -->
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<? if ($this->allowRegistrations): ?>
|
||||
<hr/>
|
||||
<div id="registerNow">
|
||||
<p>
|
||||
<?php echo $this->translate('You don\'t have an account?') ?>
|
||||
<div>
|
||||
<a href="<?php echo $this->base ?>/users/register"><?php echo $this->translate('REGISTER NOW!') ?></a>
|
||||
</div>
|
||||
</p> <!-- safari bug workaround -->
|
||||
</div>
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<form name="personalInfoForm" class="formGrid" >
|
||||
<form name="personalInfoForm" class="formGrid" method="post" action="<?= $this->base ?>/users/personalinfo/save/profile/<?= $this->profile->id ?>">
|
||||
<?php foreach ($this->fields as $field): ?>
|
||||
<?php echo $field ?>
|
||||
<?php endforeach ?><br />
|
||||
<input type="button" id="save" value="<?php echo $this->translate('Save') ?>" onclick="COMMID.editPersonalInfo.save()" />
|
||||
<input type="submit" id="save" value="<?php echo $this->translate('Save') ?>" />
|
||||
<input type="button" id="cancel" value="<?php echo $this->translate('Cancel') ?>" onclick="COMMID.editPersonalInfo.cancel()" />
|
||||
<script type="text/javascript">
|
||||
YAHOO.util.Event.onDOMReady(function () {
|
||||
@ -15,15 +15,14 @@
|
||||
var oButton = new YAHOO.widget.Button(
|
||||
"save",
|
||||
{
|
||||
type : "push",
|
||||
onclick : {fn: COMMID.personalInfo.save}
|
||||
type : "submit"
|
||||
}
|
||||
);
|
||||
var oButton = new YAHOO.widget.Button(
|
||||
"cancel",
|
||||
{
|
||||
type : "push",
|
||||
onclick : {fn: COMMID.personalInfo.cancel}
|
||||
onclick : {fn: function() {COMMID.personalInfo.cancel();}}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
@ -11,18 +11,50 @@ YAHOO.util.Event.onDOMReady(function () {
|
||||
<div id="generalTab" class="dataSection">
|
||||
<div class="formHeader">
|
||||
<h2><?php echo $this->translate('Personal Info') ?></h2>
|
||||
<div>
|
||||
<a href="javascript:void(0);" onclick="COMMID.personalInfo.edit();">
|
||||
<?php echo $this->translate('Edit') ?>
|
||||
</a>
|
||||
<img id="loadingEditPersonalInfo" src="<?php echo $this->base ?>/images/progress.gif" style="visibility:hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin:10px 0">
|
||||
<em><?php echo $this->translate('This information will be used to automatically populate registration fields to any OpenID transaction that requires so') ?></em>
|
||||
</div>
|
||||
<div id="personalInfo">
|
||||
<?php echo $this->action('show', 'personalinfo', 'users', array('userid' => $this->targetUser->id)) ?>
|
||||
<? $i= 0; foreach ($this->profiles as $profile): ?>
|
||||
<? $i++ ?>
|
||||
<div id="personalInfo" style="position:relative; margin-bottom:15px; padding:20px; border:1px solid #999; -moz-border-radius:10px; -webkit-border-radius:10px">
|
||||
<div style="position:absolute; right:10px; top:10px">
|
||||
<a href="<?= $this->base ?>/users/personalinfo/edit/profile/<?= $profile->id ?>">
|
||||
<?= $this->translate('Edit profile') ?>
|
||||
</a>
|
||||
<? if ($i > 1 || count($this->profiles) > 1): ?>
|
||||
<form id="deleteprofile_<?= $profile->id ?>" method="post" action="<?= $this->base ?>/users/personalinfo/delete">
|
||||
<input type="hidden" name="profile" value="<?= $profile->id ?>" />
|
||||
<a href="#" onclick="COMMID.personalInfo.erase(<?= $profile->id ?>); return false;">
|
||||
<?= $this->translate('Delete profile') ?>
|
||||
</a>
|
||||
</form>
|
||||
<? endif ?>
|
||||
</div>
|
||||
<div class="formGrid">
|
||||
<div class="yui-gf">
|
||||
<div class="yui-u first">
|
||||
<?= $this->translate('Profile Name') ?>:
|
||||
</div>
|
||||
<div class="yui-u">
|
||||
<?= $profile->name ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php foreach ($profile->getFields() as $field): ?>
|
||||
<div class="yui-gf">
|
||||
<div class="yui-u first">
|
||||
<?= $this->translate($field->name) ?>:
|
||||
</div>
|
||||
<div class="yui-u">
|
||||
<?= (!$field->value)? $this->translate('Not Entered') : $field->value ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
<? endforeach ?>
|
||||
<div style="text-align:right; margin-top:20px">
|
||||
<a href="<?= $this->base ?>/users/personalinfo/edit"><?= $this->translate('Add another profile') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,12 +0,0 @@
|
||||
<div class="formGrid">
|
||||
<?php foreach ($this->fields as $field): ?>
|
||||
<div class="yui-gf">
|
||||
<div class="yui-u first">
|
||||
<?php echo $this->translate($field->name) ?>:
|
||||
</div>
|
||||
<div class="yui-u">
|
||||
<?php echo is_null($field->value)? $this->translate('Not Entered') : $field->value ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
19
modules/users/views/scripts/profile/index.phtml
Executable file → Normal file
19
modules/users/views/scripts/profile/index.phtml
Executable file → Normal file
@ -13,12 +13,17 @@ YAHOO.util.Event.onDOMReady(function () {
|
||||
<h2><?php echo $this->translate('Account info') ?></h2>
|
||||
<?php if ($this->targetUser->id == $this->user->id): ?>
|
||||
<div class="linksTopRight">
|
||||
<a href="javascript:void(0);" onclick="COMMID.general.editAccountInfo();">
|
||||
<?php echo $this->translate('Edit') ?>
|
||||
</a> |
|
||||
<a href="javascript:void(0);" onclick="COMMID.general.changePassword()" >
|
||||
<?php echo $this->translate('Change Password') ?>
|
||||
</a>
|
||||
<? if ($this->canEditAccountInfo): ?>
|
||||
<a href="javascript:void(0);" onclick="COMMID.general.editAccountInfo();">
|
||||
<?php echo $this->translate('Edit') ?>
|
||||
</a>
|
||||
<? endif ?>
|
||||
<? if ($this->canChangePassword && (!$this->yubikey->enabled || !$this->yubikey->force)): ?>
|
||||
|
|
||||
<a href="javascript:void(0);" onclick="COMMID.general.changePassword()" >
|
||||
<?php echo $this->translate('Change Password') ?>
|
||||
</a>
|
||||
<? endif ?>
|
||||
<img id="loadingAccountInfo" src="<?php echo $this->base ?>/images/progress.gif" style="visibility:hidden" />
|
||||
</div>
|
||||
<?php endif ?>
|
||||
@ -34,7 +39,7 @@ YAHOO.util.Event.onDOMReady(function () {
|
||||
<?php if ($this->targetUser->id && $this->targetUser->id == $this->user->id): ?>
|
||||
<div class="accountForm">
|
||||
<div class="linksTopRight" >
|
||||
<?php if ($this->user->role == Users_Model_User::ROLE_REGISTERED): ?>
|
||||
<?php if ($this->user->role == Users_Model_User::ROLE_REGISTERED && $this->canEditAccountInfo): ?>
|
||||
<a href="<?php echo $this->base ?>/users/profilegeneral/confirmdelete">
|
||||
<?php echo $this->translate('Delete Account') ?>
|
||||
</a>
|
||||
|
@ -31,4 +31,18 @@
|
||||
<?php echo $this->targetUser->openid ?>
|
||||
</div>
|
||||
</div>
|
||||
<? if ($this->yubikey->enabled && !$this->yubikey->force): ?>
|
||||
<div class="yui-gf">
|
||||
<div class="yui-u first">
|
||||
<?php echo $this->translate('Auth Method') ?>:
|
||||
</div>
|
||||
<div class="yui-u">
|
||||
<? if ($this->targetUser->auth_type == Users_Model_User::AUTH_PASSWORD): ?>
|
||||
<?= $this->translate('Password') ?>
|
||||
<? else: ?>
|
||||
YubiKey
|
||||
<? endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<? endif ?>
|
||||
</div>
|
||||
|
0
modules/users/views/scripts/profilegeneral/confirmdelete.phtml
Executable file → Normal file
0
modules/users/views/scripts/profilegeneral/confirmdelete.phtml
Executable file → Normal file
@ -7,6 +7,14 @@
|
||||
echo $this->accountInfoForm->password1;
|
||||
echo $this->accountInfoForm->password2;
|
||||
} ?>
|
||||
<? if ($this->yubikey->enabled): ?>
|
||||
<? if (!$this->yubikey->force): ?>
|
||||
<?= $this->accountInfoForm->authMethod ?>
|
||||
<? endif ?>
|
||||
<div id="yubikeyWrapper" style="display:<?= $this->yubikey->force? 'block' : 'none' ?>">
|
||||
<?= $this->accountInfoForm->yubikey ?>
|
||||
</div>
|
||||
<? endif ?>
|
||||
<div class="yui-gf">
|
||||
<div class="yui-u first"> </div>
|
||||
<div class="yui-u">
|
||||
@ -14,6 +22,10 @@
|
||||
<input type="button" id="cancel" value="<?php echo $this->translate('Cancel') ?>" onclick="COMMID.editAccountInfo.cancel()" />
|
||||
<script type="text/javascript">
|
||||
YAHOO.util.Event.onDOMReady(function () {
|
||||
<? if ($this->yubikey->enabled && !$this->yubikey->force): ?>
|
||||
COMMID.general.toggleYubikey();
|
||||
<? endif ?>
|
||||
|
||||
new YAHOO.widget.Button(
|
||||
"save",
|
||||
{
|
||||
|
0
modules/users/views/scripts/recoverpassword/index.phtml
Executable file → Normal file
0
modules/users/views/scripts/recoverpassword/index.phtml
Executable file → Normal file
0
modules/users/views/scripts/register/eula.phtml
Executable file → Normal file
0
modules/users/views/scripts/register/eula.phtml
Executable file → Normal file
0
modules/users/views/scripts/register/index.phtml
Executable file → Normal file
0
modules/users/views/scripts/register/index.phtml
Executable file → Normal file
53
modules/users/views/scripts/signinimage/index.phtml
Normal file
53
modules/users/views/scripts/signinimage/index.phtml
Normal file
@ -0,0 +1,53 @@
|
||||
<h2><?= $this->translate('Sign-in Image') ?></h2>
|
||||
<div style="text-align:center; margin:20px 0">
|
||||
<? if ($this->user->getImage()): ?>
|
||||
<img src="<?= $this->base ?>/users/signinimage/image"
|
||||
width="<?= $this->user->getImage()->getWidth() ?>"
|
||||
height="<?= $this->user->getImage()->getHeight() ?>" />
|
||||
<? else: ?>
|
||||
<?= $this->translate('You haven\'t uploaded an image yet') ?>
|
||||
<? endif ?>
|
||||
</div>
|
||||
<div><?= $this->translate('Select an image to use as your Sign-in Image:') ?></div>
|
||||
<form method="post" class="formGrid" style="margin:20px 0" action="<?= $this->base ?>/users/signinimage/saveimage" enctype="multipart/form-data">
|
||||
<?= $this->signinImageForm->image ?>
|
||||
<div style="text-align:right">
|
||||
<input type="submit" id="save" class="submit" value="<?= $this->translate('Save') ?>" />
|
||||
<script>
|
||||
new YAHOO.widget.Button(
|
||||
"save", {type: "submit"});
|
||||
</script>
|
||||
</div>
|
||||
</form>
|
||||
<p>
|
||||
<?= $this->translate('This image will be shown in the log-in and OpenID authentication screens of Community-ID.') ?>
|
||||
</p>
|
||||
<p>
|
||||
<?= $this->translate('It serves as a phishing counter-measure, as only you will recognize your image, proving these pages haven\'t been falsified.') ?>
|
||||
</p>
|
||||
<p style="font-weight:bold">
|
||||
<?= $this->translate('After having uploaded the image, for the it to be shown you need to enable it on each computer/browser you want to use (the system is cookie-based).') ?>
|
||||
</p>
|
||||
|
||||
<? if ($this->user->getImage()): ?>
|
||||
<p>
|
||||
<?= $this->translate('Use the following button to enable/disable it in the current computer/browser:') ?><br />
|
||||
</p>
|
||||
<form method="post" class="formGrid" style="text-align:center" action="<?= $this->base ?>/users/signinimage/setcookie">
|
||||
<? if ($this->enabled): ?>
|
||||
<input type="hidden" name="enable" value="0" />
|
||||
<input type="submit" id="enable" value="<?= $this->translate('Disable') ?>" />
|
||||
<? else: ?>
|
||||
<input type="hidden" name="enable" value="1" />
|
||||
<input type="submit" id="enable" value="<?= $this->translate('Enable') ?>" />
|
||||
<? endif ?>
|
||||
<script>
|
||||
new YAHOO.widget.Button(
|
||||
"enable", {type: "submit"});
|
||||
</script>
|
||||
</form>
|
||||
<? else: ?>
|
||||
<p>
|
||||
<?= $this->translate('Further instructions will appear after you upload the image.') ?>
|
||||
</p>
|
||||
<? endif ?>
|
Reference in New Issue
Block a user