Jump to content

Custom status for domains


Leapje

Recommended Posts

Hi,

 

Is it possible to add custom statusses for the domains.

For example quarantaine?

 

The reason for this is that with .nl domains getting the status quarantaine seems to be impossible so I like to be able to set it in my custom registrar module...

 

I'm able to add the status to the database, only WHMCS doesn't pick it up that way.

 

Anybody any ideas?

Link to comment
Share on other sites

I've got it...

It not exactly the cleanest option, however it does the trick!

 

1. In the database change the values for the status field in the domains table and add the value you want (only one is possible with my code).

 

2. In the header.tpl for the active admin template I've added the following javascript code:

<script>

if (window.location.pathname == '/sales/admin/clientsdomains.php') {

var selObj = $('select[name=status]');

var optObj = $('<option>').attr('value', 'Quarantaine').text('Quarantaine');

if (selObj.find('option[selected]').length <= 0)

selObj.append(optObj.attr('selected', true));

else

selObj.append(optObj);

}

</script>

You can change Quarantaine to the value you need/want.

We got a custom template which includes a js file, in the tpl file you might need to escape some characters.

 

3. In the active client template add the following javascript to clientareadomains.tpl:

 

<script>

$('span.quarantaine').text('Quarantaine');

</script>

 

Again, change quarantaine to the value you need/want.

 

You now have a custom domain status.

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