{include file="$admin_template_path/html/header.html"}
</head>
<body>
{include file="$admin_template_path/html/pagetops.html"}
{if $errorMessage}
<div id="errormsg">
<div class="msg">
  <div class="closebtn"><i data-icon="" class="icon-close"></i></div>
  {$errorMessage}
</div>
</div>
{literal}
<script type="text/javascript">
seajs.use(["modules/pageui/msg"], function(msg){
    msg.msginit("#errormsg");
});
</script>
{/literal}
{/if}

<div class="pagebg">
  <div class="mcontent pagemain clr">
    {include file="$admin_template_path/html/leftmenu.html"}
    <div class="pagemainconent">

    <div class="rightdetail_admin">
      <div class="sideblock">
        <div class="sideheader">新闻邮件详细</div>
        <div class="sidebody">
          <form action="" class="horizontal-form item-form disable-on-submit" action="" method="post" enctype="multipart/form-data">
            <div class="input-group clr">
              <label class="control-label" for="name">{$lang.name}</label>
              <div class="inputs">
                <input type="text" name="name" class="ipttheme" id="name" required="true" value="{$smarty.post.name|escape}" >
                {if isset($error.name)}
                <span class="validate_error">{$error.name}</span>
                {/if}
              </div>
            </div>
            <div class="input-group clr">
              <label class="control-label" for="description">Description</label>
              <div class="inputs">
                <input type="text" name="description" class="ipttheme" id="description" required="true" value="{$smarty.post.description|escape}" >
                {if isset($error.description)}
                <small>{$error.description}</small>
                {/if}
              </div>
            </div>
            <div class="input-group clr">
              <label class="control-label" for="qnews_url">URL</label>
              <div class="inputs">
                <input type="text" name="url" class="ipttheme" id="qnews_url" required="true" value="{$smarty.post.url|escape}" >
              </div>
            </div>
            <div class="input-group clr">
              <label class="control-label" for="qnews_url">{$lang.photo}</label>
              <div class="inputs">
                <input type="file" name="photo" />
                {if $smarty.post.photo != ''}
                <br />
                <img src="{$template_data}uploads/qnews/260x140/{$smarty.post.photo}" alt="" />
                <input type="checkbox" name="deletePhoto" value="yes" /> {$lang.delete}
                {/if}
                {if isset($error.photo)}
                <small>{$error.photo}</small>
                {/if}
              </div>
            </div>
            <div class="input-group clr">
              <label class="control-label" for="visible">{$lang.visible}</label>
              <div class="inputs">
                <input type="checkbox" id="visible" name="visible" value="true" class="checkbox" {if $smarty.post.visible == 'true'}checked="checked"{/if} />
                <label class="checktext" for="visible">{$lang.yes}</label>
              </div>
            </div>
            <div class="form-submit">
              {if $smarty.get.c=='edit'}
              <button id="personal_info_submit_button" class="btntheme btnsize btn-primary" type="submit" name="edit" >{$lang.edit}</button>
              {else}
              <button id="personal_info_submit_button" class="btntheme btnsize btn-primary" type="submit" name="add" >{$lang.add}</button>
              {/if}
            </div>
          </form>
        </div>
      </div>
    </div>

    </div>
  </div>
</div>
</body>
</html>