Jump to content

WHMCS v6.3.1 -> Admin -> Client Profile -> Products/Services Tab (cPanel) -> Submitting with "Enter"


MikeDVB

Recommended Posts

I updated our WHMCS to v6.3.1 not too long ago and identified an annoying bug when it came to modifying a client product when the service is cPanel based.

 

The long and short of it is that if you hit "Enter" in any of the fields to submit the form rather than hitting the "Save" button at the bottom it would attempt to sign you into the cPanel of the account rather than saving the form. In some cases the changes were lost and in other times it was just lost productivity due to ending up in a cPanel when you don't need to.

 

The fix is as simple as inserting the following code:

function getCurrentFileName(){
   var pagePathName= window.location.pathname;
   return pagePathName.substring(pagePathName.lastIndexOf("/") + 1);
}
if (getCurrentFileName() == "clientsservices.php") {
   $('[name="username"]').next().attr('type', 'button');
}

 

You will insert the code into the "/whmcs/admin/templates/v4/footer.tpl" and the "/whmcs/admin/templates/blend/footer.tpl" files just before the </body> tag.

 

For more details on the bug and the fix you can see them at http://blog.mddhosting.com/2016/07/running-whmcs-v6-3-simple-fix-may-save-time/

 

Due to a lack of full templating for the administration area of WHMCS I was forced to use JavaScript to make the necessary change until WHMCS is able to patch this small change into their software.

 

If you run into any issues or make any modifications do please let me know so I can update the post.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated