{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" method="post">
            <div class="input-group clr">
              <label class="control-label" for="name">{$lang.name}</label>
              <div class="inputs">
                <input id="name" type="text" class="ipttheme" name="name" value="{$smarty.post.name|escape}">
                {if isset($error.name)}
                <small>{$error.name}</small>
                {/if}
              </div>
            </div>
            {if $is_from_to}
            <div class="input-group clr">
              <label class="control-label" for="from">{$lang.from}</label> 
              <div class="inputs">
                <input id="from" type="text" name="from" value="{$smarty.post.from|escape}">
              </div>
            </div>
            <div class="input-group">
              <label for="too">{$lang.to}</label>
              <div class="inputs">
                <input id="too" type="text" name="to" value="{$smarty.post.to|escape}">
              </div>
            </div>
            {/if}
            {if $types_system}
            <div class="input-group clr">
              <label class="control-label">{$lang.key_for_that_system_badge}</label>
              <div class="inputs">
                <select name="sys_key">
                {foreach from=$types_system item=t key=k}
                <option {if $k == $smarty.post.sys_key}selected="selected"{/if} value="{$k}">{$t}</option>
                {/foreach}
                </select>
              </div>
            </div>
            {else}
            <input type="hidden" name="sys_key" value="" />
            {/if}
            <div class="input-group clr">
              <label class="control-label" for="photo">{$lang.photo}</label>
              <div class="inputs">
                <input type="file" for="photo" name="photo" />
                {if $smarty.post.photo != ''}
                <br /><br />
                <img src="{$template_data}uploads/countries/{$smarty.post.photo}" alt="" />
                {if $smarty.get.type != 'system'}
                <input class="checkbox" type="checkbox" name="deletePhoto" id="deletePhoto" value="yes" />
                <label class="checktext" for="deletePhoto">{$lang.delete}</label>
                {/if}
                {/if}
                {if isset($error.photo)}
                {$error.photo}
                {/if}
              </div>
            </div>
            <div class="input-group clr">
              <label class="control-label" for="visible">{$lang.visible}</label>
              <div class="inputs">
                <input type="checkbox" name="visible" id="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">
              <button id="personal_info_submit_button" class="btntheme btnsize btn-primary" type="submit" name="edit">{$lang.edit}</button>
            </div>
          </form>
        </div>
      </div>
    </div>

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