-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from SlateFoundation/development
Release: slate v2.1.8
- Loading branch information
Showing
156 changed files
with
1,234 additions
and
13,979 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
event-handlers/Emergence/People/personAuthenticate/change-temporary-password.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
if ($_EVENT['Person']->TemporaryPassword && $_EVENT['Person']->verifyPassword($_EVENT['Person']->TemporaryPassword)) { | ||
$params = []; | ||
|
||
if (!empty($_EVENT['requestData']['return'])) { | ||
$params['return'] = $_EVENT['requestData']['return']; | ||
} | ||
|
||
Site::redirect('/register/set-password', $params); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{extends "designs/site.tpl"} | ||
|
||
{block "title"}Set Password — {$dwoo.parent}{/block} | ||
|
||
{block "content"} | ||
<header class="page-header"> | ||
<h1 class="header-title title-1">Create Your Password</h1> | ||
</header> | ||
|
||
<p class="page-info">Your current password was generated to help you start using {Site::getConfig(primary_hostname)}.</p> | ||
|
||
<p>Create your own password to use for logging in going forward.</p> | ||
|
||
{if $error} | ||
<div class="notify error">{$error|escape}</div> | ||
{/if} | ||
|
||
<form method="POST" class="generic single" id="slate-set-password-form"> | ||
<input type="hidden" name="returnUrl" value="{refill field=returnUrl default=$returnUrl}"> | ||
|
||
<fieldset class="shrink"> | ||
{field inputName=password type=password label='New Password' required=true attribs='autofocus'} | ||
{field inputName=passwordConfirm type=password label='Confirm' required=true hint='Type the same password twice to confirm it'} | ||
|
||
<div class="submit-area"> | ||
<input type="submit" class="button submit" value="Set Password"> | ||
<span class="submit-text">or <a href="{$returnUrl|escape|default:'/dashboard'}">skip for now</a></span> | ||
</div> | ||
</fieldset> | ||
</form> | ||
|
||
{if RemoteSystems\GoogleApps::$domain} | ||
<script src="https://ssl.gstatic.com/accounts/chrome/users-1.0.js"></script> | ||
<script> | ||
google.principal.initialize(function() { | ||
var passwordForm = document.getElementById('slate-set-password-form'), | ||
token = Math.random(), | ||
addedPassword; | ||
passwordForm.addEventListener('submit', function(ev) { | ||
var password = passwordForm.password.value; | ||
// skip add call if form invalid or entered password has already been sent | ||
if (!password || password != passwordForm.passwordConfirm.value || password == addedPassword) { | ||
return; | ||
} | ||
ev.preventDefault(); | ||
addedPassword = password; | ||
google.principal.add({ | ||
token: token, | ||
user: {cat($.User->Username, '@', RemoteSystems\GoogleApps::$domain)|json_encode}, | ||
passwordBytes: password, | ||
keyType: 'KEY_TYPE_PASSWORD_PLAIN' | ||
}, function() { | ||
google.principal.complete({ | ||
token: token | ||
}, function() { | ||
passwordForm.submit(); | ||
}); | ||
}); | ||
}) | ||
}); | ||
</script> | ||
{/if} | ||
{/block} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{extends "designs/site.tpl"} | ||
|
||
{block "title"}Password saved — {$dwoo.parent}{/block} | ||
|
||
{block "content"} | ||
<header class="page-header"> | ||
<h1 class="header-title title-1">New Password Saved</h1> | ||
</header> | ||
|
||
<p class="page-info">Your new password has been saved, remember to use it next time you login.</p> | ||
|
||
<p> | ||
{if $returnUrl} | ||
<a class="button submit" href="{$returnUrl|escape}">Finish logging in</a> | ||
{else} | ||
<a class="button submit" href="/dashboard">Continue to your dashboard</a> | ||
{/if} | ||
</p> | ||
{/block} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.