initial commit of file from CVS for smeserver-ddclient on Sat Sep 7 19:50:30 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 19:50:30 +10:00
parent 7f083df042
commit c528ca1823
65 changed files with 12379 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
[Service]
ExecStart=
ExecStart=/usr/sbin/ddclient -file /etc/ddclient/ddclient.conf -debug -verbose -quiet -syslog

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,158 @@
package SrvMngr::I18N::Modules::Ddclient::en;
use strict;
use warnings;
use utf8;
use Mojo::Base 'SrvMngr::I18N';
use SrvMngr::I18N::Modules::General::en;
my %lexicon = (
'FORM_TITLE' => 'Create, remove or change the publication of virtual domains',
'Params_for_IP_Retrieval'=>' Parameters to control how the IP of your server is found:',
'DESCRIPTION'=> 'Use this contrib when you have a sme server connected to a ISP service using a dynamic IP, and you wish to host multiple domains.
<br>ddclient is a client for updating dynamic DNS entries for domains hosted at different DNS providers.
<br>Configure your dynamic host domains via the ddclient server manager panel.
<br>ddclient can be used on servers configured in server gateway mode or in server only mode.<br>
SmeServer documentation:<a href="https://wiki.contribs.org/Ddclient">https://wiki.contribs.org/Ddclient</a>',
'FORM_DESCRIPTION' => 'Virtual Domains for publication on the net:',
'NO_VIRTUAL_DOMAINS' => 'There are no virtual domains in the system.',
'CURRENT_LIST_OF_DOMAINS' => 'Current list of virtual domains',
'PUBLICATION' => 'Publication',
'PRIMARY_SITE' => 'Primary Site',
'CONTENT' => '[_1] i-bay',
'CREATE_TITLE' => 'Create a new publication virtual domain',
'SERVERS_LABEL' => 'Where to publish',
'MX' => 'record MX',
'NAME_LABEL' => 'Login to publish',
'PASSWORD_LABEL' => 'Password to publish',
'CONTENT_FIELD_DESCRIPTION' => 'For the web site, you may choose your primary web site or any i-bay as the content.',
'DOMAIN_NAME_VALIDATION_ERROR' => 'Error: unexpected or missing characters in domain name [_1]. The domain name should contain one or more letters, numbers, periods and minus signs. Did not create new domain.',
'DOMAIN_DESCRIPTION_VALIDATION_ERROR' => 'Error: unexpected or missing characters in domain description [_1]. Did not create new domain.',
'DOMAIN_IN_USE_ERROR' => 'Error: domain [_1] is already in use. Did not create new domain.',
'DOMAIN_LOGIN_VALIDATION_ERROR'=> 'Domain login must not be blank and only consist of letter, numbers, "." or "@"',
'RESERVED_SECURE_DOMAIN_ERROR' => 'Error: domain [_1] is reserved to provide a secured webserver for the virtual domain [_2]. Did not create new domain.',
'SYSTEM_DOMAIN_ERROR' => 'Error: domain [_1] is your system domain name. You cannot have a virtual domain with the same name. Did not create new domain.',
'RESERVED_SECURE_SYSTEM_DOMAIN_ERROR' => 'Error: domain [_1] is reserved to provide a secured webserver for your system domain name [_2]. Did not create new domain.',
'SUCCESSFULLY_CREATED' => 'Successfully publication domain [_1] on [_2].',
'MODIFY_TITLE' => 'Modify virtual domain',
'NONEXISTENT_DOMAIN_ERROR' => 'Error: [_1] is not an existing domain.',
'SUCCESSFULLY_MODIFIED' => 'Successfully modified the publication [_1] on [_2].',
'REMOVE_TITLE' => 'Remove publication of virtual domain',
'REMOVE_DESCRIPTION' => '<p>You are about to remove the publication of domain [_1] ([_2]) on [_3].
</p>
<p>
<b>Are you sure you wish to remove this domain\'s publication ?</b>
</p>
',
'ERROR_WHILE_REMOVING_DOMAIN' => 'Error: internal failure while removing publication of [_1].',
'SUCCESSFULLY_DELETED' => 'Successfully deleted publication of [_1] on [_2].',
# Service descriptions
'DYNDNS1' => 'dyndns.org dynamic addresses',
'DYNDNS2' => 'dyndns.org static addresses',
'DYNDNS3' => 'dyndns.org custom addresses',
'ZONEDIT' => 'ZoneEdit (zoneedit.com)',
'EASYDNS' => 'EasyDNS (easydns.com)',
'HAMMER' => 'Hammernode (hn.org) dynamic addresses',
'DSLREPORTS' => 'dslreports.com dynamic-host monitoring',
'EURODYNDNS' => 'eurodyndns.org dynamic addresses',
'DTDNS' => 'DtDNS (www.dtdns.com) dynamic addresses',
'LOOPIA' => 'Loopia (loopia.se) dynamic addresses',
'DNSPARK' => ' Dnspark (dnspark.com) dynamic addresses',
'DYNHOST' => ' DynHost (ovh.com) dynamic addresses',
'NOIP' => ' NoIP (noip.com) dynamic addresses',
'CHANGEIP' => ' ChangeIP (changeip.com) dynamic addresses',
'NAMECHEAP' => ' NAMECHEAP (namecheap.com) dynamic addresses',
'SPDNS' => ' SPDNS (spdns.de) dynamic addresses',
'SITELUTIONS'=>'SITELUTIONS sitelutions.com dynamic addresses',
'FREEDNS'=>'FREEDNS freedns.afraid.org for details',
'NSUPDATE'=>'NSUPDATE See nsupdate(1) and ddns-confgen(8) for details ',
'CLOUDFLARE'=>'CLOUDFLARE www.cloudflare.com/ for details',
'GOOGLEDOMAINS'=>'GOOGLEDOMAINS www.google.com/domains for details',
'DUCKDNS'=>'DUCKDNS duckdns.org for details',
'FREEMYIP'=>'FREEMYIP freemyip.com for details',
'WOIMA'=>'WOIMA woima.fi for details',
'YANDEX'=>'YANDEX domain.yandex.com for details',
'DNSMADEEASY'=>'DNSMADEEASY dnsmadeeasy.com for details',
'DONDOMINIO'=>'DONDOMINIO www.dondominio.com for details',
'NEARLYFREESPEECH'=>'NFSN www.nearlyfreespeech.net/services/dns for details',
'OVH'=>'OVH www.ovh.com for details',
'CLOUDNS'=>'CLOUDNS www.cloudns.net',
# End of Service descriptions
# v3.11.x Service descriptions:
"1984" => "1984-https://kb.1984hosting.com/doku.php?id=freedns",
"changeip" => "changeip-https://changeip.com",
"cloudflare" => "cloudflare-https://cloudflare.com",
"cloudns" => "cloudns-https://cloudns.com",
"digitalocean" => "digitalocean-https://digitalocean.com",
"dinahosting" => "dinahosting-https://dinahosting.com",
"dnsexit" => "dnsexit-https://dnsexit.com/",
"dnsmadeeasy" => "dnsmadeeasy-https://dnsmadeeasy.com",
"domeneshop" => "domeneshop-https://domeneshop.com",
"dondominio" => "dondominio-https://dondominio.com",
"dslreports" => "dslreports-https://www.dslreports.com/",
"duckdns" => "duckdns-https://duckdns.com",
"dyndns1" => "dyndns1-https://account.dyn.com/",
"dyndns2" => "dyndns2-https://account.dyn.com/",
"easydns" => "easydns-https://easydns.com",
"enom" => "enom-https://enom.com",
"freedns" => "freedns-http://freedns.com",
"freemyip" => "freemyip-https://freemyip.com",
"gandi" => "gandi-https://gandi.com",
"godaddy" => "godaddy-https://godaddy.com",
"googledomains" => "googledomains-https://googledomains.com",
"hetzner" => "hetzner-https://hetzner.com",
"infomaniak" => "infomaniak-https://infomaniak.com",
"keysystems" => "keysystems-https://keysystems.com",
"mythicdyn" => "mythicdyn-https://www.mythic-beasts.com/support/api/dnsv2/dynamic-dns",
"namecheap" => "namecheap-https://namecheap.com",
"nfsn" => "nfsn-http://nfsn.com",
"njalla" => "njalla-https://njalla.com",
"noip" => "noip-https://noip.com",
"nsupdate" => "nsupdate-http://nsupdate.com",
"ovh" => "ovh-https://ovh.com",
"porkbun" => "porkbun-https://porkbun.com",
"regfishde" => "regfishde-regfishde",
"sitelutions" => "sitelutions-https://sitelutions.com",
"woima" => "woima-http://woima.com",
"yandex" => "yandex-https://yandex.com",
"zoneedit" => "zoneedit-https://www.zoneedit.com/dynamic-dns/",
# end of v3.11.x Service descriptions:
'MODIFY_DESCRIPTION' => "You can modify the Dynamic DNS Service that you use and change the username and password",
'CREATE_DESCRIPTION' => "You can create a domain to use for the Dynamic DNS Service that you use and set or change the username and password",
'CUSTOMDNS' => 'Custom Dynamic DNS Provider',
'CUSTOMDNS_LABEL' => 'Custom server Address',
'CUSTOM_PROTOCOL_LABEL' => 'Custom ddclient Protocol',
'CUSTOM_DESCRIPTION' => 'You can use a custom dynamic dns provider if yours is not in the published list. Please fill the custom fields with the appropriate settings',
'CUSTOMDNS_VALIDATION_ERROR' => 'Error: unexpected or missing characters in custom server address field of domain [_1]. The server address should contain one or more letters, numbers, periods and minus signs. Did not apply the change.',
'ddclient' =>'Dynamic Clients',
'DOMAIN_NAME_ALREADY_EXIST' => 'Error: this domain:"[_1]" already exists. Please chose another.',
'FREE_FORM_DESCRIPTION' => 'Here you can create any domain name to publish over the net:',
'RETRIEVE_SSL' => 'SSL update',
'RETRIEVE_DEAMONUPDATE' => 'Deamon update (seconds)',
'RETRIEVE_URLCHECKIP' => 'Url for the external IP',
'APPLY' => 'Save',
'DOMAIN_NAME_LABEL' => 'Domain Name',
'DESCRIPTION_LABEL' => 'Domain description',
'SUCCESSFULLY_MODIFIED_RETRIEVE_IP' => 'You have successfully modified the retrieve IP options.',
'RETRIEVE_METHOD' => 'Method to retrieve new IP:',
'RETRIEVE_IF' => 'Local interface to get new IP',
'RETRIEVE_CMD' => 'Command to execute to get IP',
'SME external Interface' => 'SME external interface',
'SME configuration DB' => 'SME configuration DB',
'web' => 'Web query',
'Interface' => 'IP from interface',
'IP' => 'Manual IP setting',
'Command' => 'Command to execute',
'RETRIEVE_IP' => 'IP to manually force'
);
our %Lexicon = (
%{ SrvMngr::I18N::Modules::General::en::Lexicon },
%lexicon
);
1;

