aboutsummaryrefslogtreecommitdiff
path: root/mod/walledgarden/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/walledgarden/views/default')
-rw-r--r--mod/walledgarden/views/default/account/forms/login_walledgarden.php110
-rw-r--r--mod/walledgarden/views/default/page_shells/walled_garden_index.php76
2 files changed, 186 insertions, 0 deletions
diff --git a/mod/walledgarden/views/default/account/forms/login_walledgarden.php b/mod/walledgarden/views/default/account/forms/login_walledgarden.php
new file mode 100644
index 000000000..3589209fe
--- /dev/null
+++ b/mod/walledgarden/views/default/account/forms/login_walledgarden.php
@@ -0,0 +1,110 @@
+<?php
+
+ /**
+ * Elgg login form for walled garden
+ */
+
+ global $CONFIG;
+
+ //login form
+ $form_body = "<h2 class='master'>" . elgg_echo('login') . "</h2>";
+ $form_body .= "<label>".elgg_echo('username')."</label>".elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea username master'));
+ $form_body .= "<br /><label>".elgg_echo('password')."</label>".elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea password master' ));
+
+
+ $form_body .= "<br />" . elgg_view('input/submit', array('value' => elgg_echo('login'))) . " <div id=\"persistent_login\"><label><input type=\"checkbox\" name=\"persistent\" value=\"true\" />".elgg_echo('user:persistent')."</label></div>";
+ $form_body .= "<p class=\"loginbox\">";
+ $form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : "";
+ $form_body .= "<a href='#forgotten_password' class='forgotten_password_link'>" . elgg_echo('user:password:lost') . "</a></p>";
+
+
+
+ $login_url = $vars['url'];
+ if ((isset($CONFIG->https_login)) && ($CONFIG->https_login))
+ $login_url = str_replace("http", "https", $vars['url']);
+?>
+
+ <div id="login-box">
+ <?php
+ echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));
+ ?>
+ <div class="clearfloat"></div>
+ </div>
+
+
+<script type="text/javascript">
+ $(document).ready(function() {
+
+ $('.login-textarea.username.master').focus(); // only put cursor in textfirld if master login
+
+ $('.login-textarea.name').focus(function() {
+ if (this.value=='<?php echo elgg_echo('username'); ?>') {
+ this.value='';
+ }
+ });
+ $('.login-textarea.name').blur(function() {
+ if (this.value=='') {
+ this.value='<?php echo elgg_echo('username'); ?>';
+ }
+ });
+ $('.login-textarea.password').focus(function() {
+ if (this.value=='<?php echo elgg_echo('password'); ?>') {
+ this.value='';
+ }
+ });
+
+
+ //select all the a tag with name equal to modal
+ $('a.forgotten_password_link').click(function(e) {
+ //Cancel the link behavior
+ e.preventDefault();
+
+ //Get the A tag
+ var id = $(this).attr('href');
+
+ //Get the screen height and width
+ //var maskHeight = $(document).height();
+ //var maskWidth = $(window).width();
+
+ //Set height and width to mask to fill up the whole screen
+ //$('#mask').css({'width':maskWidth,'height':maskHeight});
+
+ //transition effect
+ $('#mask').fadeIn(500);
+ $('#mask').fadeTo("slow",0.8);
+
+ //Get the window height and width
+ var winH = $(window).height();
+ var winW = $(window).width();
+
+ //Set the popup window to center
+ $(id).css('top', winH/4-$(id).height()/2);
+ $(id).css('left', (winW-20)/2-$(id).width()/2);
+
+ //transition effect
+ $(id).fadeIn(1000);
+
+ });
+
+ //if close button is clicked
+ $('.window .close').click(function (e) {
+ //Cancel the link behaviour
+ e.preventDefault();
+
+ $('#mask').hide();
+ $('.window').hide();
+ });
+
+ //if mask is clicked
+ $('#mask').click(function () {
+ $(this).hide();
+ $('.window').hide();
+ });
+
+});
+</script>
+
+
+
+
+ \ No newline at end of file
diff --git a/mod/walledgarden/views/default/page_shells/walled_garden_index.php b/mod/walledgarden/views/default/page_shells/walled_garden_index.php
new file mode 100644
index 000000000..33e3605a1
--- /dev/null
+++ b/mod/walledgarden/views/default/page_shells/walled_garden_index.php
@@ -0,0 +1,76 @@
+<?php
+/**
+ * Elgg pageshell
+ * The standard HTML page shell that everything else fits into
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['config'] The site configuration settings, imported
+ * @uses $vars['title'] The page title
+ * @uses $vars['body'] The main content of the page
+ * @uses $vars['messages'] A 2d array of various message registers, passed from system_messages()
+ */
+
+// Set the content type
+header("Content-type: text/html; charset=UTF-8");
+
+// Set title
+if (empty($vars['title'])) {
+ $title = $vars['config']->sitename;
+} else if (empty($vars['config']->sitename)) {
+ $title = $vars['title'];
+} else {
+ $title = $vars['config']->sitename . ": " . $vars['title'];
+}
+
+echo elgg_view('page_elements/html_begin', $vars);
+echo elgg_view('messages/list', array('object' => $vars['sysmessages']));
+?>
+ <style type="text/css">
+ /*
+body {background: white;}
+ #walledgardenlogin {
+ position:absolute;
+ bottom:0;
+ left:280px;
+ height:250px;
+ width:272px;
+ }
+ #walledgardenintro {
+ position: absolute;
+ bottom:15px;
+ left:25px;
+ height:215px;
+ width:232px;
+ padding:10px;
+ background-color: white;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ }
+ #walledgardenlogin #login-box {
+ background: none;
+ }
+ #walledgardenlogin #login-box h2 {
+ display:none;
+ }
+ #walledgardenlogin #login-box form {height:224px;padding:10px 10px 0;}
+
+ .messages, .messages_error {
+ position: relative;
+ margin: auto;
+ }
+*/
+
+ </style>
+<?php
+ echo "<div style='margin:20px auto;position:relative;padding:20px;width:523px;height:355px;background: url({$vars['url']}_graphics/login_back.gif) no-repeat top left;'>";
+ echo "<div id='walledgardenintro'><h1>Welcome to:<br />" . $title . "</h1></div>";
+ echo "<div id='walledgardenlogin' class='whereamIused'>";
+ echo $vars['body'];
+ echo "</div></div>";
+ echo elgg_view('page_elements/html_end', $vars);
+?>
+