Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
prop = 0;
}
if (prop >= 60) {
- if (prop == 100) {
- color = "#47f";
- } else {
- color = "#4f4";
- }
+ color = "#4f4";
+ bgcolor = "#050";
ok = true;
} else if (prop >= 40) {
color = "#ff4";
+ bgcolor = "#750";
ok = false;
} else {
color = "#f20";
+ bgcolor = "#700";
ok = false;
}
$("#passwords_measure")
- .stop()
- .animate({ width: prop + "%",
- backgroundColor: color
- }, 750);
+ .stop()
+ .animate({ width: prop + "%",
+ backgroundColor: color
+ }, 750)
+ .parent().stop()
+ .animate({ backgroundColor: bgcolor }, 750);
var submitButton = $(":submit[@name='" + passwordprompt_submit + "']");
if (ok) {
submitButton.removeAttr("disabled");
var passwordprompt_submit = ' . $submit . ';
$(":input[@name=' . $prompt . ']").keyup(function(event) { checkPassword(event.target); });
$(document).ready(function() {
- $(":submit[@name=' . $submit . ']").attr("disabled", "disabled");
+ checkPassword($(":input[@name=' . $prompt . ']").get(0));
});
//]]></script>
<div>
</tr>
<tr>
<td class="titre">
- Nouveau mot de passe :
+ Mot de passe :
</td>
<td>
<input type="password" size="10" maxlength="10" name="nouveau" />