Changeset 1242511
- Timestamp:
- 09/10/2015 02:21:31 PM (11 years ago)
- Location:
- cyclos/trunk
- Files:
-
- 2 edited
-
cyclos-public.php (modified) (7 diffs)
-
stylesheet.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cyclos/trunk/cyclos-public.php
r1242487 r1242511 76 76 // Returns the html to show when shortcode is used. 77 77 return ' 78 <div id="cyclosForgotContainer" class="cyclosFormBox" style="display:none">79 <form id="cyclosForgotPasswordForm" action="#" method="post">78 <div class="cyclosFormBox cyclosForgotContainer" style="display:none"> 79 <form class="cyclosForgotPasswordForm" action="#" method="post"> 80 80 <div class="cyclosFormTitle">' . $t->forgotTitle . '</div> 81 81 <div class="cyclosFormField"> 82 <input placeholder="' . $t->forgotEmail . '" id="cyclosEmail" tabindex="3" type="email" required>82 <input placeholder="' . $t->forgotEmail . '" name="cyclosEmail" type="email" required> 83 83 </div> 84 84 <div class="cyclosFormField"> 85 85 <div> 86 <input placeholder="' . $t->forgotCaptcha . '" id="cyclosCaptcha" tabindex="4" type="text" style="float: left; width: 60%" required>87 <a id="cyclosNewCaptcha" href="#">' . $t->forgotNewCaptcha . '</a>86 <input placeholder="' . $t->forgotCaptcha . '" class="cyclosCaptcha" type="text" style="float: left; width: 60%" required> 87 <a class="cyclosNewCaptcha" href="#">' . $t->forgotNewCaptcha . '</a> 88 88 </div> 89 89 <div> 90 <img alt="captcha" id="cyclosCaptchaImage" style="display:none">90 <img alt="captcha" class="cyclosCaptchaImage" style="display:none"> 91 91 </div> 92 92 </div> 93 93 <div class="cyclosFormActions"> 94 <input id="cyclosForgotSubmit" type="submit" tabindex="5" value="' . $t->forgotSubmit . '">94 <input class="cyclosForgotSubmit" type="submit" value="' . $t->forgotSubmit . '"> 95 95 <div class="cyclosForgotPasswordBox"> 96 <a id="cyclosForgotCancel" href="#">' . $t->forgotCancel . '</a>96 <a class="cyclosForgotCancel" href="#">' . $t->forgotCancel . '</a> 97 97 </div> 98 98 </div> 99 99 </form> 100 100 </div> 101 <div id="cyclosLoginContainer" class="cyclosFormBox">102 <form id="cyclosLoginForm" action="#" method="post">101 <div class="cyclosFormBox cyclosLoginContainer"> 102 <form class="cyclosLoginForm" action="#" method="post"> 103 103 <div class="cyclosFormTitle">' . $t->loginTitle . '</div> 104 104 <div class="cyclosFormField"> 105 <input placeholder="' . $t->loginName . '" id="cyclosPrincipal" tabindex="3" type="text" required>105 <input placeholder="' . $t->loginName . '" name="cyclosPrincipal" type="text" required> 106 106 </div> 107 107 <div class="cyclosFormField"> 108 <input placeholder="' . $t->loginPassword . '" id="cyclosPassword" tabindex="4" type="password" required>108 <input placeholder="' . $t->loginPassword . '" name="cyclosPassword" type="password" required> 109 109 </div> 110 110 <div class="cyclosFormActions"> 111 <input type="submit" id="cyclosLoginSubmit" tabindex="5" value="' . $t->loginSubmit . '">111 <input type="submit" class="cyclosLoginSubmit" value="' . $t->loginSubmit . '"> 112 112 <div class="cyclosForgotPasswordBox"> 113 <a id="cyclosForgotLink" href="#">' . $t->forgotLink . '</a>113 <a class="cyclosForgotLink" href="#">' . $t->forgotLink . '</a> 114 114 </div> 115 115 </div> … … 128 128 function showLogin() { 129 129 if (submitEnabled) { 130 $(" #cyclosLoginForm").trigger("reset");131 $(" #cyclosLoginContainer").show();132 $(" #cyclosForgotContainer").hide();133 $(" #cyclosPrincipal").focus();130 $(".cyclosLoginForm").trigger("reset"); 131 $(".cyclosLoginContainer").show(); 132 $(".cyclosForgotContainer").hide(); 133 $(".cyclosPrincipal").focus(); 134 134 } 135 135 } … … 137 137 function showForgotPassword() { 138 138 if (submitEnabled) { 139 $(" #cyclosForgotPasswordForm").trigger("reset");140 $(" #cyclosLoginContainer").hide();141 $(" #cyclosForgotContainer").show();142 $(" #cyclosEmail").focus();139 $(".cyclosForgotPasswordForm").trigger("reset"); 140 $(".cyclosLoginContainer").hide(); 141 $(".cyclosForgotContainer").show(); 142 $(".cyclosEmail").focus(); 143 143 if (captchaId == null) { 144 144 newCaptcha(); … … 148 148 149 149 function newCaptcha() { 150 var img = $(" #cyclosCaptchaImage");150 var img = $(".cyclosCaptchaImage"); 151 151 img.css("opacity", 0.2); 152 152 $.post("' . admin_url('admin-ajax.php?action=cyclos_captcha') . '") … … 163 163 } 164 164 165 $(" #cyclosLoginForm").submit(function(event) {165 $(".cyclosLoginForm").submit(function(event) { 166 166 if (submitEnabled) { 167 var principal = ($("#cyclosPrincipal").val() || "").trim();168 var password = ($("#cyclosPassword").val() || "").trim();167 var principal = this.cyclosPrincipal.value.trim(); 168 var password = this.cyclosPassword.value.trim(); 169 169 170 170 if (principal != "" && password != "") { … … 197 197 }); 198 198 199 $(" #cyclosForgotPasswordForm").submit(function(event) {199 $(".cyclosForgotPasswordForm").submit(function(event) { 200 200 if (submitEnabled) { 201 var email = ($("#cyclosEmail").val() || "").trim();202 var captchaText = ($("#cyclosCaptcha").val() || "").trim();201 var email = this.cyclosEmail.trim(); 202 var captchaText = this.cyclosCaptcha.trim(); 203 203 204 204 if (email != "" && captchaText != "") { … … 233 233 }); 234 234 235 $(" #cyclosForgotLink").click(showForgotPassword).click(stopEvent);236 $(" #cyclosForgotCancel").click(showLogin).click(stopEvent);237 $(" #cyclosNewCaptcha").click(function() {235 $(".cyclosForgotLink").click(showForgotPassword).click(stopEvent); 236 $(".cyclosForgotCancel").click(showLogin).click(stopEvent); 237 $(".cyclosNewCaptcha").click(function() { 238 238 newCaptcha(); 239 var cyclosCaptcha = $(" #cyclosCaptcha");239 var cyclosCaptcha = $(".cyclosCaptcha"); 240 240 cyclosCaptcha.val(""); 241 241 cyclosCaptcha.focus(); -
cyclos/trunk/stylesheet.css
r1111214 r1242511 1 #cyclosLoginContainer .cyclosFormTitle {1 .cyclosLoginContainer .cyclosFormTitle { 2 2 background: url("login.png") no-repeat 0px 0px; 3 3 } 4 4 5 #cyclosForgotContainer .cyclosFormTitle {5 .cyclosForgotContainer .cyclosFormTitle { 6 6 background: url("password_recover.png") no-repeat 0px 0px; 7 7 } … … 65 65 } 66 66 67 #cyclosNewCaptcha {67 .cyclosNewCaptcha { 68 68 display: block; 69 69 float: right;
Note: See TracChangeset
for help on using the changeset viewer.