{# begin {templatelocation} #}

<form action="{site_admin_url}/topic.php" method="post" enctype="multipart/form-data" id="admin-topiceditor" class="compact uk-form">

  <div class="admin_basic">
    <dl class="form_block">
      <dt><label for="admin-topiceditor-topic">{lang_topicname}</label></dt>
      <dd><input type="text" maxlength="75" {!if titletoid}onkeyup="TitleToId('admin-topiceditor-topic','admin-topiceditor-tid');" {!endif}value="{topic_name}" name="topic_name" id="admin-topiceditor-topic" class="size5"{xhtml}></dd>

      <dt><label for="admin-topiceditor-tid">{lang_topicid}</label></dt>
      <dd><input type="text" maxlength="75" value="{topic_id}" name="tid" id="admin-topiceditor-tid" class="size5" aria-describedby="desc-admin-topiceditor-tid"{xhtml}> <span id="desc-admin-topiceditor-tid">{lang_donotusespaces}</span></dd>

      <dt><label for="admin-topiceditor-title">{lang_topic_title}</label></dt>
      <dd><input type="text" maxlength="128" value="{topic_title}" name="topic_title" id="admin-topiceditor-title" class="size5" aria-describedby="desc-admin-topiceditor-title"{xhtml}></dd>
      <dd class="description">{lang_topic_title_description}</dd>
      
      <dt><label for="admin-topiceditor-inherit">{lang_inherit}</label></dt>
      <dd class="controls_text"><label><input type="checkbox" {inherit_checked} name="inherit" id="admin-topiceditor-inherit"{xhtml}><span class="fieldhelp">{lang_inherit_info}</span></label></dd>

      <dt class="admin-topiceditor-hidden-element" style="display: none"><label for="admin-topiceditor-hidden">{lang_hidden}</label></dt>
      <dd class="controls_text admin-topiceditor-hidden-element" style="display: none"><label><input type="checkbox" {hidden_checked} name="hidden" id="admin-topiceditor-hidden"{xhtml}><span class="fieldhelp">{lang_hidden_info}</span></label></dd>

      <dt><label for="admin-topiceditor-parent_id">{lang_parent_id}</label></dt>
      <dd>
        <select name="parent_id" id="admin-topiceditor-parent_id">
            {parent_id_options}
        </select>
      </dd>
      <dd class="description">{lang_parent_desc}</dd>

      <dt><label for="admin-topiceditor-sortnum">{lang_sortorder}</label></dt>
      {!if sort_numeric}
      <dd class="controls_text"><input type="text" size="5" maxlength="5" name="sortnum" id="admin-topiceditor-sortnum" value="{sort_order}"{xhtml}></dd>
      {!else}
      <dd class="controls_text">{lang_alphabetical}<input type="hidden" name="sortnum"  value="{sort_order}"{xhtml}></dd>
      {!endif}

      <dt><label for="admin-topiceditor-limitnews">{lang_storiesperpage}</label></dt>
      <dd><input type="text" maxlength="3" value="{story_limit}" name="limitnews" id="admin-topiceditor-limitnews" class="size1" aria-describedby="desc-admin-topiceditor-limitnews"{xhtml}> <span class="fieldhelp" id="desc-admin-topiceditor-limitnews">{lang_defaultis} {default_limit}</span></dd>

      <dt><label for="admin-topiceditor-imageurl">{lang_topicimage}</label></dt>
      <dd><input type="text" dir="ltr" maxlength="{max_url_length}" value="{image_url}" name="imageurl" id="admin-topiceditor-imageurl" class="size5"{xhtml}></dd>

      <dt><label for="admin-topiceditor-newicon">{lang_uploadimage}</label></dt>
      <dd><input type="file" name="newicon" id="admin-topiceditor-newicon" aria-describedby="desc-admin-topiceditor-newicon"{xhtml}><br{xhtml}><span id="desc-admin-topiceditor-newicon">{icon_max_dimensions}</span></dd>

      <dt{hide_meta}><label for="admin-storyeditor-metadescription">{lang_metadescription}</label></dt>
      <dd{hide_meta}><textarea name="meta_description" id="admin-storyeditor-metadescription" class="wide" cols="70" rows="2">{meta_description}</textarea></dd>

      <dt{hide_meta}><label for="admin-storyeditor-metakeywords">{lang_metakeywords}</label></dt>
      <dd{hide_meta}><textarea name="meta_keywords" id="admin-storyeditor-metakeywords" class="wide" cols="70" rows="2">{meta_keywords}</textarea></dd>

      <dt><label for="admin-topiceditor-is_default">{lang_defaulttopic}</label></dt>
      <dd class="controls_text"><label><input type="checkbox" {default_checked} name="is_default" id="admin-topiceditor-is_default"{xhtml}><span class="fieldhelp">{lang_defaulttext}</span></label></dd>

      <dt><label for="admin-topiceditor-is_archive">{lang_archivetopic}</label></dt>
      <dd class="controls_text"><label><input type="checkbox" {archive_checked} {archive_disabled} name="is_archive" id="admin-topiceditor-is_archive"{xhtml}><span class="fieldhelp">{lang_archivetext}</span></label></dd>

      <dt><label>{lang_num_stories}</label></dt>
      <dd class="controls_text">{num_stories}</dd>

    </dl>

    <fieldset>
      <legend>{lang_accessrights}</legend>

      <dl class="form_block">
        <dt>{lang_owner}</dt>
        <dd class="controls_text">{owner_name}</dd>

        <dt><label for="group_id">{lang_group}</label></dt>
        <dd>{group_dropdown}</dd>

        <dt>{lang_permissions}</dt>
        <dd>{permissions_editor}</dd>
        <dd class="description">{lang_perm_key}</dd>
        <dd class="description">{lang_permissions_msg}</dd>
      </dl>
    </fieldset>

    <p class="description">{warning_msg}</p>

    <div class="submit">
      <button type="submit" name="mode" value="{lang_save}" class="uk-button uk-button-primary">{lang_save}</button>
{!if allow_delete}
      <button type="submit" name="mode" value="{lang_delete}" class="uk-button uk-button-danger" onclick="return confirm('{confirm_message}');">{lang_delete}</button>
{!endif}
      <button type="submit" name="mode" value="{lang_cancel}" class="uk-button">{lang_cancel}</button>
      <input type="hidden" name="owner_id" value="{owner_id}"{xhtml}>
      <input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}>
      <input type="hidden" name="old_tid" value="{topic_id}"{xhtml}>
    </div>
  </div>

</form>

{# end {templatelocation} #}