View File

@@ -0,0 +1,48 @@
% layout 'default', title => "Sme server 2 - Dynamic Clients", share_dir => './';
% content_for 'module' => begin
<div id="module" class="module ddclient-panel">
% if ($config->{debug} == 1) {
<p>
%= dumper $c->current_route
</p>
% }
<h1><%=$title%></h1>
%= $modul
%if ($ddc_datas->{first}) {
<br><p>
%=$c->render_to_string(inline =>$c->l($ddc_datas->{first}))
</p>
%} elsif ($ddc_datas->{success}) {
<div class='sme-border'>
<h2> Operation Status Report</h2><p>
%= $c->l($ddc_datas->{success});
</p>
</div>
%} elsif ($ddc_datas->{error}) {
<div class='sme-error'>
<h2> Operation Status Report - error</h2><p>
%= $c->l($ddc_datas->{error});
</p>
</div>
%}
% if ($ddc_datas->{trt} eq 'NEW') {
%= include 'partials/_ddc_create_cust'
%} elsif ($ddc_datas->{trt} eq 'DEL') {
%= include 'partials/_ddc_del'
%} elsif ($ddc_datas->{trt} eq 'MOD') {
%= include 'partials/_ddc_modify_domain'
%} else { #LIST
%= include 'partials/_ddc_paramlist'
%= include 'partials/_ddc_domainlist'
%= include 'partials/_ddc_customlist'
%}
</div>
%end

