       data: { phone_verification_pin: $("#phone_verification_pin").val() },
       url: "/phone_numbers/verify",
       dataType: "JSON",
-      success: (response) ->
+      beforeSend: ->
+        disablePin()
+      success: (response) ->
+        enablePin()
         $("#phone-number-input").html(response.html_content)
-        $('#phone-number-verification').toggle()
-        $('#phone-number-input').toggle()
+        $('#phone-number-verification').toggle('slide')
+        $('#phone-number-input').toggle('slide')
         showSuccessMessage("Thank you! Your phone number is now verified")
       error: (xhr, status, error) ->
+        enablePin()
+        $("#phone_verification_pin").val('')
+        $('#phone_verification_pin').focus()
         showErrorMessages xhr.responseJSON.error
 
   $(document).on "click", "#add-funds-button", (e) ->

  
  $('#phone-number-verification').hide()
  
  $(document).on "click", "#verify-phone-button", (e) ->
    e.preventDefault()
    $.ajax

      data: { phone_number: $("#user_phone_number").val() },
      url: "/phone_numbers",
      dataType: "JSON",
      beforeSend: ->
        disablePhone()
      success: (response) ->
        enablePhone()
        $('#phone-number-input').toggle('slide')
        $('#phone-number-verification').toggle('slide')
        $('#phone_verification_pin').focus()
        showSuccessMessage("PIN has been sent to your phone number for verification")
      error: (xhr, status, error) ->
        enablePhone()
        showErrorMessages xhr.responseJSON.error
  
  $(document).on "click", "#retry-phone-pin", (e) ->
    e.preventDefault()
    $('#phone-number-verification').toggle('slide')
    $('#phone-number-input').toggle('slide')
  
  $(document).on "click", "#resend-phone-pin", (e) ->
    e.preventDefault()
