     return # Make sure CoffeeScript does not return anything
 
   'blur input#new-password': (event, template) ->
-    PASSWORD_READY_FOR_VALIDATION = true
+    passwordReadyForValidation = true
     newPassword = $('#new-password').val()
     validatePassword newPassword, "new-password"
 
     return # Make sure CoffeeScript does not return anything
 
   'focus input#new-password-confirmation': (event, template) ->
-    PASSWORD_CONFIRMATION_READY_FOR_VALIDATION = true
+    passwordConfirmationReadyForValidation = true
 
     return # Make sure CoffeeScript does not return anything
 

# Password settings
Template.settingsPassword.events =
  'click button.change-password': (event, template) ->
    PASSWORD_READY_FOR_VALIDATION = true
    PASSWORD_CONFIRMATION_READY_FOR_VALIDATION = true
    passwordFormMessages.resetMessages()
    event.preventDefault()
    currentPassword = $('#current-password').val()

    passwordFormMessages.setError error

validatePasswordConfirmation = (newPassword, newPasswordConfirmation, messageField) ->
  return unless passwordConfirmationReadyForValidation
  if newPassword isnt newPasswordConfirmation
    error = new FormError 400, "Passwords do not match.", messageField
    passwordFormMessages.setError error