View File

@@ -0,0 +1,65 @@
<div id='createcustom'>
<h2>
%= l 'CREATE_DESCRIPTION'
</h2><br>
% my $btn = l('APPLY');
%= form_for '/ddclient7' => (method => 'POST') => begin
<span class=label>
%=l 'DOMAIN_NAME_LABEL'
</span><span class=data>
%=text_field 'domainName'
</span><br>
<span class=label>
%=l 'DESCRIPTION_LABEL'
</span><span class=data>
%=text_field 'desc'
</span><br>
<span class=label>
%=l 'SERVERS_LABEL'
</span><span class=data>
%=select_field dns=>$dnslabels
</span><br>
<!--
<span class=label>
%=l 'CUSTOMDNS_LABEL'
</span><span class=data>
%=text_field 'customdns'
</span><br>
<span class=label>
%=l 'CUSTOM_PROTOCOL_LABEL'
</span><span class=data>
%=text_field 'customprotocol'
</span><br>
-->
<span class=label>
%=l 'NAME_LABEL'
</span><span class=data>
%=text_field 'login'
</span><br>
<span class=label>
%=l 'PASSWORD_LABEL'
</span><span class=data>
%=password_field 'password',id=>"ddcPass"
%=label_for show=>"Show"
%=check_box show=>1,onclick=>"showPass()",style=>"vertical-align:middle;"
%= javascript begin
function showPass() {
var x = document.getElementById("ddcPass");
if (x.type === "password") {
x.type = "text";
} else {
x.type = "password";
}
}
% end
</span><br>
<span class=label>
%=l 'MX'
</span><span class=data>
%=text_field 'mx'
</span><br>
%= submit_button "$btn", class => 'action'
% end
</div>

