aboutsummaryrefslogtreecommitdiff
path: root/views/default/core/settings/account
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-17 20:36:36 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-17 20:36:36 +0000
commitdb787a3ab93da0c2141d33f3058f9dc2f34d6f2a (patch)
treedca419a399cb00f45c227aed7a62993b089e0f27 /views/default/core/settings/account
parentc2add32bbf281d488deb26343cf059e3347fe525 (diff)
downloadelgg-db787a3ab93da0c2141d33f3058f9dc2f34d6f2a.tar.gz
elgg-db787a3ab93da0c2141d33f3058f9dc2f34d6f2a.tar.bz2
reorganized the settings views and updated the pages to use new layout
git-svn-id: http://code.elgg.org/elgg/trunk@7663 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/core/settings/account')
-rw-r--r--views/default/core/settings/account/default_access.php29
-rw-r--r--views/default/core/settings/account/email.php25
-rw-r--r--views/default/core/settings/account/language.php32
-rw-r--r--views/default/core/settings/account/name.php15
-rw-r--r--views/default/core/settings/account/notifications.php51
-rw-r--r--views/default/core/settings/account/password.php42
6 files changed, 194 insertions, 0 deletions
diff --git a/views/default/core/settings/account/default_access.php b/views/default/core/settings/account/default_access.php
new file mode 100644
index 000000000..e7c280198
--- /dev/null
+++ b/views/default/core/settings/account/default_access.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Provide a way of setting your default access
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+if ($vars['config']->allow_user_default_access) {
+ $user = elgg_get_page_owner();
+
+ if ($user) {
+ if (false === ($default_access = $user->getPrivateSetting('elgg_default_access'))) {
+ $default_access = $vars['config']->default_access;
+ }
+?>
+<div class="user-settings access">
+ <h3><?php echo elgg_echo('default_access:settings'); ?></h3>
+ <p>
+ <?php echo elgg_echo('default_access:label'); ?>:
+ <?php
+
+ echo elgg_view('input/access',array('internalname' => 'default_access', 'value' => $default_access));
+
+ ?>
+ </p>
+</div>
+<?php
+ }
+} \ No newline at end of file
diff --git a/views/default/core/settings/account/email.php b/views/default/core/settings/account/email.php
new file mode 100644
index 000000000..396f8e79b
--- /dev/null
+++ b/views/default/core/settings/account/email.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Provide a way of setting your email
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$user = elgg_get_page_owner();
+
+if ($user) {
+?>
+<div class="user-settings email">
+<h3><?php echo elgg_echo('email:settings'); ?></h3>
+<p>
+ <?php echo elgg_echo('email:address:label'); ?>:
+ <?php
+
+ echo elgg_view('input/email',array('internalname' => 'email', 'value' => $user->email));
+
+ ?>
+</p>
+</div>
+<?php
+} \ No newline at end of file
diff --git a/views/default/core/settings/account/language.php b/views/default/core/settings/account/language.php
new file mode 100644
index 000000000..ada133791
--- /dev/null
+++ b/views/default/core/settings/account/language.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Provide a way of setting your language prefs
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+global $CONFIG;
+$user = elgg_get_page_owner();
+
+if ($user) {
+?>
+<div class="user-settings language">
+<h3><?php echo elgg_echo('user:set:language'); ?></h3>
+<p>
+
+ <?php echo elgg_echo('user:language:label'); ?>: <?php
+
+ $value = $CONFIG->language;
+ if ($user->language) {
+ $value = $user->language;
+ }
+
+ echo elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $value, 'options_values' => get_installed_translations()));
+
+ ?>
+
+</p>
+</div>
+<?php
+} \ No newline at end of file
diff --git a/views/default/core/settings/account/name.php b/views/default/core/settings/account/name.php
new file mode 100644
index 000000000..fad6c488f
--- /dev/null
+++ b/views/default/core/settings/account/name.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Provide a way of setting your full name.
+ *
+ * @package Elgg
+ * @subpackage Core
+
+
+ */
+
+$user = elgg_get_page_owner();
+
+// all hidden, but necessary for properly updating user details
+echo elgg_view('input/hidden', array('internalname' => 'name', 'value' => $user->name));
+echo elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $user->guid));
diff --git a/views/default/core/settings/account/notifications.php b/views/default/core/settings/account/notifications.php
new file mode 100644
index 000000000..afb142ebe
--- /dev/null
+++ b/views/default/core/settings/account/notifications.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * User settings for notifications.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+global $NOTIFICATION_HANDLERS;
+$notification_settings = get_user_notification_settings(elgg_get_page_owner_guid());
+
+?>
+<div class="user-settings notifications">
+<h3><?php echo elgg_echo('notifications:usersettings'); ?></h3>
+
+<p><?php echo elgg_echo('notifications:methods'); ?>
+
+<table>
+<?php
+ // Loop through options
+ foreach ($NOTIFICATION_HANDLERS as $k => $v) {
+?>
+ <tr>
+ <td><?php echo elgg_echo($k); ?>: </td>
+
+ <td>
+<?php
+
+ if ($notification_settings->$k) {
+ $val = "yes";
+ } else {
+ $val = "no";
+ }
+
+ echo elgg_view('input/radio', array(
+ 'internalname' => "method[$k]",
+ 'value' => $val,
+ 'options' => array(
+ elgg_echo('option:yes') => 'yes',
+ elgg_echo('option:no') => 'no'
+ ),
+ ));
+
+?>
+ </td>
+ </tr>
+<?php
+ }
+?>
+</table>
+</div> \ No newline at end of file
diff --git a/views/default/core/settings/account/password.php b/views/default/core/settings/account/password.php
new file mode 100644
index 000000000..0bd7f38f8
--- /dev/null
+++ b/views/default/core/settings/account/password.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Provide a way of setting your password
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$user = elgg_get_page_owner();
+
+if ($user) {
+?>
+<div class="user-settings password">
+<h3><?php echo elgg_echo('user:set:password'); ?></h3>
+
+ <?php
+ // only make the admin user enter current password for changing his own password.
+ if (!isadminloggedin() || isadminloggedin() && $user->guid == get_loggedin_userid()) {
+ ?>
+ <p>
+ <?php echo elgg_echo('user:current_password:label'); ?>:
+ <?php
+ echo elgg_view('input/password', array('internalname' => 'current_password'));
+ ?>
+ </p>
+ <?php } ?>
+
+ <p>
+ <?php echo elgg_echo('user:password:label'); ?>:
+ <?php
+ echo elgg_view('input/password', array('internalname' => 'password'));
+ ?>
+ </p>
+
+ <p>
+ <?php echo elgg_echo('user:password2:label'); ?>: <?php
+ echo elgg_view('input/password', array('internalname' => 'password2'));
+ ?>
+ </p>
+</div>
+<?php
+} \ No newline at end of file