*
* @param array $config The necessary config:
* <pre>
+ * 'label' - (string) The human-readable label for this account.
* 'port' - (integer) The remote port.
* 'secure' -(string) Either 'auto', 'no', or 'yes'.
* 'server' - (string) The server hostspec.
$port = ($vars->accounts_type == 'imap') ? 143 : 110;
}
+ /* Label is not required. */
+ $label = $vars->accounts_label;
+ if (!strlen($label)) {
+ $label = $vars->accounts_server . ':' . $port . ' [' . $vars->accounts_type . ']';
+ }
+
$imp_accounts = IMP_Accounts::singleton();
$imp_accounts->addAccount(array(
+ 'label' => $label,
'port' => $port,
'secure' => $vars->accounts_secure,
'server' => $vars->accounts_server,
<?php if (Horde_Util::getFormData('accounts_action') == 'new'): ?>
<table class="accountsmanagement">
<tr>
+ <td class="item"><?php echo _("Label") ?>:</td>
+ <td class="item"><input name="accounts_label" size="30"/></td>
+ <td></td>
+ </tr>
+ <tr>
<td class="item"><?php echo _("Type") ?>:</td>
<td class="item">
<select name="accounts_type">
<table class="accountsmanagement">
<thead>
<tr>
+ <td><?php echo _("Label") ?></td>
<td><?php echo _("Server") ?></td>
<td><?php echo _("Type") ?></td>
<td><?php echo _("Port") ?></td>
<?php else: ?>
<?php foreach ($accounts_list as $key => $val): ?>
<tr id="accountsid_<?php echo $key ?>">
+ <td><?php echo htmlspecialchars($val['label']) ?></td>
<td><?php echo htmlspecialchars($val['server']) ?></td>
<td><?php echo htmlspecialchars($val['type']) ?></td>
<td><?php echo htmlspecialchars($val['port']) ?></td>