View File

@@ -0,0 +1,50 @@
<div id='customlist'>
<h2>
%= l 'FREE_FORM_DESCRIPTION'
</h2>
%= form_for '/ddclient' => (method => 'POST') => begin
<table class="sme-border"><tbody>
<tr>
<th class='sme-border'>
%=l 'DOMAIN_NAME_LABEL'
</th>
<th class='sme-border'>
%=l 'DESCRIPTION_LABEL'
</th>
<th class='sme-border'>
%=l 'PUBLICATION'
</th>
<th class='sme-border' colspan=2>
%=l 'ACTION'
</th>
</tr>
%if (!$emptycust){
% foreach my $freeDomain (@$freedomains) {
<tr>
%= t td => (class => 'sme-border') => $freeDomain->{"Domain"}
%= t td => (class => 'sme-border') => $freeDomain->{"Description"}
%= t td => (class => 'sme-border') => $freeDomain->{"Publication"}
<td class = 'sme-border'>
<a href='/smanager/ddclient2?trt=MOD&Domain=<%= $freeDomain->{"Domain"}%>'><%=l 'MODIFY'%></a>
</td><td class = 'sme-border'>
<a href='/smanager/ddclient2?trt=DEL&Domain=<%= $freeDomain->{"Domain"}%>'><%=l 'REMOVE'%></a>
</td>
</td>
</tr>
%}
%}
<tr><td class='sme-border'></td>
<td class='sme-border'></td>
<td class='sme-border'>&nbsp;</td>
<td class='sme-border'>&nbsp;</td>
<td class='sme-border'>
<a href="/smanager/ddclient6?trt=NEW"><%=l 'CREATE'%></a>
</td>
</tr>
</tbody>
</table>
% end
</div>

View File

@@ -0,0 +1,14 @@
<div id='del'>
% my $btn = l('REMOVE');
%= form_for '/ddclient4' => (method => 'POST') => begin
<p>
%= $c->render_to_string(inline =>l("REMOVE_DESCRIPTION",$ddc_datas->{"Domain_details"}->{"Domain"},$ddc_datas->{"Domain_details"}->{"Description"},$c->l($ddc_datas->{"Domain_details"}->{"Publication"})))
</p>
% param Domain=>$ddc_datas->{"Domain_details"}->{"Domain"};
%= hidden_field Domain=>$ddc_datas->{"Domain_details"}->{"Domain"}
%= hidden_field Route=>$c->current_route
%= hidden_field dns=>$ddc_datas->{"Domain_details"}->{"dns"}
%= hidden_field trt=>"DEL"
%= submit_button "$btn", class => 'action'
% end
</div>

View File

