Jump to content

Custom client function in registrar module


nasos75

Recommended Posts

I want to add some custom functions in my registrar module.

Let's say that I want to create a function that will change the epp code of a domain.

I have this in my module:

function mymod_ClientAreaCustomButtonArray()
{
    return array(
        "Change EPP Code" => "eppcodechange"
    );
}

function mymod_eppcodechange($params)
{
    $domainid = $params['domainid'];
    return array(
        'templatefile' => 'eppcodechange',
        'breadcrumb' => array(
            'clientarea.php?action=domaindetails&domainid='.$domainid.'&modop=custom&a=eppcodechange' => 'EPP Code Change',
        ),
        'vars' => array(
            'domainId' => $domainid
        ),
    );
}

which works fine, and I see the form in client area. The eppcodechange.tpl is like this:

<form class="form-inline" action="clientarea.php">
    <input type="hidden" name="action" value="domaindetails">
    <input type="hidden" name="id" value="{$domainId}">
    <input type="hidden" name="modop" value="custom">
    <input type="hidden" name="a" value="doeppcodechange">
    <div class="form-group mx-sm-3 mb-2">
        <input type="text" class="form-control" id="newEPPCode" placeholder="New EPP Code">
    </div>
    <button type="submit" class="btn btn-primary mb-2">Confirm</button>
</form>

What next? I tried to create a 'mod_doeppcodechange' function in the registrar module, but this was not the case. How do I process the request when the user presses the submit button?

Edited by nasos75
Link to comment
Share on other sites

  • 3 years later...

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