Jump to content

configuredomains.tpl need coding help


wp4all

Recommended Posts

Hi @ all,

got some problems with modifying the configuredomains.tpl

This is what I have at the moment :

outline.thumb.PNG.f4bf4add408ca49c7ed9075599278a3d.PNG

This is what I would like to have :

inline.thumb.PNG.e292dc9694d064d5716b57e0f60be06f.PNG

 

That's the part that drives me to despair :

                {foreach key=domainfieldname item=domainfield from=$domain.fields}
                <div class="form-group">
                    <label class="{$responsio.classes.col}-3 {$responsio.classes.label} control-label">{$domainfieldname}</label>
                    <div class="{$responsio.classes.col}-8">
                        {if $domainfield.type == "tickbox"}<div class="checkbox {$responsio.classes.checkbox}">{$domainfield}</div>{else}{$domainfield|replace:"type=\"text\"":"type=\"text\" class=\"form-control `$responsio.classes.input`\""|replace:"type=\"password\"":"type=\"password\" class=\"form-control `$responsio.classes.input`\""|replace:"<select":"<select class=\"form-control `$responsio.classes.input`\""|replace:"<textarea":"<textarea class=\"form-control `$responsio.classes.input`\""|replace:"style=\"width:90%;\"":""}{/if}
                    </div>
                </div>{/foreach}

Maybe someone has an idea how I could solve it .

Thanks and best regards

Christian

Link to comment
Share on other sites

Hi Christian,

24 minutes ago, wp4all said:

Maybe someone has an idea how I could solve it .

they're Additional Domain Fields - so in resources/domains/dist.additionalfields.php

// .DE

$additionaldomainfields[".de"][] = array("Name" => "Tax ID", "LangVar" => "detldtaxid", "Type" => "text", "Size" => "20", "Default" => "", "Required" => true,);
$additionaldomainfields[".de"][] = array("Name" => "Address Confirmation", "LangVar" => "detldaddressconfirm", "Type" => "tickbox", "Description" => "Please tick to confirm you have a valid German address",);
$additionaldomainfields[".de"][] = array(
    "Name" => "Agree to DE Terms",
    "LangVar" => "deTLDTermsAgree",
    "Type" => "tickbox",
    "Description" => $_LANG['domains']['deTermsDescription1'] . "<br />" . $_LANG['domains']['deTermsDescription2'],
    "Required" => true,
);

so if you wanted to change that 'Address Confirmation' line into German, you would follow the instructions on the above page - basically you create a 'additionalfields.php' file in the same folder and add your changes into it... either directly, or using language overrides - though i'd be tempted to do it directly, as I assume virtually anyone who wants a .de domain will be able to speak German!

the layout issue is a whole different matter though - you might want to throw a debug into your template, as i'm not convinced that {$domainfield.type} variable exists and if so, that tickbox check would never be true... I might be tempted to try the following instead...

{if $domainfield|strstr:'type = "checkbox"'}<div class="checkbox {$responsio.classes.checkbox}">{$domainfield}</div>{else}{$domainfield|replace:"type=\"text\"":"type=\"text\" class=\"form-control `$responsio.classes.input`\""|replace:"type=\"password\"":"type=\"password\" class=\"form-control `$responsio.classes.input`\""|replace:"<select":"<select class=\"form-control `$responsio.classes.input`\""|replace:"<textarea":"<textarea class=\"form-control `$responsio.classes.input`\""|replace:"style=\"width:90%;\"":""}{/if}

though i'm not sure that would help as {$domainfield} contains BOTH the checkbox and the text - hopefully the $responsio.classes.checkbox css class sorts this for you... if you look at standard_cart, there isn't a blank line with that template - so it must be something Responsio is doing (or not doing).

otherwise, you might be looking at expanding those replaces in the template, or running the array through a hook to modify it.... and adding some css styling to align the output strings.

the "Agree To de Terms" spacing should be solved by adding another break return into the additionalfields.php custom file.

might also be worth contacting Responsio's developers, WHMCSConnect, as the template hasn't been updated for over a year, so may not be v7.6 compatible.

Link to comment
Share on other sites

Hi Brian,

thanks for your answer. No is not going about the Language I just would like to change the style.

But the part with resources/domains/dist.additionalfields.php  could help maybe.

10 hours ago, brian! said:

might also be worth contacting Responsio's developers, WHMCSConnect, as the template hasn't been updated for over a year, so may not be v7.6 compatible. 

He disappeared after packing the money. His last answer to my escalation was 4 months ago.

The last update status is now 1/2 years old.

image.png.5f68c2cd9a50bfebdf09d4b3712a02fe.png

The system shown the pictures is still on 7.4

Thanks and best regards

Christian

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.

×
×
  • 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