[imp] customize To: field in Imp 4.2
Paul Caldwell
paulcaldwell90 at gmail.com
Thu Oct 16 04:40:34 UTC 2008
Hi all,
In Imp 4.2, we need to customize imp/templates/compose/compose.html and
access addr.input_value. It is an array that loops over the To field and
the CC field, but we want to address its value for the To field without
looping. Could some more knowledgeable shed a light on the grammar to
address that single value? I tried <tag:addr[0].input_value /> , to no
luck.
For the curious, we modified Horde Imp a bit so that when the user sends an
email, he can choose to send To three destinations: list, support, himself,
through a pull-down menu (he cannot type To address any more). This worked
well with 4.1.4, and our hack is attached in the end. Now we are trying to
upgrade to 4.2, but found the codes changed drastically that I can't figure
out how to hack it now. Our hack for 4.1.4 was in
imp/imp/templates/compose/compose.inc :
<tr>
<td class="light rightAlign"><strong><?php echo Horde::label('to',
_("_To")) ?> </strong></td>
<td class="item">
<table width="100%">
<tr width="100%">
<td class="leftAlign">
<select name="to">
<option value="list"<?php if($header['to']=="list") echo
'selected="selected"' ?>><?php echo _("list") ?></option>
<option value="support"<?php
if($header['to']=="support") echo 'selected="selected"' ?>><?php echo
_("support") ?></option>
<option value="<?php echo htmlspecialchars($from)
?>"<?php if($header['to']==$from) echo 'selected="selected"' ?>><?php echo
_("self_address") ?>(<?php echo htmlspecialchars($from) ?>)</option>
</select>
</td>
<td class="rightAlign"><?php echo Help::link('imp', 'compose-to')
?> </td>
</tr>
</table>
</td>
</tr>
Thanks, Paul
More information about the imp
mailing list