aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/forms/openid_client/register.php6
-rw-r--r--views/default/openid_client/css.php46
-rw-r--r--views/default/openid_client/forms/admin.php99
-rw-r--r--views/default/openid_client/forms/login.php57
-rw-r--r--views/default/openid_client/forms/missing.php73
-rw-r--r--views/default/openid_client/forms/sync.php86
-rw-r--r--views/default/openid_client/login.php2
7 files changed, 7 insertions, 362 deletions
diff --git a/views/default/forms/openid_client/register.php b/views/default/forms/openid_client/register.php
index b8f57fb59..63d5ba04e 100644
--- a/views/default/forms/openid_client/register.php
+++ b/views/default/forms/openid_client/register.php
@@ -10,19 +10,19 @@
* @uses $vars['name']
*/
-$username_label = '';
+$username_label = elgg_echo('username');
$username_input = elgg_view('input/text', array(
'name' => 'username',
'value' => $vars['username'],
));
-$name_label = elgg_echo();
+$name_label = elgg_echo('name');
$name_input = elgg_view('input/text', array(
'name' => 'name',
'value' => $vars['name'],
));
-$email_label = elgg_echo();
+$email_label = elgg_echo('email');
$email_input = elgg_view('input/email', array(
'name' => 'email',
'value' => $vars['email'],
diff --git a/views/default/openid_client/css.php b/views/default/openid_client/css.php
index b61865bf0..ff81520da 100644
--- a/views/default/openid_client/css.php
+++ b/views/default/openid_client/css.php
@@ -1,46 +1,6 @@
<?php
-
- /**
- * Elgg OpenID login form css
- *
- * @package Elgg
- * @subpackage openid_client
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Kevin Jardine, Radagast Solutions
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- */
+/**
+ * OpenID client CSS
+ */
?>
-
-
-
-.river_user_openid_friend {
- background: url(<?php echo $vars['url']; ?>_graphics/river_icons/river_icon_friends.gif) no-repeat left -1px;
-}
-.river_user_openid_update {
- background: url(<?php echo $vars['url']; ?>_graphics/river_icons/river_icon_profile.gif) no-repeat left -1px;
-}
-.river_user_openid_messageboard {
- background: url(<?php echo $vars['url']; ?>_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px;
-}
-
-#openid_login #login-box h2 {
- margin:0;
- padding:5px 0 10px 0;
-}
-#openid_login #login-box-openid form {
- background-color: none;
- margin:0;
- padding:0;
-}
-input.openid_login {
- background: url(<?php echo $vars['url']; ?>mod/openid_client/graphics/login-bg.gif) no-repeat;
- background-color: #fff;
- background-position: 0 50%;
- color: #000;
- width: 160px;
-}
-#openid_show {
- cursor:pointer;
-}
diff --git a/views/default/openid_client/forms/admin.php b/views/default/openid_client/forms/admin.php
deleted file mode 100644
index 156a605ff..000000000
--- a/views/default/openid_client/forms/admin.php
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-
-/**
- * Elgg openid_client admin page
- *
- * @package openid_client
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Kevin Jardiner <kevin@radagast.biz>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- */
-
-if ($vars['always_sync'] == 'yes') {
- $sync_checked = 'checked="checked"';
-} else {
- $sync_checked = '';
-}
-
-if ($vars['sso'] == 'yes') {
- $sso_checked = 'checked="checked"';
-} else {
- $sso_checked = '';
-}
-
-$default_server = $vars['default_server'];
-
-$greenlist = $vars['greenlist'];
-$yellowlist = $vars['yellowlist'];
-$redlist = $vars['redlist'];
-
-$action = $CONFIG->wwwroot.'action/openid_client/admin';
-
-$default_server_title = elgg_echo('openid_client:default_server_title');
-$default_server_instructions1 = elgg_echo('openid_client:default_server_instructions1');
-$default_server_instructions2 = elgg_echo('openid_client:default_server_instructions2');
-
-$server_sync_title = elgg_echo('openid_client:server_sync_title');
-$server_sync_instructions = elgg_echo('openid_client:server_sync_instructions');
-$server_sync_label = elgg_echo('openid_client:server_sync_label');
-
-$sso_title = elgg_echo('openid_client:sso_title');
-$sso_instructions = elgg_echo('openid_client:sso_instructions');
-$sso_label = elgg_echo('openid_client:sso_label');
-
-$lists_title = elgg_echo('openid_client:lists_title');
-
-$lists_instruction1 = elgg_echo('openid_client:lists_instruction1');
-$lists_instruction2 = elgg_echo('openid_client:lists_instruction2');
-$lists_instruction3 = elgg_echo('openid_client:lists_instruction3');
-$lists_instruction4 = elgg_echo('openid_client:lists_instruction4');
-$lists_instruction5 = elgg_echo('openid_client:lists_instruction5');
-$lists_instruction6 = elgg_echo('openid_client:lists_instruction6');
-
-$green_list_title = elgg_echo('openid_client:green_list_title');
-$yellow_list_title = elgg_echo('openid_client:yellow_list_title');
-$red_list_title = elgg_echo('openid_client:red_list_title');
-
-$ok_button_label = elgg_echo('openid_client:ok_button_label');
-
-$security_token = elgg_view('input/securitytoken');
-
-$body = <<<END
-<div class="admin_statistics">
-<form action="$action" method="post">
-$security_token
-<h3>$default_server_title</h3>
-<p>$default_server_instructions1</p>
-<p>$default_server_instructions2</p>
-<p><input type="text" size="60" name="default_server" value="$default_server" /></p>
-<h3>$server_sync_title</h3>
-<p>$server_sync_instructions</p>
-<p><input type="checkbox" name="always_sync" value="yes" $sync_checked />
-$server_sync_label</p>
-<h3>$sso_title</h3>
-<p>$sso_instructions</p>
-<p><input type="checkbox" name="sso" value="yes" $sso_checked />
-$sso_label</p>
-<h3>$lists_title</h3>
-<p>$lists_instruction1</p>
-<p>$lists_instruction2</p>
-<p>$lists_instruction3</p>
-<p>$lists_instruction4</p>
-<p>$lists_instruction5</p>
-<p>$lists_instruction6</p>
-<h3>$green_list_title</h3>
-<p><textarea name="greenlist" rows="5" cols="60">$greenlist</textarea></p>
-<h3>$yellow_list_title</h3>
-<p><textarea name="yellowlist" rows="5" cols="60">$yellowlist</textarea></p>
-<h3>$red_list_title</h3>
-<p><textarea name="redlist" rows="5" cols="60">$redlist</textarea></p>
-<input type="submit" name="submit" value="$ok_button_label" />
-</form>
-</div>
-END;
-
-print $body;
-
-?> \ No newline at end of file
diff --git a/views/default/openid_client/forms/login.php b/views/default/openid_client/forms/login.php
deleted file mode 100644
index bfc881e3c..000000000
--- a/views/default/openid_client/forms/login.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-
- /**
- * Elgg OpenID login form
- *
- * @package Elgg
- * @subpackage openid_client
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Kevin Jardine, Radagast Solutions
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- */
-
-?>
-<script type="text/javascript">
-$(document).ready(function() {
- $('div#openid_login').hide();
- $('#openid_show').click(function(){
- $('div#openid_login').slideToggle('medium');
- });
- });
-</script>
-<div class="contentWrapper">
-<a id="openid_show"><img src="<?php echo $vars['url']; ?>mod/openid_client/graphics/openid.jpg" alt="OpenID" /></a>
-
-<div id="openid_login">
-<div id="login-box-openid">
- <form action="<?php echo $vars['url']; ?>action/openid_client/login" method="post">
- <?php echo elgg_view('input/securitytoken'); ?>
- <input type="hidden" name="passthru_url" value="http://<?php echo $_SERVER['HTTP_HOST']. $_SERVER['REQUEST_URI'] ?>" />
- <table>
- <tr>
- <td><p>
- <label><?php echo elgg_echo('openid_client_login_service'); ?><br /><select name="externalservice">
- <option value="">OpenID</option>
- <option value="aim">AIM</option>
- <option value="livejournal">LiveJournal</option>
- <option value="vox">Vox</option>
- <option value="pip">Verisign PIP</option>
- <option value="wordpress">Wordpress.com</option>
- </select>
- </label></p>
- </tr>
- <tr>
- <td><div class="loginbox">
- <label><?php echo elgg_echo('username'); ?><br /><input class="openid_login" type="text" name="username" id="username" style="size: 200px" /></label>
- <br /><input type="submit" name="submit" value="<?php echo elgg_echo('openid_client_go'); ?>" />
- <br /><div id="persistent_login"><label><input type="checkbox" name="remember" checked="checked" /><?php echo elgg_echo('openid_client_remember_login'); ?></label></div>
- </div>
- </td>
- </tr>
- </table>
- </form>
-</div>
-</div>
-
-</div>
diff --git a/views/default/openid_client/forms/missing.php b/views/default/openid_client/forms/missing.php
deleted file mode 100644
index 7810f3c57..000000000
--- a/views/default/openid_client/forms/missing.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-
-/**
- * Elgg openid_client missing data page
- *
- * @package openid_client
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Kevin Jardiner <kevin@radagast.biz>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses the following values in $vars:
- *
- * 'openid_url' the OpenID
- * 'email' the user's email (if known)
- * 'fullname' the user's full name (if known)
- * 'email_confirmation' whether the email address needs to be confirmed
- * 'code' a magic code that associates this data with a real user
- */
-
-$emailLabel = elgg_echo('openid_client:email_label');
-$nameLabel = elgg_echo('openid_client:name_label');
-$submitLabel = elgg_echo('openid_client:submit_label');
-$cancelLabel = elgg_echo('openid_client:cancel_label');
-
-$missing_email = elgg_echo('openid_client:missing_email');
-$missing_name = elgg_echo('openid_client:missing_name');
-$and = elgg_echo('openid_client:and');
-$email_form = "<table><tr><td>$emailLabel</td><td><input type=".'"text" size="50" name="email" value=""></td></tr></table>';
-$name_form = "<table><tr><td>$nameLabel</td><td><input type=".'"text" size="50" name="name" value=""></td></tr></table>';
-$email_hidden = '<input type="hidden" name="email" value="'.$vars['email'].'" />'."\n";
-$name_hidden = '<input type="hidden" name="name" value="'.$vars['fullname'].'" />'."\n";
-
-if (!$vars['email'] && !$$vars['fullname']) {
- $missing_fields = $missing_email.' '.$and.' '.$missing_name;
- $visible_fields = $email_form.'<br />'.$name_form;
- $hidden_fields = '';
-} elseif (!$vars['email']) {
- $missing_fields = $missing_email;
- $visible_fields = $email_form;
- $hidden_fields = $name_hidden;
-} elseif (!$vars['fullname']) {
- $missing_fields = $missing_name;
- $visible_fields = $name_form;
- $hidden_fields = $email_hidden;
-}
-
-$hidden_fields .= '<input type="hidden" name="openid_code" value="'.$vars['openid_code'].'" />'."\n";
-
-$instructions = sprintf(elgg_echo('openid_client:missing_info_instructions'),$missing_fields);
-
-$action = $CONFIG->wwwroot.'action/openid_client/missing';
-$security_token = elgg_view('input/securitytoken');
-
-$body .= <<< END
- $instructions
- <form action="$action" method="post">
- $security_token
- <p>
- $visible_fields
- </p>
- <p>
- $hidden_fields
- <input type="submit" name="submit" value="$submitLabel" />
- <input type="submit" name="cancel" value="$cancelLabel" />
- </p>
-</form>
-
-END;
-
-echo elgg_view('page_elements/contentwrapper',array('body'=>$body));
-
-?> \ No newline at end of file
diff --git a/views/default/openid_client/forms/sync.php b/views/default/openid_client/forms/sync.php
deleted file mode 100644
index 6d921b278..000000000
--- a/views/default/openid_client/forms/sync.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-
-/**
- * Elgg openid_client sync data page
- *
- * @package openid_client
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Kevin Jardiner <kevin@radagast.biz>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- *
- * @uses the following values in $vars:
- *
- * 'userid' the user's GUID
- * 'new_email' the user's new email
- * 'new_name' the user's new full name
- * 'email_confirmation' whether the email address needs to be confirmed
- */
-
-$emailLabel = elgg_echo('openid_client:email_label');
-$nameLabel = elgg_echo('openid_client:name_label');
-$submitLabel = elgg_echo('openid_client:submit_label');
-$cancelLabel = elgg_echo('openid_client:cancel_label');
-$noSyncLabel = elgg_echo('openid_client:nosync_label');
-$instructions = elgg_echo('openid_client:sync_instructions');
-
-$new_email = $vars['new_email'];
-$new_name = $vars['new_name'];
-$email_confirmation = $vars['email_confirmation'];
-
-$user = get_user($vars['userid']);
-
-$old_email = $user->email;
-$old_name = $user->name;
-$openid_url = $user->alias;
-
-if ($new_email && $new_email != $old_email) {
- $change_fields .= '<table><tr><td><label for="emailchange"><input type="checkbox"'
- .' id="emailchange" name="emailchange" value="yes" />'
- ." $emailLabel</label></td><td>$old_email => $new_email</td></tr></table>\n";
- if (!$email_confirmation) {
- // the email address is from a green server, so we can change the email without a confirmation message
- // add an invitation code however to prevent this form from being forged
- // the user ident and new email address can then securely be stored in the database invitation table
- // rather than the form
- $details = openid_client_create_invitation('c',$openid_url,$vars['userid'],$new_email,$new_name);
- $form_stuff = '<input type="hidden" name="i_code" value="'.$details->code.'" />';
- } else {
- // the email will be confirmed anyway so it is safe to put it in the form
- $form_stuff .= <<< END
- <input type="hidden" name="new_email" value="$new_email" />
-END;
- }
-
-}
-if ($new_name && $new_name != $old_name) {
- $change_fields .= '<table><tr><td><label for="namechange"><input type="checkbox"'
- .' id="namechange" name="namechange" value="yes" />'
- ."$nameLabel</label></td><td>$old_name => $new_name</td></tr></table>\n";
-}
-
-$action = $CONFIG->wwwroot.'action/openid_client/sync';
-$security_token = elgg_view('input/securitytoken');
-
-$body .= <<< END
- $instructions
- <form action="$action" method="post">
- $security_token
- <p>
- $change_fields
- </p>
- <p>
- <label for="nosync"><input type="checkbox" id="nosync" name="nosync" value="yes" />$noSyncLabel</label>
- <br /><br />
- $form_stuff
- <input type="hidden" name="new_name" value="$new_name" />
- <input type="submit" name="submit" value="$submitLabel" />
- <input type="submit" name="cancel" value="$cancelLabel" />
- </p>
-</form>
-
-END;
-
-echo elgg_view('page_elements/contentwrapper',array('body'=>$body));
-
-?> \ No newline at end of file
diff --git a/views/default/openid_client/login.php b/views/default/openid_client/login.php
index f89b790c0..2b476ec8e 100644
--- a/views/default/openid_client/login.php
+++ b/views/default/openid_client/login.php
@@ -1,6 +1,6 @@
<?php
/**
- *
+ * OpenID client login choices
*/
echo elgg_view('output/url', array(