aboutsummaryrefslogtreecommitdiff
path: root/views/default/forms
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/forms')
-rw-r--r--views/default/forms/login.php35
-rw-r--r--views/default/forms/register.php65
-rw-r--r--views/default/forms/user/requestnewpassword.php26
-rw-r--r--views/default/forms/useradd.php31
4 files changed, 157 insertions, 0 deletions
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 @@
+<?php
+/**
+ * Elgg login form
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+?>
+
+<p class='loginbox'>
+ <label><?php echo elgg_echo('loginusername'); ?></label>
+ <?php echo elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')); ?>
+ <label><?php echo elgg_echo('password'); ?></label>
+ <?php echo elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')); ?>
+
+ <?php echo elgg_view('input/submit', array('value' => elgg_echo('login'))); ?>
+
+ <span class='rememberme'>
+ <label>
+ <input type="checkbox" name="persistent" value="true" />
+ <?php echo elgg_echo('user:persistent'); ?>
+ </label>
+ </span>
+
+ <?php echo elgg_view('login/extend'); ?>
+
+<?php
+ if ($CONFIG->allow_registration) {
+ echo '<a class="registration_link" href="' . elgg_get_site_url() . 'pg/register/">' . elgg_echo('register') . '</a> | ';
+ }
+?>
+ <a class="forgotten_password_link" href="<?php echo elgg_get_site_url(); ?>pages/account/forgotten_password.php">
+ <?php echo elgg_echo('user:password:lost'); ?>
+ </a>
+</p> \ 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 @@
+<?php
+/**
+ * Elgg register form
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$username = get_input('u');
+$email = get_input('e');
+$name = get_input('n');
+
+$admin_option = false;
+if (isadminloggedin() && isset($vars['show_admin'])) {
+ $admin_option = true;
+}
+
+?>
+<p class="mtm">
+ <label><?php echo elgg_echo('name'); ?></label>
+ <br />
+ <?php echo elgg_view('input/text', array('internalname' => 'name', 'value' => $name)); ?>
+</p>
+<p>
+ <label><?php echo elgg_echo('email'); ?></label>
+ <br />
+ <?php echo elgg_view('input/text', array('internalname' => 'email', 'value' => $email)); ?>
+</p>
+<p>
+ <label><?php echo elgg_echo('username'); ?></label>
+ <br />
+ <?php echo elgg_view('input/text', array('internalname' => 'username', 'value' => $username)); ?>
+</p>
+<p>
+ <label><?php echo elgg_echo('password'); ?></label>
+ <br />
+ <?php echo elgg_view('input/password', array('internalname' => 'password')); ?>
+</p>
+<p>
+ <label><?php echo elgg_echo('passwordagain'); ?></label>
+ <br />
+ <?php echo elgg_view('input/password', array('internalname' => 'password2')); ?>
+</p>
+
+<?php
+// view to extend to add more fields to the registration form
+echo elgg_view('register/extend');
+
+// Add captcha hook
+echo elgg_view('input/captcha');
+
+if ($admin_option) {
+ echo elgg_view('input/checkboxes', array('internalname' => "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')));
+?>
+
+<script type="text/javascript">
+ $(document).ready(function() {
+ $('input[name=name]').focus();
+ });
+</script> \ 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 @@
+<?php
+/**
+ * Elgg forgotten password.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+?>
+
+<p class="mtm">
+ <?php echo elgg_echo('user:password:text'); ?>
+</p>
+<p>
+ <label><?php echo elgg_echo('username'); ?></label>
+ <?php echo elgg_view('input/text', array('internalname' => 'username')); ?>
+</p>
+<?php echo elgg_view('input/captcha'); ?>
+<p>
+ <?php echo elgg_view('input/submit', array('value' => elgg_echo('request'))); ?>
+</p>
+
+<script type="text/javascript">
+ $(document).ready(function() {
+ $('input[name=username]').focus();
+ });
+</script> \ 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 @@
+<?php
+/**
+ * Elgg add user form.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$admin_option = false;
+if ((get_loggedin_user()->isAdmin()) && ($vars['show_admin'])) {
+ $admin_option = true;
+}
+
+$form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name')) . "</label></p>";
+$form_body .= "<p><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username')) . "</label></p>";
+$form_body .= "<p><label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email')) . "</label></p>";
+$form_body .= "<p><label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password')) . "</label></p>";
+$form_body .= "<p><label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2')) . "</label></p>";
+$form_body .= "<p>";
+
+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'))) . "</p>";
+?>
+
+<div class="admin_settings add-user">
+ <h3><?php echo elgg_echo('adduser'); ?></h3>
+ <?php echo elgg_view('input/form', array('action' => "action/useradd", 'body' => $form_body)) ?>
+</div> \ No newline at end of file