@@ -0,0 +1,52 @@
<div id='Domainslist'>
<h2>
%= l 'FORM_DESCRIPTION'
</h2>
%= form_for '/ddclient' => (method => 'POST') => begin
% if ($emptydom){
<br><h2>
%=l 'NO_VIRTUAL_DomainS'
<h2>
% } else {
<table class="sme-border"><thead>
<tr>
<th class='sme-border'>
%=l 'DOMAIN_NAME_LABEL'
</th>
<th class='sme-border'>
%=l 'DESCRIPTION_LABEL'
</th>
<th class='sme-border'>
%=l('CONTENT',"")
</th>
<th class='sme-border'>
%=l 'PUBLICATION'
</th>
<th class='sme-border' colspan=2>
%=l 'ACTION'
</th>
</tr>
</thead><tbody>
% foreach my $Domain (@$domains) {
<tr>
%= t td => (class => 'sme-border') => $Domain->{"Domain"}
%= t td => (class => 'sme-border') => $Domain->{"Description"}
%= t td => (class => 'sme-border') => $Domain->{"Content"}
%= t td => (class => 'sme-border') => $Domain->{"Publication"}
<td class = 'sme-border'>
<a href="/smanager/ddclient1?trt=MOD&Domain=<%= $Domain->{"Domain"}%>"><%=l 'MODIFY'%></a>
</td>
% if ($Domain->{"Publication"} ne ""){
<td class = 'sme-border'>
<a href="/smanager/ddclient1?trt=DEL&Domain=<%= $Domain->{"Domain"}%>"><%=l 'REMOVE'%></a>
</td>
% }
</tr>
%}
</tbody>
</table>
%}
% end
</div>

View File

@@ -0,0 +1,108 @@
<div id='modifydomain'>
<script>
window.onload = function() {
SelectInput();
};
</script>
<h2>
%= l 'MODIFY_DESCRIPTION'
</h2><br>
% my $btn = l('APPLY');
%= form_for '/ddclient8' => (method => 'POST') => begin
<span class=label>
%=l 'DOMAIN_NAME_LABEL'
</span><span class=data>
%= hidden_field domainName => $ddc_datas->{"Domain_details"}->{"Domain"}
%= $ddc_datas->{"Domain_details"}->{"Domain"}
</span><br><br>
<span class=label>
%=l 'DESCRIPTION_LABEL'
</span><span class=data>
%= $ddc_datas->{"Domain_details"}->{"Description"}
</span><br><br>
% if ($ddc_datas->{"Domain_details"}->{"Content"} ne ""){
<span class=label>
%= $ddc_datas->{"Domain_details"}->{"Content"}
</span><span class=data>
%= $ddc_datas->{"Domain_details"}->{"Content"}
</span><br><br>
% }
<span class=label>
%=l 'SERVERS_LABEL'
</span><span class=data>
% param dns=>$ddc_datas->{"Domain_details"}->{"dns"};
%=select_field dns=>$dnslabels,id=>"dns",onchange=>"SelectInput()",onload=>"SelectInput()"
%= javascript begin
function SelectInput() {
var method = document.querySelector("#dns");
const types=['custom'];
types.forEach((type)=>{
var service = document.querySelector(`.${type}`);
if (service != null) {
if (method.value == type) {
service.style.display = 'block';
} else {
service.style.display = 'none';
}
}
})
}
%end
</span><br>
%# Dependant on the custom choice from above
<div class=custom>
<span class=label custom>
%=l 'CUSTOMDNS_LABEL'
</span><span class=data custom>
% param customdns=>$ddc_datas->{"Domain_details"}->{"customdns"};
%=text_field 'customdns'
</span><br>
<span class=label custom>
%=l 'CUSTOM_PROTOCOL_LABEL'
</span><span class=data custom>
% param customprotocol=>$ddc_datas->{"Domain_details"}->{"customprotocol"};
%=text_field 'customprotocol'
</span><br>
</div>
<span class=label>
%=l 'NAME_LABEL'
</span><span class=data>
% param login=>$ddc_datas->{"Domain_details"}->{"login"};
%=text_field 'login'
</span><br>
<span class=label>
%=l 'PASSWORD_LABEL'
</span><span class=data>
% param password=>$ddc_datas->{"Domain_details"}->{"password"};
%=password_field 'password',id=>"ddcPass",value=>$ddc_datas->{"Domain_details"}->{"password"}
%=label_for show=>"Show"
%=check_box show=>1,onclick=>"showPass()",style=>"vertical-align:middle;"
%= javascript begin
function showPass() {
var x = document.getElementById("ddcPass");
if (x.type === "password") {
x.type = "text";
} else {
x.type = "password";
}
}
% end
</span><br>
<span class=label>
%=l 'MX'
</span><span class=data>
% param mx=>$ddc_datas->{"Domain_details"}->{"mx"};
%=text_field 'mx'
</span><br>
%= hidden_field trt=>"MOD"
%= hidden_field Route=>$c->current_route
%= submit_button "$btn", class => 'action'
% end
</div>

View File

