? my ($app, $alias) = @_;

    <table class="active" id="setting_<?= $alias ?>">

      <tr>
        <td>
          <label>Name</label>
          <span><?= $alias ?></span>
          <input type="hidden" name="<?= $alias ?>_name" value="<?= $alias ?>" />
        </td>

        <td>
          <label>Status</label>
          <span class="disconnected" id="<?= $alias ?>_status">disconnected</span>
        </td>
      </tr>

      <tr>
        <td>
          <label>Auto-connect?</label>
          <input type="checkbox" checked="checked" name="<?= $alias ?>_autoconnect" />
        </td>

        <td>
        </td>
      </tr>

      <tr>
        <td>
          <label>Server address</label>
          <input type="text" name="<?= $alias ?>_host" value="" size="15"/>
        </td>

        <td>
          <label>Port</label>
          <input type="text" name="<?= $alias ?>_port" value="6667" size="6" style="float:left"/>

            <input type="checkbox" name="<?= $alias ?>_ssl" />
            <span style="font-size:0.7em">SSL</span>
        </td>
      </tr>

      <tr>
        <td>
          <label>Nick</label>
          <input type="text" name="<?= $alias ?>_nick" value="" size="15" />
        </td>

        <td>
          <label>Name or Avatar URL</label>
          <input type="text" name="<?= $alias ?>_ircname" value="" size="15" />
        </td>
      </tr>

      <tr>
        <td>
          <label>Username</label>
          <input type="text" name="<?= $alias ?>_username" value="" size="15" />
        </td>

        <td>
          <label>Password</label>
          <input type="text" name="<?= $alias ?>_password" value="" size="15" />
        </td>
      </tr>

      <tr>
        <td>
          <label>Channels
            <span style="font-size:0.8em">(e.g. <span style="font-family:monospace;font-size:1em">#alice</span>)</span>
          </label>
          <select name="<?= $alias ?>_channels" multiple="multiple" id="channels_<?= $alias ?>" class="channelselect">
          </select>
          <div class="controls">
            <a href="#" onclick="return Alice.connections.addChannel('<?= $alias ?>')">Add</a>
            <a href="#" onclick="return Alice.connections.removeChannels('<?= $alias ?>')">Remove</a>
          </div>
        </td>

        <td>
          <label>Commands</label>
          <select name="<?= $alias ?>_on_connect" multiple="multiple" id="on_connect_<?= $alias ?>" class="channelselect">
          </select>
          <div class="controls">
            <a href="#" onclick="return Alice.connections.addCommand('<?= $alias ?>')">Add</a>
            <a href="#" onclick="return Alice.connections.removeCommands('<?= $alias ?>')">Remove</a>
          </div>
        </td>
      </tr>
    </table>

