Browse Source

Style password reset login page

spaghetti 7 years ago
parent
commit
6528c57384
3 changed files with 20 additions and 16 deletions
  1. 1
    3
      classes/validate.class.php
  2. 9
    9
      sections/login/recover_step2.php
  3. 10
    4
      static/styles/public/style.css

+ 1
- 3
classes/validate.class.php View File

@@ -2,7 +2,7 @@
2 2
 /*-- TODO ---------------------------//
3 3
 Writeup how to use the VALIDATE class, add in support for form id checks
4 4
 Complete the number and date validation
5
-Finish the GenerateJS stuff
5
+Remove the GenerateJS stuff
6 6
 //-----------------------------------*/
7 7
 
8 8
 class VALIDATE {
@@ -173,7 +173,6 @@ class VALIDATE {
173 173
 
174 174
   function GenerateJS($FormID) {
175 175
     $ReturnJS = "<script type=\"text/javascript\" language=\"javascript\">\r\n";
176
-    $ReturnJS .= "//<![CDATA[\r\n";
177 176
     $ReturnJS .= "function formVal() {\r\n";
178 177
     $ReturnJS .= "  clearErrors('$FormID');\r\n";
179 178
 
@@ -291,7 +290,6 @@ class VALIDATE {
291 290
     }
292 291
 
293 292
     $ReturnJS .= "}\r\n";
294
-    $ReturnJS .= "//]]>\r\n";
295 293
     $ReturnJS .= "</script>\r\n";
296 294
     return $ReturnJS;
297 295
   }

+ 9
- 9
sections/login/recover_step2.php View File

@@ -1,6 +1,5 @@
1 1
 <?
2 2
 View::show_header('Recover Password');
3
-echo $Validate->GenerateJS('recoverform');
4 3
 ?>
5 4
 <script src="<?=(STATIC_SERVER)?>functions/validate.js" type="text/javascript"></script>
6 5
 <script src="<?=(STATIC_SERVER)?>functions/password_validate.js" type="text/javascript"></script>
@@ -14,17 +13,18 @@ if (empty($PassWasReset)) {
14 13
 ?>
15 14
     <strong class="important_text"><?=display_str($Err)?></strong><br /><br />
16 15
 <?  } ?> Any password 6 characters or longer is accepted, but a strong password is 8 characters or longer, contains at least 1 lowercase and uppercase letter, and contains at least a number or symbol.<br /><br />
17
-    <table class="layout" cellpadding="2" cellspacing="1" border="0" align="center" width="100%">
18
-      <tr valign="top">
19
-        <td align="right" style="width: 100px;">Password&nbsp;</td>
20
-        <td align="left"><input type="password" name="password" id="new_pass_1" class="inputtext" /> <strong id="pass_strength"></strong></td>
16
+    <table class="layout">
17
+      <tr>
18
+        <td><strong id="pass_strength"></strong></td>
19
+        <td><input type="password" name="password" id="new_pass_1" class="inputtext" size="40" placeholder="New password" pattern=".{6,307200}" required></td>
21 20
       </tr>
22
-      <tr valign="top">
23
-        <td align="right">Confirm Password&nbsp;</td>
24
-        <td align="left"><input type="password" name="verifypassword" id="new_pass_2" class="inputtext" /> <strong id="pass_match"></strong></td>
21
+      <tr>
22
+        <td><strong id="pass_match"></strong></td>
23
+        <td><input type="password" name="verifypassword" id="new_pass_2" class="inputtext" size="40" placeholder="Confirm password" pattern=".{6,307200}" required></td>
25 24
       </tr>
26 25
       <tr>
27
-        <td colspan="2" align="right"><input type="submit" name="reset" value="Reset!" class="submit" /></td>
26
+        <td></td>
27
+        <td><input type="submit" name="reset" value="Reset!" class="submit"></td>
28 28
       </tr>
29 29
     </table>
30 30
 <? } else { ?>

+ 10
- 4
static/styles/public/style.css View File

@@ -54,15 +54,15 @@ input[type="text"]:invalid, input[type="password"]:invalid {
54 54
   border-right: 2px solid red;
55 55
 }
56 56
 
57
-#loginform > table {
57
+#loginform > table, #recoverform > div > table {
58 58
   border-spacing: 1px;
59 59
 }
60 60
 
61
-#loginform #username {
61
+#loginform #username, #recoverform #new_pass_1 {
62 62
   border-radius: 5px 5px 0 0;
63 63
 }
64 64
 
65
-#loginform input[type="submit"] {
65
+#loginform input[type="submit"], #recoverform input[type="submit"] {
66 66
   width: 100%;
67 67
   background-color: white;
68 68
   font: 500 14px/29px Helvetica, Arial, sans-serif;
@@ -70,10 +70,16 @@ input[type="text"]:invalid, input[type="password"]:invalid {
70 70
   border-radius: 0 0 5px 5px;
71 71
   cursor: pointer;
72 72
 }
73
-#loginform input[type="submit"]:hover {
73
+#loginform input[type="submit"]:hover, #recoverform input[type="submit"]:hover {
74 74
   background-color: #FFF7F7;
75 75
 }
76 76
 
77
+#recoverform .layout td:first-child {
78
+  width: 140px;
79
+  text-align: right;
80
+  padding-right: 5px;
81
+}
82
+
77 83
 #head, #foot {
78 84
   height: 30px;
79 85
   width: 100%;

Loading…
Cancel
Save