maintenance_dash.prototype.new_maintenance = function () {
  var tenant_id = this.id; /* This tenant ID is used by AJAX saves */
  var user_id = this.user_id; /* This User ID is used by AJAX saves */

    // Add new tenant
    $('#newTenant')
            .form({
              inline: true,
              on: 'blur',
              onSuccess: function () {
                debug_print('#newTenant Form Passed Validation');

                // do what you like with the input
                $input = $('<input type="hidden" name="user_id"/>').val(user_id);
                $tenantInput = $('<input type="hidden" name="tenant_id"/>').val(tenant_id);
                // append to the form
                $('#newTenant').append($input);
                $('#newTenant').append($tenantInput);

                $.ajax({
                  beforeSend: saving_toast,
                  url: 'app/tenants/save-tenant.php',
                  type: 'GET',
                  data: $(this).serialize(),
                  success: function (response, status, xhr) {
                    if (!has_error(response, xhr)) {
                      saved_toast('tenant');
                      /* Go straight to the new profile */
                      router.navigate(response);
                    } // END if !ERROR
                  }

                });
                return false;
              },
              fields: {
                first_name: {
                  identifier: 'first_name',
                  rules: [
                    {
                      type: 'empty',
                      prompt: 'Please enter the tenants first name'
                    }
                  ]
                },
                last_name: {
                  identifier: 'last_name',
                  rules: [
                    {
                      type: 'empty',
                      prompt: 'Please enter the tenants last name'
                    }
                  ]
                },
                mainPhone: {
                  identifier: 'mainPhone',
                  rules: [
                    {
                      type: 'empty',
                      prompt: 'Please enter the main phone number'
                    }
                  ]
                }

              }
            });
  
};