
<!-- admin/story/storyeditor.thtml { -->

<script type="text/javascript">
//<![CDATA[
function enablearchive(obj) {
  var f = obj.form;           // all elements have their parent form in "form"
  var disable = obj.checked;  // Disable when checked

  if (f.elements["archiveflag"].checked==true && f.elements["storycode11"].checked==false) {
    f.elements["storycode10"].checked=true;
  }
  f.elements["storycode10"].disabled=!disable;
  f.elements["storycode11"].disabled=!disable;
  f.elements["expire_month"].disabled=!disable;
  f.elements["expire_day"].disabled=!disable;
  f.elements["expire_year"].disabled=!disable;
  f.elements["expire_hour"].disabled=!disable;
  f.elements["expire_minute"].disabled=!disable;
  f.elements["expire_ampm"].disabled=!disable;
}
//]]>
</script>

<form name="frmstory" action="{site_admin_url}/story.php" method="post" enctype="multipart/form-data" id="admin-storyeditor" class="compact">
  <fieldset>
    <legend>記事の編集</legend><!-- Geeklog Japanese -->

    <dl>
      <dt>{lang_author}</dt>
      <dd>{story_author}</dd>

      <dt><label for="admin-storyeditor-publish_month">{lang_date}</label></dt>
      <dd>
        <select name="publish_month" id="admin-storyeditor-publish_month">
          {publish_month_options}
        </select>
        /
        <select name="publish_day">
          {publish_day_options}
        </select>
        /
        <select name="publish_year">
          {publish_year_options}
        </select>

        <select name="publish_hour">
          {publish_hour_options}
        </select>
        :
        <select name="publish_minute">
          {publish_minute_options}
        </select>

        {publishampm_selection}
      </dd>
      <dd class="description">{publish_date_explanation}</dd>

      <dt><label for="admin-storyeditor-title">{lang_title}</label></dt>
      <dd><input type="text" size="48" maxlength="255" value="{story_title}" name="title" id="admin-storyeditor-title" class="text"{xhtml}></dd>

      <dt><label for="admin-storyeditor-tid">{lang_topic}</label></dt>
      <dd>
        <select name="tid" id="admin-storyeditor-tid">
          {topic_options}
        </select>
      </dd>

      <dt><label for="admin-storyeditor-show_topic_icon">{lang_show_topic_icon}</label></dt>
      <dd><input type="checkbox" {show_topic_icon_checked} name="show_topic_icon" id="admin-storyeditor-show_topic_icon"{xhtml}></dd>

      <dt><label for="admin-storyeditor-draft_flag">{lang_draft}</label></dt>
      <dd><input type="checkbox" {is_checked} name="draft_flag" id="admin-storyeditor-draft_flag"{xhtml}></dd>

      <dt><label for="admin-storyeditor-archiveflag">{lang_archivetitle}({lang_option})</label></dt>
      <dd>
        <input type="checkbox" value="1" {is_checked2} onclick="enablearchive(this);" name="archiveflag" id="admin-storyeditor-archiveflag"{xhtml}>{lang_enabled}
        <input type="radio" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}>{lang_optionarchive}
        <input type="radio" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}>{lang_optiondelete}
      </dd>

      <dt><label for="admin-storyeditor-expire_month">{lang_archivetitle}({lang_date})</label></dt>
      <dd>
        <select name="expire_month" id="admin-storyeditor-expire_month">
          {expire_month_options}
        </select>
        /
        <select name="expire_day">
          {expire_day_options}
        </select>
        /
        <select name="expire_year">
          {expire_year_options}
        </select>
        <select name="expire_hour">
          {expire_hour_options}
        </select>
        :
        <select name="expire_minute">
          {expire_minute_options}
        </select>
        {expireampm_selection}
      </dd>

      <dt><label for="admin-storyeditor-featured">{lang_mode}</label></dt>
      <dd>
        {featured_options}
        <select name="frontpage">
          {frontpage_options}
        </select>
        <select name="commentcode">
          {comment_options}
        </select>
        <select name="trackbackcode">
          {trackback_options}
        </select>
      </dd>

      <dt><label for="admin-storyeditor-sid">{lang_sid}</label></dt>
      <dd><input type="text" size="40" maxlength="40" value="{story_id}" name="sid" id="admin-storyeditor-sid" class="text"{xhtml}></dd>

      <dt><label for="admin-storyeditor-introtext">{lang_introtext}</label></dt>
      <dd><textarea cols="45" rows="12" name="introtext" id="admin-storyeditor-introtext">{story_introtext}</textarea></dd>

      <dt><label for="admin-storyeditor-bodytext">{lang_bodytext}</label></dt>
      <dd><textarea cols="45" rows="20" name="bodytext" id="admin-storyeditor-bodytext">{story_bodytext}</textarea></dd>

      <dt><label for="admin-storyeditor-postmode">{lang_postmode}</label></dt>
      <dd>
        <select name="postmode" id="admin-storyeditor-postmode">
          {post_options}
        </select>
      </dd>
      <dd class="description">{lang_allowed_html}</dd>

      <dt><label for="file1">{lang_images}</label></dt>
      <dd>
        {saved_images}
        {image_form_elements}
      </dd>

      <dt>{lang_hits}</dt>
      <dd>{story_hits}</dd>

      <dt>{lang_comments}</dt>
      <dd>{story_comments}</dd>

      <dt>{lang_trackbacks}</dt>
      <dd>{story_trackbacks}</dd>

      <dt>{lang_emails}</dt>
      <dd>{story_emails}</dd>
    </dl>
  </fieldset>

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

    <h3>{lang_accessrights}</h3>

    <dl>
      <dt>{lang_owner}</dt>
      <dd>{owner_name}</dd>

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

      <dt><label for="perm_owner">{lang_permissions}</label></dt>
      <dd>{permissions_editor}</dd>
      <dd class="description">{lang_perm_key}</dd>
      <dd class="description">{permissions_msg}</dd>
    </dl>
  </fieldset>

  <ul class="submit">
    <li><input type="submit" value="{lang_save}" name="mode"{xhtml}></li>
    <li><input type="submit" value="{lang_preview}" name="mode"{xhtml}></li>
    <li><input type="submit" value="{lang_cancel}" name="mode"{xhtml}></li>
    <li>{delete_option}</li>
    <li>
      <input type="hidden" name="uid" value="{story_uid}"{xhtml}>
      <input type="hidden" name="publish_second" value="{publish_second}"{xhtml}>
      <input type="hidden" name="old_sid" value="{old_story_id}"{xhtml}>
      <input type="hidden" name="editopt" value="default"{xhtml}>
      <input type="hidden" name="hour_mode" value="{hour_mode}"{xhtml}>
      <input type="hidden" name="expire_second" value="{expire_second}"{xhtml}>
      <input type="hidden" name="hits" value="{story_hits}"{xhtml}>
      <input type="hidden" name="comments" value="{story_comments}"{xhtml}>
      <input type="hidden" name="trackbacks" value="{story_trackbacks}"{xhtml}>
      <input type="hidden" name="numemails" value="{story_emails}"{xhtml}>
      <input type="hidden" name="owner_id" value="{owner_id}"{xhtml}>
      <input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}>
      {submission_option}
    </li>
  </ul>
</form>

<script type="text/javascript">
<!-- This code will only be executed by a browser that suppports Javascript -->
var jstest = "{showarchivedisabled}";
if (jstest) {
  document.frmstory.expire_month.disabled=true;
  document.frmstory.expire_day.disabled=true;
  document.frmstory.expire_year.disabled=true;
  document.frmstory.expire_hour.disabled=true;
  document.frmstory.expire_minute.disabled=true;
  document.frmstory.expire_ampm.disabled=true;
  document.frmstory.storycode10.disabled=true;
  document.frmstory.storycode11.disabled=true;
}
</script>

<!-- } admin/story/storyeditor.thtml -->
