<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:py="http://genshi.edgewall.org/">
  <xi:include href="discussion-macros.html"/>
  <xi:include href="layout.html"/>
  <head>
    <title>Add Forum</title>
  </head>

 <body>
    <xi:include href="discussion-header.html"/>

    <div id="content" class="discussion">
      <div id="${discussion.mode}" class="${discussion.mode}">

        <h1>Add Forum</h1>

        <form class="add_form" method="post" action="${href.discussion()}">
          <fieldset>
            <legend>
              Add Forum:
            </legend>

            <div class="field">
              <label for="name">Name:</label><br/>
              <input type="text" id="name" name="name" value=""/><br/>
            </div>

            <div class="field">
              <label for="subject">Subject:</label><br/>
              <input type="text" id="subject" name="subject" value=""/><br/>
            </div>

            <div class="field">
              <label for="description">Description:</label><br/>
              <input type="text" id="description" name="description" value=""/><br/>
            </div>

            <div class="field">
              <label for="moderators">Moderators:</label><br/>
              <py:choose>
                <select py:when="len(discussion.users)" id="moderators" name="moderators" multiple="on">
                  <option py:for="user in discussion.users" value="${user}">${user}</option>
                </select>
                <input py:otherwise="" type="text" id="moderators" name="moderators" value=""/>
              </py:choose><br/>
            </div>

            <py:choose>
              <div py:when="len(discussion.groups) > 1" class="group">
                <label for="group">Forum Group:</label><br/>
                <select id="group" name="group">
                  <option py:for="group in discussion.groups" value="${group.id}">${group.name}</option>
                </select><br/>
              </div>
              <input py:otherwise="" type="hidden" id="group" name="group" value="0"/>
            </py:choose>

            <div class="buttons">
              <input type="submit" name="submit" value="Submit"/>
              <input type="button" name="cancel" value="Cancel" onclick="location.href = '${href.discussion()}'"/>
              <input type="hidden" name="discussion_action" value="post-add"/>
            </div>

          </fieldset>
        </form>

      </div>
    </div>

    <xi:include href="discussion-footer.html"/>
  </body>
</html>
