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

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

1
 <?
1
 <?
2
 View::show_header('Recover Password');
2
 View::show_header('Recover Password');
3
-echo $Validate->GenerateJS('recoverform');
4
 ?>
3
 ?>
5
 <script src="<?=(STATIC_SERVER)?>functions/validate.js" type="text/javascript"></script>
4
 <script src="<?=(STATIC_SERVER)?>functions/validate.js" type="text/javascript"></script>
6
 <script src="<?=(STATIC_SERVER)?>functions/password_validate.js" type="text/javascript"></script>
5
 <script src="<?=(STATIC_SERVER)?>functions/password_validate.js" type="text/javascript"></script>
14
 ?>
13
 ?>
15
     <strong class="important_text"><?=display_str($Err)?></strong><br /><br />
14
     <strong class="important_text"><?=display_str($Err)?></strong><br /><br />
16
 <?  } ?> 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 />
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
       </tr>
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
       </tr>
24
       </tr>
26
       <tr>
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
       </tr>
28
       </tr>
29
     </table>
29
     </table>
30
 <? } else { ?>
30
 <? } else { ?>

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

54
   border-right: 2px solid red;
54
   border-right: 2px solid red;
55
 }
55
 }
56
 
56
 
57
-#loginform > table {
57
+#loginform > table, #recoverform > div > table {
58
   border-spacing: 1px;
58
   border-spacing: 1px;
59
 }
59
 }
60
 
60
 
61
-#loginform #username {
61
+#loginform #username, #recoverform #new_pass_1 {
62
   border-radius: 5px 5px 0 0;
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
   width: 100%;
66
   width: 100%;
67
   background-color: white;
67
   background-color: white;
68
   font: 500 14px/29px Helvetica, Arial, sans-serif;
68
   font: 500 14px/29px Helvetica, Arial, sans-serif;
70
   border-radius: 0 0 5px 5px;
70
   border-radius: 0 0 5px 5px;
71
   cursor: pointer;
71
   cursor: pointer;
72
 }
72
 }
73
-#loginform input[type="submit"]:hover {
73
+#loginform input[type="submit"]:hover, #recoverform input[type="submit"]:hover {
74
   background-color: #FFF7F7;
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
 #head, #foot {
83
 #head, #foot {
78
   height: 30px;
84
   height: 30px;
79
   width: 100%;
85
   width: 100%;

Loading…
Cancel
Save