Submit form data to ldap

Submit form data to ldap

I'm trying to post back some form fields back to our ldap connector. I can get both groups and members from within each group, but I'm not getting any response when I try to post back a user.
To clarify the steps a bit 

1) The user clicks 'Load Groups'. That talks to our LDAP connector. That then populates all of our companies ldap croups. 
2) When a user clicks the group, it loads all the users for that group.
3) I have button that when clicked opens the modal where a form lives.
4) I'm sure i'm missing something super simple. 

  1. //Display groups
  2. $(function displayGroupItems() {
  3.     $('#ldap-tab').click(function(event) {
  4.         $.ajax({
  5.             url: 'ldap/groups',
  6.             method: 'GET',
  7.             dataType: 'json',
  8.             success: function(data) {
  9.                 $.each(data.groups, function(i, dn) {
  10.                     output = $('<li><a id="groupsList" class="panel-block dn-class">' + dn.dn + '</a></li>');
  11.                     append = $(output).appendTo('#groupSearchUl');
  12.                 });
  13.             }
  14.         })
  15.     });
  16. });


  17. //Display members of the selected group
  18. $(function displayMemberItems() {
  19.     var textclass;

  20.     $(document).on('click', '.dn-class', function(event) {
  21.         textclass = $(this).text().replace(/=/g, '%3D').replace(/,/g, '%2C');
  22.         $.ajax({
  23.             url: 'ldap/members/' + textclass,
  24.             method: 'GET',
  25.             dataType: 'json',
  26.             success: function(pull) {
  27.                 users = $('#userSearchUl').html(
  28.                     pull.members.map(function(uid) {
  29.                         return '<li><a class="panel-block" id="userList">' + uid.split(',')[0] + '</a></li>'
  30.                     }).join("")
  31.                 );
  32.             }

  33.         })
  34.     });
  35. });

  36. //TROUBLE AREA//
  37. //LDAP Form Add
  38. $(function addMember() {
  39.     var textclass;
  40.     var username = $('#addUID').val();
  41.     $('.dn-class').on('click', function(event) {
  42.     textclass = $(this).text().replace(/=/g, '%3D').replace(/,/g, '%2C');
  43.     });
  44.     $("#userSubmit").on('submit', '#addUserForm', function(event) {
  45.         $.post("/ldap/members/" + textclass + '/' + username)
  46.             // var textclass;
  47.             // $(document).on('click', '.dn-class', function(dn) {
  48.             //     textclass = $(this).text().replace(/=/g, '%3D').replace(/,/g, '%2C');
  49.             // });
  50.             // $.ajax({
  51.             //     url: '/ldap/members/,
  52.             //     method: 'POST',
  53.             //     dataType: 'json',
  54.             //     success: function(pull) {
  55.             //                 alert('User added!')
  56.             //     }
  57.             // })
  58.     });
  59. });

  60. //LDAP Form Remove
  61. $(function addMember() {
  62.     $(document).on('submit', '#addUserForm', function(event) {
  63.         $.ajax({
  64.             url: 'ldap/members/delete' + textclass,
  65.             method: 'DELETE',
  66.             dataType: 'json',
  67.             success: function(pull) {
  68.                 alert('User added!')
  69.             }
  70.         })
  71.     });
  72. });
The html for form lives in a modal. 
  1.   <div class="modal" id="modal-add">
  2.     <div class="modal-background"></div>
  3.     <div class="modal-card">
  4.       <header class="modal-card-head">
  5.         <p class="modal-card-title">Add Member</p>
  6.         <button class="delete" aria-label="close"></button>
  7.       </header>
  8.       <section class="modal-card-body">
  9.         <form id="addUserForm" class="form-horizontal well field has-addons" data-async data-target="#add-modal">
  10.           <p class="control">
  11.             <a class="button is-static" >
  12.               uid=
  13.             </a>
  14.           </p>
  15.           <div class="control">
  16.             <input id="addUID" type="text" class="input"></input>
  17.           </div>
  18.         </form>
  19.       </section>
  20.       <footer class="modal-card-foot">
  21.         <button type="button" class="button is-warning cancel" data-dismiss="modal">Cancel</button>
  22.         <button type="submit" id="userSubmit" class="button is-info">Add</button>
  23.       </footer>
  24.     </div>
  25.   </div>
Thanks everyone.