anchor.diff:  
       <% b.add_tab('Contact') do %>
   
  -      <div class="field">
  +      <div id="email_div" class="field">
           <div><%= f.label :email %></div>
           <span><%= f.text_field :email, :maxlength => 255 %></span>
           <span class="field_info"></span>
  
positive.code:   var last_name = $("#employee_last_name");
    var user_name = $("#employee_user_name");
    var email = $("#employee_email");
    var update_leave_balance_link = $("#update_leave_balance");
    
    first_name.change(function() {
  
negative.code:     update_leave_balance_link.attr('href', '<%= employee_balance_path(:tenant => current_account.subdomain, :id => @employee.to_param) %>&as_at=' + date);
      update_leave_balance_link.click();
    }
    
    function update_email_required() {
      if (notify.is(':checked'))
        $('#email_div').addClass('required');
      else
        $('#email_div').removeClass('required');
    }
  
    update_leave_balance_link.click();
    update_email_required();
    
  </script>
  
  