anchor.diff:      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();
     }
  -
  -  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>
   
  
positive.code:     }
    });
    
    function update_user_name() {
      if (first_name.val() && last_name.val() && user_name.val() == "") {
        user_name.val(to_name(first_name.val()) + "." + to_name(last_name.val()));  
  
negative.code:   var last_name = $("#employee_last_name");
    var user_name = $("#employee_user_name");
    var email = $("#employee_email");
    var notify = $('#employee_notify');
    var update_leave_balance_link = $("#update_leave_balance");
    
    first_name.change(function() {
  