@@ -0,0 +1,136 @@
<div id='paramlist'>
<script>
window.onload = function() {
SelectInput();
};
</script>
<h2>
%= l 'Params_for_IP_Retrieval'
</h2>
% my $btn = l('APPLY');
%= form_for '/ddclient3' => (method => 'POST') => begin
<span class=label>
%=l 'RETRIEVE_SSL'
</span><span class=data>
% param retrievessl=>$ddc_datas->{"params"}->{"ssl"} unless param 'retrievessl';
%=select_field retrievessl=>[['Yes'=>'yes'],['No'=>'no']]
</span><br>
<span class=label>
%=l 'RETRIEVE_DEAMONUPDATE'
</span><span class=data>
% param retrievedeamonupdate=>$ddc_datas->{"params"}->{"DeamonUpdate"};
%=number_field 'retrievedeamonupdate',min=>0
</span><br>
<span class=label>
%=l 'RETRIEVE_METHOD'
</span><span class=data>
% param retrievemethod=>$ddc_datas->{"params"}->{"method"} unless param 'retrievemethod';
%=select_field retrievemethod=>$methodlabels,id=>"retrievemethod",onchange=>"SelectInput()"
%= javascript begin
function SelectInput() {
var method = document.querySelector("#retrievemethod");
const types=['smeIF','smeCMD','web','router','if','ip','cmdv4','custom'];
types.forEach((type)=>{
var service = document.querySelector(`.${type}`);
if (service != null) {
if (method.value == type) {
service.style.display = 'block';
} else {
service.style.display = 'none';
}
}
})
}
% end
</span><br>
%#
%# From here the one that is shown depends on the choice above
%#
%# Only if "router" is chosen
<div class = router>
<span class=label>
%=l 'Router type'
</span><span class=data>
% param retrieverouter=>$ddc_datas->{"params"}->{"Extinterface"} unless param 'retrieverouter';
%=select_field retrieverouter=>$devices
</span><br>
%# Need login and password for router
<span class=label>
%=l 'Router login'
</span><span class=data>
% param retrieverouterlogin=>$ddc_datas->{"params"}->{"FWLogin"} unless param 'retrieverouter';
%=text_field 'retrieverouterlogin'
</span><br>
<span class=label>
%=l 'Router password'
</span><span class=data>
% param retrieverouterpassword=>$ddc_datas->{"params"}->{"FWPassword"} unless param 'retrieverouterpassword';
%=password_field 'retrieverouterpassword', id=>'ddcPass'
%=label_for show=>"Show"
%=check_box show=>1,onclick=>"showPass()",style=>"vertical-align:middle;"
%= javascript begin
function showPass() {
var x = document.getElementById("ddcPass");
if (x.type === "password") {
x.type = "text";
} else {
x.type = "password";
}
}
% end
</span><br>
</div>
%# Only if "web" is chosen"
<div class = web>
<span class=label>
%=l 'Web service'
</span><span class=data>
% param retrievewebservice=>$ddc_datas->{"params"}->{"urlcheckip"} unless param 'retrievewebservice';
%=select_field retrievewebservice=>$webservices
</span><br />
</div>
%# Only if "Interface" is chosen
<div class=if>
<span class=label Interface>
%=l 'RETRIEVE_IF'
</span><span class=data Interface>
% param retrieveinterface=>$ddc_datas->{"params"}->{"Extinterface"} unless param 'retrieveinterface';
%=text_field 'retrieveinterface'
</span><br>
</div>
%# Only if "cmd" is chosen
<div class=cmdv4>
<span class=label cmd>
%=l 'RETRIEVE_CMD'
</span><span class=data cmd>
% param retrievecmd=>$ddc_datas->{"params"}->{"cmdv4"} unless param 'retrievecmd';
%=text_field 'retrievecmd'
</span><br>
</div>
%# Only if "ip" is chosen
<div class=ip>
<span class=label ip>
%=l 'RETRIEVE_IP'
</span><span class=data ip>
% param retrieveip=>$ddc_datas->{"params"}->{"ForceIP"} unless param 'retrieveip';
%=text_field 'retrieveip'
</span><br>
</div>
%# Only if "custom web service"
<div class=custom>
<span class=label customweb>
%=l 'RETRIEVE_URLCHECKIP'
</span><span class=data customweb>
% param retrieveurlcheckip=>$ddc_datas->{"params"}->{"urlcheckip"} unless param 'retrieveurlcheckip';
%=text_field 'retrieveurlcheckip'
</span><br>
</div>
%= submit_button "$btn", class => 'action'
% end
</div>