flangefrog Posted September 8, 2014 Report Posted September 8, 2014 How do you transfer a domain when adding it through the admin panel? The domain modules all have the functionality built in but I can't figure out how to use it. Quote
0 Blesta Addons Posted September 8, 2014 Report Posted September 8, 2014 the action for admin is addService , with a quick search in the logicbox module i found this under getAdminAddFields() // Handle transfer request if (isset($vars->transfer) || isset($vars->{'auth-code'})) { return $this->arrayToModuleFields(Configure::get("Logicboxes.transfer_fields"), null, $vars); } that mean that the transfer will done if you provide the 'auth-code' and selecting the transfer button . but as i see in the reurned modulefields no option for transfer is just $module_fields = $this->arrayToModuleFields(array_merge(Configure::get("Logicboxes.domain_fields"), Configure::get("Logicboxes.nameserver_fields")), null, $vars); so try change it to : $module_fields = $this->arrayToModuleFields(array_merge(Configure::get("Logicboxes.domain_fields"), Configure::get("Logicboxes.transfer_fields") , Configure::get("Logicboxes.nameserver_fields")), null, $vars); is not tested but it can give you the road to go .you can also see the code in getClientAddFields() . NOTE : if you use another registrar module you can search for a semilar workaround . Michael 1 Quote
0 Michael Posted September 9, 2014 Report Posted September 9, 2014 the action for admin is addService , with a quick search in the logicbox module i found this under getAdminAddFields() // Handle transfer request if (isset($vars->transfer) || isset($vars->{'auth-code'})) { return $this->arrayToModuleFields(Configure::get("Logicboxes.transfer_fields"), null, $vars); } that mean that the transfer will done if you provide the 'auth-code' and selecting the transfer button . but as i see in the reurned modulefields no option for transfer is just $module_fields = $this->arrayToModuleFields(array_merge(Configure::get("Logicboxes.domain_fields"), Configure::get("Logicboxes.nameserver_fields")), null, $vars); so try change it to : $module_fields = $this->arrayToModuleFields(array_merge(Configure::get("Logicboxes.domain_fields"), Configure::get("Logicboxes.transfer_fields") , Configure::get("Logicboxes.nameserver_fields")), null, $vars); is not tested but it can give you the road to go .you can also see the code in getClientAddFields() . NOTE : if you use another registrar module you can search for a semilar workaround . Is this in your Reloaded module mate? Quote
0 flangefrog Posted September 9, 2014 Author Report Posted September 9, 2014 Thanks for your reply naja7host. I had though I was missing something but maybe Blesta devs were/are planning to use it but it's unfinished. I'll put both the whois fields and transfer fields on the admin page and have an option whether to use the whois fields. Quote
0 Blesta Addons Posted September 9, 2014 Report Posted September 9, 2014 Is this in your Reloaded module mate? No , i have stopped publishing released for the reloaded module until v3.3 or maybe until the new domain module ; Thanks for your reply naja7host. I had though I was missing something but maybe Blesta devs were/are planning to use it but it's unfinished. I'll put both the whois fields and transfer fields on the admin page and have an option whether to use the whois fields. i get some free time to make a search in this , as we also need it , i have arrived to a working solution , now in the admin area you can select register or transfer , then the auth-code box will appear ,the tweak is the fallowing , change the getAdminAddFields function with this one public function getAdminAddFields($package, $vars=null) { // Handle universal domain name if (isset($vars->domain)) $vars->{'domain-name'} = $vars->domain; if ($package->meta->type == "domain") { // Set default name servers if (!isset($vars->ns1) && isset($package->meta->ns)) { $i=1; foreach ($package->meta->ns as $ns) { $vars->{"ns" . $i++} = $ns; } } // Handle transfer request if (isset($vars->transfer) || isset($vars->{'auth-code'})) { return $this->arrayToModuleFields(Configure::get("Logicboxes.transfer_fields"), null, $vars); } // Handle domain registration else { $fields = array( 'transfer' => array( 'label' => "Domain Action", 'type' => "radio", 'value' => "1", 'options' => array( '1' => "Register", '2' => "Transfer", ) ), 'domain-name' => array( 'label' => Language::_("Logicboxes.transfer.domain-name", true), 'type' => "text" ), 'auth-code' => array( 'label' => Language::_("Logicboxes.transfer.auth-code", true), 'type' => "text" ) ); $module_fields = $this->arrayToModuleFields(array_merge($fields, Configure::get("Logicboxes.nameserver_fields")), null, $vars); if (isset($vars->{'domain-name'})) { $tld = $this->getTld($vars->{'domain-name'}); if ($tld) { $extension_fields = array_merge((array)Configure::get("Logicboxes.domain_fields" . $tld), (array)Configure::get("Logicboxes.contact_fields" . $tld)); if ($extension_fields) $module_fields = $this->arrayToModuleFields($extension_fields, $module_fields, $vars); } } $module_fields->setHtml(" <script type=\"text/javascript\"> $(document).ready(function() { // Set whether to show or hide the ACL option $('#auth-code_id').closest('li').hide(); if ($('input[name=\"transfer\"]:checked').val() == '2') $('#auth-code_id').closest('li').show(); $('input[name=\"transfer\"]').change(function() { if ($(this).val() == '2') $('#auth-code_id').closest('li').show(); else $('#auth-code_id').closest('li').hide(); }); }); </script> "); return $module_fields; } } else { return new ModuleFields(); } } is the same almost for all other registrar modules , just change the language to your own use . PauloV and Michael 2 Quote
0 PauloV Posted October 13, 2014 Report Posted October 13, 2014 We need this in core modules. +++++1 Quote
0 AdamDG Posted April 25, 2015 Report Posted April 25, 2015 Any updates on this? This seems like an essential function for any sort of hosting management system... Quote
Question
flangefrog
How do you transfer a domain when adding it through the admin panel? The domain modules all have the functionality built in but I can't figure out how to use it.
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.