Jump to content

Return Custom Button Value


dotnetrix

Recommended Posts

I have an issue, not sure if this is a WHMCS bug:

 

I have a custom Registrar module developed by ourselves. One of the Registrar functions is:

 

function rar_ApproveTransfer($params) with Error value like this in the actual registrar module:
$values["error"] = 'Cannot approve transfer now';
return $values;

 

The approve button is available to admins:

 

function rar_AdminCustomButtonArray() {
 $buttonarray = array(
     "Approve Transfer" => "ApproveTransfer",
     );
     return $buttonarray;
}

 

as well as to our clients in the client area:

 

function rar_ClientAreaCustomButtonArray() {
 $buttonarray = array(
     "Approve Transfer" => "ApproveTransfer",
     );
     return $buttonarray;
}

 

The problem I am facing is that if an admin clicks on the button it will correctly return:

 

"Cannot approve transfer now".

 

but if a client clicks on the button via domains -> domain details -> management drop down it just does not return any success or error, despite there being:

 

{elseif $registrarcustombuttonresult=="success"}
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times</button>
   <p>{$LANG.moduleactionsuccess}</p>
</div>
{elseif $registrarcustombuttonresult}
<div class="alert alert-danger">
   <p><strong>{$LANG.moduleactionfailed}:</strong> {$registrarcustombuttonresult}</p>
</div>

 

Any input appreciated.

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