New login page as a templating demo. Feedback welcome!
authorstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 24 Aug 2006 20:35:49 +0000 (20:35 +0000)
committerstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 24 Aug 2006 20:35:49 +0000 (20:35 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11636 7612ce4b-ef26-0410-bec9-ea0150e637f0

templates/default_advanced/images/login1.png [new file with mode: 0644]
templates/default_advanced/images/login2.png [new file with mode: 0644]
templates/default_advanced/images/login_submit.png [new file with mode: 0644]
templates/default_advanced/login.tpl [new file with mode: 0644]
templates/default_advanced/stylesheet_advanced.tpl
templates/default_advanced/template.php

diff --git a/templates/default_advanced/images/login1.png b/templates/default_advanced/images/login1.png
new file mode 100644 (file)
index 0000000..0c0dc0c
Binary files /dev/null and b/templates/default_advanced/images/login1.png differ
diff --git a/templates/default_advanced/images/login2.png b/templates/default_advanced/images/login2.png
new file mode 100644 (file)
index 0000000..d1c91e2
Binary files /dev/null and b/templates/default_advanced/images/login2.png differ
diff --git a/templates/default_advanced/images/login_submit.png b/templates/default_advanced/images/login_submit.png
new file mode 100644 (file)
index 0000000..2a4119b
Binary files /dev/null and b/templates/default_advanced/images/login_submit.png differ
diff --git a/templates/default_advanced/login.tpl b/templates/default_advanced/login.tpl
new file mode 100644 (file)
index 0000000..90e7bdc
--- /dev/null
@@ -0,0 +1,81 @@
+<?php
+/**
+ * login.tpl
+ *
+ * Template to create the login page
+ *
+ * The following variables are available to this template:
+ *      $logo_str           - string containing HTML to display the org logo
+ *      $logo_path          - path to the org logo, in case you want to do
+ *                            something else with it.
+ *      $sm_attribute_str   - string containg SQM attributes.  Will be empty if
+ *                            this has been disabled by the admin.
+ *      $org_name_str       - translated string containing orginization's name
+ *      $login_field_value  - default value for the user name field
+ *      $login_extra        - Some extra fields needed by SquirrelMail for the 
+ *                            login.  YOU SHOULD ALWAYS INCLUDE THIS FIELD!!
+ * 
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+// add includes
+require(SM_PATH . 'templates/util_global.php');
+
+/* retrieve the template vars */
+extract($t);
+
+?>
+<div id="sqm_login">
+<table cellspacing="0">
+ <tr>
+  <td colspan="2">
+   <?php echo getIcon($icon_theme_path, 'login1.png', _("Login"), _("Login")); ?>
+  </td>
+ </tr>
+ <tr>
+  <td class="orgName" colspan="2">
+   <?php echo $org_name_str; ?>
+  </td>
+ </tr>
+ <tr>
+  <td class="attr" colspan="2">
+   <?php echo $sm_attribute_str; ?>
+  </td>
+ </tr>
+ <tr>
+  <td class="orgLogo">
+   <img src="<?php echo $logo_path; ?>" width="50px" />
+  </td>
+  <td>
+   <table cellspacing="0">
+    <tr>
+     <td class="fieldName">
+      <?php echo _("Name:"); ?>
+     </td>
+     <td class="fieldInput">
+      <input type="text" name="login_username" value="<?php echo $login_field_value; ?>" id="login_username" class="input" />
+     </td>
+    </tr>
+    <tr>
+     <td class="fieldName">
+      <?php echo _("Password:"); ?>
+     </td>
+     <td class="fieldInput">
+      <input type="password" name="secretkey" value="" id="secretkey" class="input" />
+      <?php echo $login_extra; ?>
+     </td>
+    </tr>
+    <tr>
+     <td class="loginSubmit" colspan="2">
+      <input type="image" src="<?php echo getIconPath($icon_theme_path, 'login_submit.png'); ?>" alt="<?php echo _("Login"); ?>" />
+     </td>
+    </tr>
+   </table>
+  </td>
+ </tr>
+</table>
+</div>
\ No newline at end of file
index 01c11938062502d8d1b72af4097d68585a73c4cc..b04bea456de0ee76d0c12a6f9c39c9e1b89dfb7d 100644 (file)
 /* retrieve the template vars */
 extract($t);
 ?>
+/* advacned login page defs */
+#sqm_login  {
+    margin-top: 25px;
+    text-align: center;
+}
+
+#sqm_login  table   {
+    border: 0;
+    padding: 0;
+    margin-left: auto;
+    margin-right: auto;
+    width: auto;
+}
+
+#sqm_login  td   {
+    padding-left: 2px;
+    padding-right: 2px;
+    padding-top: 0px;
+    padding-bottom: 0px;
+    color: #726b58;
+    font-family: verdana, sans-serif;
+    width: auto;
+    text-align: center;
+}
+
+#sqm_login  td.orgName {
+    font-weight: bold;
+    background: none;
+    font-size: 90%;
+}
+
+#sqm_login  td.orgLogo {
+    width: 155px;
+    text-align: center;
+    vertical-align: center;
+}
+
+#sqm_login  td.orgLogo  img {
+    width: 150px;
+    padding:0;
+}
+
+#sqm_login  td.attr   {
+    font-size: 70%;
+    padding-top:5px;
+    padding-bottom: 10px;
+}
+
+#sqm_login  td.fieldName {
+    font-size: 10pt;
+    font-weight: bold;
+    text-align: right;
+    width: 50%;
+}
+
+#sqm_login  td.fieldInput {
+    text-align: left;
+    padding-top: 1px;
+    padding-bottom: 1px;
+}
+
+#sqm_login  td.loginSubmit {
+    padding-top: 15px;
+}
+
+#sqm_login  input.input {
+    font-size: 80%;
+    color: #110f08;
+    border: 1px solid #726b58;
+    padding: 1px;
+    background: url(<?php echo $icon_theme_path; ?>/login2.png) repeat-y;
+    width: 160px;
+}
 
 /* advanced option order defs */
 #optionHighlight    td.divider  {
index 80fde498ab247188b81915da53ef1cd9730b13c1..cb2c8e16e4480bd1dc15ff2aea565197b99bcd10 100644 (file)
@@ -21,6 +21,7 @@ $templates_provided = array (
                                 'options_order.tpl',
                                 'options_highlight_list.tpl',
                                 'options_highlight_addedit.tpl',
+                                'login.tpl'
                             );
 
 /**