xen:explain -- Restrictions on use?

Kevin

Well-known member
I am trying to create the below admin' template....
Code:
<xen:uploadunit label="{xen:phrase myapp_files1}" name="target" value="">
    <div id="targetHtml">{xen:if "{$targetFound}", {xen:phrase my_msg1, "target={$targetPath}"}}</div>
</xen:uploadunit>

<xen:uploadunit label="{xen:phrase myapp_files2}" name="file" value="">
    <div id="fileHtml">{$additionalFiles}</div>
</xen:uploadunit>
<xen:explain>{xen:phrase myapp_phrase}</xen:explain>
... which is then used inside of another form but when I try to save it with the xen:explain tags I get an error message that explain is invalid. :oops:

Is there a restriction on where/when I can use xen:explain?
 
I think the explain tag is only used inside another "xen" tag. Something like this:

Code:
<xen:textboxunit label="{xen:phrase email_to_ban}:" name="email">
            <xen:explain>{xen:phrase you_may_use_star_to_represent_wildcards_automatically_added}</xen:explain>
        </xen:textboxunit>

Code:
<xen:checkboxunit label="{xen:phrase archive_import_log}" value="0">
        <xen:option name="archive">
            <xen:label>{xen:phrase archive_the_import_log}:</xen:label>
            <xen:textbox name="table" value="archived_import_log" />
        </xen:option>
        <xen:explain>{xen:phrase archive_import_log_explain}</xen:explain>
    </xen:checkboxunit>

Code:
<xen:selectunit label="{$preparedOption.title}" name="{$fieldPrefix}[{$preparedOption.option_id}]" value="{$preparedOption.option_value}"
hint="{$preparedOption.hint}" inputclass="{$preparedOption.inputClass}">
    <xen:options source="$formatParams" />
    <xen:explain>{xen:raw $preparedOption.explain}</xen:explain>
    <xen:html>
        <input type="hidden" name="{$listedFieldName}" value="{$preparedOption.option_id}" />
        {xen:raw $editLink}
    </xen:html>
</xen:selectunit>

Code:
<xen:textboxunit label="{xen:phrase group_name}:" name="group_name" value="{$group.group_name}">
        <xen:explain>{xen:phrase this_is_unique_identifier_for_this_group}</xen:explain>
    </xen:textboxunit>
 
You can take a look at the function _wrapControlUnit($label, $controlText, $id, array $rowOptions) and see that the <xen:explain is only handle in there.
(file library/XenForo/Helper/Admin.php)
 
You can take a look at the function _wrapControlUnit($label, $controlText, $id, array $rowOptions) and see that the <xen:explain is only handle in there.
(file library/XenForo/Helper/Admin.php)
HHhhmm... with 1.1 B5 I'm not seeing "library/XenForo/Helper/Admin.php" but I get your drift, thanks.

Any suggestions on achieving the goal?
 
HHhhmm... with 1.1 B5 I'm not seeing "library/XenForo/Helper/Admin.php" but I get your drift, thanks.
... it is library/XenForo/Template/Helper/Admin.php :)

Any suggestions on achieving the goal?
Looking at the code, I can do it with just a paragraph tag using the "explain" class.
I am trying to create the below admin' template....
Code:
<xen:uploadunit label="{xen:phrase myapp_files1}" name="target" value="">
    <div id="targetHtml">{xen:if "{$targetFound}", {xen:phrase my_msg1, "target={$targetPath}"}}</div>
</xen:uploadunit>
 
<xen:uploadunit label="{xen:phrase myapp_files2}" name="file" value="">
    <div id="fileHtml">{$additionalFiles}</div>
</xen:uploadunit>
<p class="explain">{xen:phrase myapp_phrase}</p>

Thanks for pointing me in the direction. (y)
 
Top Bottom