From 5041c6c48153453ed597206d08eeff37cf20e676 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 15 Mar 2014 14:46:48 -0300 Subject: Squashed 'mod/cool_theme/' content from commit a26f7df git-subtree-dir: mod/cool_theme git-subtree-split: a26f7df43a266f7d1ff04847da330d15f6041e9b --- .../core/settings/account/default_access.php | 25 ++++++++++++ views/default/core/settings/account/email.php | 19 ++++++++++ views/default/core/settings/account/language.php | 20 ++++++++++ views/default/core/settings/account/name.php | 21 +++++++++++ .../core/settings/account/notifications.php | 44 ++++++++++++++++++++++ views/default/core/settings/account/password.php | 33 ++++++++++++++++ 6 files changed, 162 insertions(+) create mode 100644 views/default/core/settings/account/default_access.php create mode 100644 views/default/core/settings/account/email.php create mode 100644 views/default/core/settings/account/language.php create mode 100644 views/default/core/settings/account/name.php create mode 100644 views/default/core/settings/account/notifications.php create mode 100644 views/default/core/settings/account/password.php (limited to 'views/default/core/settings/account') 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..690f2714a --- /dev/null +++ b/views/default/core/settings/account/default_access.php @@ -0,0 +1,25 @@ +getPrivateSetting('elgg_default_access'))) { + $default_access = elgg_get_config('default_access'); + } + + $title = elgg_echo('default_access:settings'); + $content = elgg_echo('default_access:label') . ': '; + $content .= elgg_view('input/access', array( + 'name' => 'default_access', + 'value' => $default_access, + )); + + echo elgg_view_module('info', $title, $content); + } +} diff --git a/views/default/core/settings/account/email.php b/views/default/core/settings/account/email.php new file mode 100644 index 000000000..bb809958d --- /dev/null +++ b/views/default/core/settings/account/email.php @@ -0,0 +1,19 @@ + '; + $content .= elgg_view('input/email', array( + 'name' => 'email', + 'value' => $user->email, + )); + echo elgg_view_module('info', $title, $content); +} diff --git a/views/default/core/settings/account/language.php b/views/default/core/settings/account/language.php new file mode 100644 index 000000000..b36057422 --- /dev/null +++ b/views/default/core/settings/account/language.php @@ -0,0 +1,20 @@ + 'language', + 'value' => $user->language, + 'options_values' => get_installed_translations() + )); + echo elgg_view_module('info', $title, $content); +} diff --git a/views/default/core/settings/account/name.php b/views/default/core/settings/account/name.php new file mode 100644 index 000000000..af1b9a1a7 --- /dev/null +++ b/views/default/core/settings/account/name.php @@ -0,0 +1,21 @@ +'; + $content .= elgg_view('input/text', array( + 'name' => 'name', + 'value' => $user->name, + )); + echo elgg_view_module('info', $title, $content); + + // need the user's guid to make sure the correct user gets updated + echo elgg_view('input/hidden', array('name' => '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..c212b3886 --- /dev/null +++ b/views/default/core/settings/account/notifications.php @@ -0,0 +1,44 @@ + $v) { + + if ($notification_settings->$k) { + $val = "yes"; + } else { + $val = "no"; + } + + $radio = elgg_view('input/radio', array( + 'name' => "method[$k]", + 'value' => $val, + 'options' => array( + elgg_echo('option:yes') => 'yes', + elgg_echo('option:no') => 'no' + ), + )); + + $cells = '' . elgg_echo("notification:method:$k") . ': '; + $cells .= "$radio"; + + $rows .= "$cells"; +} + + +$content = elgg_echo('notifications:methods'); +$content .= "$rows
"; + +echo elgg_view_module('info', $title, $content); diff --git a/views/default/core/settings/account/password.php b/views/default/core/settings/account/password.php new file mode 100644 index 000000000..f17f605c1 --- /dev/null +++ b/views/default/core/settings/account/password.php @@ -0,0 +1,33 @@ +guid == elgg_get_logged_in_user_guid()) { + $admin .= elgg_echo('user:current_password:label') . ' :
'; + $admin .= elgg_view('input/password', array('name' => 'current_password', 'placeholder' => '••••••')); + $admin = "

$admin

"; + } + + $password = elgg_echo('user:password:label') . ' :
'; + $password .= elgg_view('input/password', array('name' => 'password', 'placeholder' => '••••••')); + $password = "

$password

"; + + $password2 = elgg_echo('user:password2:label') . ' :
'; + $password2 .= elgg_view('input/password', array('name' => 'password2', 'placeholder' => '••••••')); + $password2 = "

$password2

"; + + $content = $admin . $password . $password2; + + echo elgg_view_module('info', $title, $content); +} -- cgit v1.2.3