From b10a6196355df655800859adea8760a662b288a5 Mon Sep 17 00:00:00 2001 From: olgasmola Date: Fri, 27 Jul 2012 15:36:58 +0300 Subject: [PATCH] CS-15518: Fix password field garbling on login screen. --- ui/scripts/ui-custom/login.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ui/scripts/ui-custom/login.js b/ui/scripts/ui-custom/login.js index 72b3c6c728a..20e6abff2b2 100644 --- a/ui/scripts/ui-custom/login.js +++ b/ui/scripts/ui-custom/login.js @@ -38,6 +38,17 @@ $login.appendTo('html body'); $('html body').addClass('login'); + // Remove label if field was auto filled + $.each($form.find('label'), function() { + var $label = $(this); + var $input = $form.find('input').filter(function() { + return $(this).attr('name') == $label.attr('for'); + }); + if ($input.val()) { + $label.hide(); + } + }); + // Form validation $form.validate();