From c81ff37c56db5f9c620ada1a854963c7aaee3d20 Mon Sep 17 00:00:00 2001
From: Seth Meranda <smeranda2@unl.edu>
Date: Thu, 20 Aug 2009 16:02:52 +0000
Subject: [PATCH] added a registration page, and stylesheet to deal with forms.

---
 .../views/default/account/forms/register.php  | 63 +++++++++++++++++++
 .../views/default/pageshells/pageshell.php    |  1 +
 2 files changed, 64 insertions(+)
 create mode 100644 unl_theme/views/default/account/forms/register.php

diff --git a/unl_theme/views/default/account/forms/register.php b/unl_theme/views/default/account/forms/register.php
new file mode 100644
index 00000000..5fac68ae
--- /dev/null
+++ b/unl_theme/views/default/account/forms/register.php
@@ -0,0 +1,63 @@
+<?php
+
+     /**
+	 * Elgg register form
+	 * 
+	 * @package Elgg
+	 * @subpackage Core
+	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+	 * @author Curverider Ltd
+	 * @copyright Curverider Ltd 2008-2009
+	 * @link http://elgg.org/
+	 */ 
+	 
+	$username = get_input('u');
+	$email = get_input('e');
+	$name = get_input('n');
+
+	$admin_option = false;
+	if (($_SESSION['user']->admin) && ($vars['show_admin'])) 
+		$admin_option = true;
+	$form_body = '<p class="required">Indicates a required field.</p>';
+	$form_body .= '<fieldset>
+    				<legend>Account Setup Information</legend>
+    				<ol>';
+	$form_body .= "<li class='required'><label class='element'>" . elgg_echo('name') ."</label><div class='element'>" . elgg_view('input/text' , array('internalname' => 'name', 'class' => "general-textarea", 'value' => $name)) . "</div></li>";
+	
+	$form_body .= "<li class='required'><label class='element'>" . elgg_echo('email') . "</label><div class='element'>" . elgg_view('input/text' , array('internalname' => 'email', 'id' => 'email', 'class' => "general-textarea", 'value' => $email)) . "</div></li>";
+	$form_body .= "<li class='required'><label class='element'>" . elgg_echo('username') . "</label><div class='element'>" . elgg_view('input/text' , array('internalname' => 'username', 'class' => "general-textarea", 'value' => $username)) . "</div></li>";
+	$form_body .= "<li class='required'><label class='element'>" . elgg_echo('password') . "</label><div class='element'>" . elgg_view('input/password' , array('internalname' => 'password', 'class' => "general-textarea")) . "</div></li>";
+	$form_body .= "<li class='required'><label class='element'>" . elgg_echo('password') . "</label><div class='element'>" . elgg_view('input/password' , array('internalname' => 'password2', 'class' => "general-textarea")) ."<span class='form-field-description'>again for verification</span>";
+	
+	// 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')) . "</div></li>";
+	$form_body .= "</ol></fieldset>";
+	$form_body .= '<p class="submit">' .elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>";
+?>
+
+	
+	<h2 class="sec_header"><?php echo elgg_echo('register'); ?></h2>
+	<div class="three_col left formCool">
+	<p>Huskers worldwide are encouraged to create an account in order to use the social network. Upon creating an account with the form below, 
+	you will be sent an email with a verification link. Click this link to gain access by activating your account.</p>
+	<?php echo elgg_view('input/form', array('action' => "{$vars['url']}action/register", 'body' => $form_body)) ?>
+	</div>
+	<div class="col right">
+	<div class="zenbox cool">
+	<h3>myUNL Account Users</h3>
+	<p>If you have a myUNL account (used for most UNL services, like Blackboard), then we have an account waiting for you without registering.</p>
+					<?php 
+						$form_body = "<p>";
+						$form_body .= elgg_view('input/submit', array('value' => elgg_echo('UNL Login'))) . "</p>";
+						$form_body .= "<p><a href=\"https://login.unl.edu/faq/account-resetpw.shtml\">" . elgg_echo('Forgot your my.UNL password?') . "</a></p>";
+						echo elgg_view('input/form', array('body' => $form_body, 'action' => "". $vars['url'] ."?loginwith=UNLlogin"));
+					?>
+	</div>
+	</div>
\ No newline at end of file
diff --git a/unl_theme/views/default/pageshells/pageshell.php b/unl_theme/views/default/pageshells/pageshell.php
index 57cce0bc..72c399cb 100644
--- a/unl_theme/views/default/pageshells/pageshell.php
+++ b/unl_theme/views/default/pageshells/pageshell.php
@@ -19,6 +19,7 @@ $page->breadcrumbs = "<!-- WDN: see glossary item \'breadcrumbs\' --> <ul> <li c
 $page->doctitle = '<title>'.$title.'</title>';
 $page->head .= elgg_view('page_elements/header', $vars);
 $page->addScript($vars['url'] . 'mod/unl_theme/scripts/social.js');
+$page->addStyleSheet('/wdn/templates_3.0/css/content/forms.css');
 
 $page->maincontentarea .= elgg_view('page_elements/unl_nav', $vars);
 $page->titlegraphic = '<h1>'.$vars['config']->sitename.'</h1>';
-- 
GitLab