From e2ecdb543fdf4ac0adf7097c979e74950c39165e Mon Sep 17 00:00:00 2001
From: cash
Date: Wed, 15 Dec 2010 02:15:39 +0000
Subject: moved account forms into forms directory
git-svn-id: http://code.elgg.org/elgg/trunk@7623 36083f99-b078-4883-b0ff-0f9b5a30f544
---
views/default/account/forms/forgotten_password.php | 24 --------
views/default/account/forms/login.php | 35 ------------
views/default/account/forms/register.php | 55 ------------------
views/default/account/forms/useradd.php | 31 -----------
views/default/admin/users/add.php | 2 +-
views/default/core/account/login_box.php | 2 +-
views/default/core/account/login_dropdown.php | 2 +-
views/default/core/account/login_walled_garden.php | 2 +-
views/default/forms/login.php | 35 ++++++++++++
views/default/forms/register.php | 65 ++++++++++++++++++++++
views/default/forms/user/requestnewpassword.php | 26 +++++++++
views/default/forms/useradd.php | 31 +++++++++++
12 files changed, 161 insertions(+), 149 deletions(-)
delete mode 100644 views/default/account/forms/forgotten_password.php
delete mode 100644 views/default/account/forms/login.php
delete mode 100644 views/default/account/forms/register.php
delete mode 100644 views/default/account/forms/useradd.php
create mode 100644 views/default/forms/login.php
create mode 100644 views/default/forms/register.php
create mode 100644 views/default/forms/user/requestnewpassword.php
create mode 100644 views/default/forms/useradd.php
(limited to 'views')
diff --git a/views/default/account/forms/forgotten_password.php b/views/default/account/forms/forgotten_password.php
deleted file mode 100644
index 48fafe4d8..000000000
--- a/views/default/account/forms/forgotten_password.php
+++ /dev/null
@@ -1,24 +0,0 @@
-" . elgg_echo('user:password:text') . "
";
-$form_body .= "". elgg_echo('username') . " "
- . elgg_view('input/text', array('internalname' => 'username')) . "
";
-$form_body .= elgg_view('input/captcha');
-$form_body .= "" . elgg_view('input/submit', array('value' => elgg_echo('request'))) . "
";
-
-echo elgg_view('input/form', array(
- 'action' => "action/user/requestnewpassword",
- 'body' => $form_body,
- 'class' => "margin-top"
-));
-?>
-
-
\ No newline at end of file
diff --git a/views/default/account/forms/login.php b/views/default/account/forms/login.php
deleted file mode 100644
index 87dd6d5ad..000000000
--- a/views/default/account/forms/login.php
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
- 'username', 'class' => 'login-textarea')); ?>
-
- 'password', 'class' => 'login-textarea')); ?>
-
- elgg_echo('login'))); ?>
-
-
-
-
-
-
-
-
-
-
-allow_registration) {
- echo '' . elgg_echo('register') . ' | ';
- }
-?>
-
-
-
-
\ No newline at end of file
diff --git a/views/default/account/forms/register.php b/views/default/account/forms/register.php
deleted file mode 100644
index bf629b589..000000000
--- a/views/default/account/forms/register.php
+++ /dev/null
@@ -1,55 +0,0 @@
-https_login)) && ($CONFIG->https_login)) {
- $register_url = str_replace("http:", "https:", $register_url);
-}
-
-$username = get_input('u');
-$email = get_input('e');
-$name = get_input('n');
-
-$admin_option = false;
-$loggedin_user = get_loggedin_user();
-
-if ($loggedin_user && $loggedin_user->isAdmin() && isset($vars['show_admin'])) {
- $admin_option = true;
-}
-
-$form_body = "" . elgg_echo('name') . " " . elgg_view('input/text' , array('internalname' => 'name', 'class' => "input-text name", 'value' => $name)) . "
";
-$form_body .= "" . elgg_echo('email') . " " . elgg_view('input/text' , array('internalname' => 'email', 'class' => "input-text", 'value' => $email)) . "
";
-$form_body .= "" . elgg_echo('username') . " " . elgg_view('input/text' , array('internalname' => 'username', 'class' => "input-text", 'value' => $username)) . "
";
-$form_body .= "" . elgg_echo('password') . " " . elgg_view('input/password' , array('internalname' => 'password', 'class' => "input-password")) . "
";
-$form_body .= "" . elgg_echo('passwordagain') . " " . elgg_view('input/password' , array('internalname' => 'password2', 'class' => "input-password")) . "
";
-
-// view to extend to add more fields to the registration form
-$form_body .= elgg_view('register/extend');
-
-// Add captcha hook
-$form_body .= elgg_view('input/captcha');
-
-if ($admin_option) {
- $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
-}
-
-$form_body .= elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid']));
-$form_body .= elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode']));
-$form_body .= elgg_view('input/hidden', array('internalname' => 'action', 'value' => 'register'));
-$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "";
-
-echo elgg_view('input/form', array(
- 'action' => "{$login_url}action/register",
- 'body' => $form_body,
- 'class' => "margin-top"
-));
-?>
-
-
diff --git a/views/default/account/forms/useradd.php b/views/default/account/forms/useradd.php
deleted file mode 100644
index 7c1969f1b..000000000
--- a/views/default/account/forms/useradd.php
+++ /dev/null
@@ -1,31 +0,0 @@
-isAdmin()) && ($vars['show_admin'])) {
- $admin_option = true;
-}
-
-$form_body = "" . elgg_echo('name') . " " . elgg_view('input/text' , array('internalname' => 'name')) . "
";
-$form_body .= "" . elgg_echo('username') . " " . elgg_view('input/text' , array('internalname' => 'username')) . "
";
-$form_body .= "" . elgg_echo('email') . " " . elgg_view('input/text' , array('internalname' => 'email')) . "
";
-$form_body .= "" . elgg_echo('password') . " " . elgg_view('input/password' , array('internalname' => 'password')) . "
";
-$form_body .= "" . elgg_echo('passwordagain') . " " . elgg_view('input/password' , array('internalname' => 'password2')) . "
";
-$form_body .= "";
-
-if ($admin_option) {
- $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
-}
-
-$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "
";
-?>
-
-
-
- "action/useradd", 'body' => $form_body)) ?>
-
\ No newline at end of file
diff --git a/views/default/admin/users/add.php b/views/default/admin/users/add.php
index cc2da61db..9caeedd89 100644
--- a/views/default/admin/users/add.php
+++ b/views/default/admin/users/add.php
@@ -4,4 +4,4 @@
*/
echo elgg_view_title(elgg_echo('admin:users'));
-echo elgg_view('account/forms/useradd', array('show_admin'=>true));
\ No newline at end of file
+echo elgg_view('forms/useradd', array('show_admin'=>true));
\ No newline at end of file
diff --git a/views/default/core/account/login_box.php b/views/default/core/account/login_box.php
index eb37d7554..0dee72328 100644
--- a/views/default/core/account/login_box.php
+++ b/views/default/core/account/login_box.php
@@ -6,7 +6,7 @@
* @subpackage Core
*/
-$form_body = elgg_view('account/forms/login');
+$form_body = elgg_view('forms/login');
$login_url = elgg_get_site_url();
if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
diff --git a/views/default/core/account/login_dropdown.php b/views/default/core/account/login_dropdown.php
index dc124f4e8..386a52a6c 100644
--- a/views/default/core/account/login_dropdown.php
+++ b/views/default/core/account/login_dropdown.php
@@ -8,7 +8,7 @@ if (isloggedin()) {
return true;
}
-$form_body = elgg_view('account/forms/login');
+$form_body = elgg_view('forms/login');
$form_body .= " ";
$login_url = elgg_get_site_url();
diff --git a/views/default/core/account/login_walled_garden.php b/views/default/core/account/login_walled_garden.php
index 9f407bdff..bdd4cb016 100644
--- a/views/default/core/account/login_walled_garden.php
+++ b/views/default/core/account/login_walled_garden.php
@@ -21,7 +21,7 @@ $form_body .= " 'returntoreferer', 'value' => 'true'));
$login_url = elgg_get_site_url();
diff --git a/views/default/forms/login.php b/views/default/forms/login.php
new file mode 100644
index 000000000..87dd6d5ad
--- /dev/null
+++ b/views/default/forms/login.php
@@ -0,0 +1,35 @@
+
+
+
+
+ 'username', 'class' => 'login-textarea')); ?>
+
+ 'password', 'class' => 'login-textarea')); ?>
+
+ elgg_echo('login'))); ?>
+
+
+
+
+
+
+
+
+
+
+allow_registration) {
+ echo '' . elgg_echo('register') . ' | ';
+ }
+?>
+
+
+
+
\ No newline at end of file
diff --git a/views/default/forms/register.php b/views/default/forms/register.php
new file mode 100644
index 000000000..93e2585d8
--- /dev/null
+++ b/views/default/forms/register.php
@@ -0,0 +1,65 @@
+
+
+
+
+ 'name', 'value' => $name)); ?>
+
+
+
+
+ 'email', 'value' => $email)); ?>
+
+
+
+
+ 'username', 'value' => $username)); ?>
+
+
+
+
+ 'password')); ?>
+
+
+
+
+ 'password2')); ?>
+
+
+ "admin", 'options' => array(elgg_echo('admin_option'))));
+}
+
+echo elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid']));
+echo elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode']));
+echo elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register')));
+?>
+
+
\ No newline at end of file
diff --git a/views/default/forms/user/requestnewpassword.php b/views/default/forms/user/requestnewpassword.php
new file mode 100644
index 000000000..a235f2cc6
--- /dev/null
+++ b/views/default/forms/user/requestnewpassword.php
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+ 'username')); ?>
+
+
+
+ elgg_echo('request'))); ?>
+
+
+
\ No newline at end of file
diff --git a/views/default/forms/useradd.php b/views/default/forms/useradd.php
new file mode 100644
index 000000000..7c1969f1b
--- /dev/null
+++ b/views/default/forms/useradd.php
@@ -0,0 +1,31 @@
+isAdmin()) && ($vars['show_admin'])) {
+ $admin_option = true;
+}
+
+$form_body = "" . elgg_echo('name') . " " . elgg_view('input/text' , array('internalname' => 'name')) . "
";
+$form_body .= "" . elgg_echo('username') . " " . elgg_view('input/text' , array('internalname' => 'username')) . "
";
+$form_body .= "" . elgg_echo('email') . " " . elgg_view('input/text' , array('internalname' => 'email')) . "
";
+$form_body .= "" . elgg_echo('password') . " " . elgg_view('input/password' , array('internalname' => 'password')) . "
";
+$form_body .= "" . elgg_echo('passwordagain') . " " . elgg_view('input/password' , array('internalname' => 'password2')) . "
";
+$form_body .= "";
+
+if ($admin_option) {
+ $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
+}
+
+$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "
";
+?>
+
+
+
+ "action/useradd", 'body' => $form_body)) ?>
+
\ No newline at end of file
--
cgit v1.2.3