<{if $op=="tad_web_action_form"}>

  <{$formValidator_code}>


  <script type="text/javascript" src="<{$xoops_url}>/modules/tadtools/My97DatePicker/WdatePicker.js"></script>
  <form action="action.php" method="post" id="myForm" enctype="multipart/form-data" class="form-horizontal" role="form">
    <!--活動名稱-->
    <div class="control-group">
      <div class="span12 controls">
        <input type="text" name="ActionName" value="<{$ActionName}>" id="ActionName" class="validate[required] span12" placeholder="<{$smarty.const._MD_TCW_ACTIONNAME}>">
      </div>
    </div>


    <!--活動說明-->
    <div class="control-group">
      <div class="span12 controls">
        <textarea name="ActionDesc"  rows=4 id="ActionDesc"  class="span12" placeholder="<{$smarty.const._MD_TCW_ACTIONDESC}>"><{$ActionDesc}></textarea>
      </div>
    </div>

    <!--活動日期-->
    <div class="control-group">
      <label class="span2 control-label">
        <{$smarty.const._MD_TCW_ACTIONDATE}>
      </label>
      <div class="span4 controls">
        <input type="text" name="ActionDate" class="span12" value="<{$ActionDate}>" id="ActionDate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd' , startDate:'%y-%M-%d'})">
      </div>
      <!--活動地點-->
      <label class="span2 control-label">
        <{$smarty.const._MD_TCW_ACTIONPLACE}>
      </label>
      <div class="span4 controls">
        <input type="text" name="ActionPlace" class="span12" value="<{$ActionPlace}>" id="ActionPlace" >
      </div>
    </div>



    <!--上傳圖檔-->
    <div class="control-group">
      <label class="span2 control-label">
        <{$smarty.const._MD_TCW_ACTION_UPLOAD}>
      </label>
      <div class="span10 controls">
        <{$upform}>
      </div>
    </div>

    <div class="control-group">
      <div class="span12 text-center">

        <!--活動編號-->
        <input type="hidden" name="ActionID" value="<{$ActionID}>">
        <!--所屬團隊-->
        <input type="hidden" name="WebID" value="<{$WebID}>">
        <input type="hidden" name="op" value="<{$next_op}>">
        <button type="submit" class="btn btn-primary"><{$smarty.const._TAD_SAVE}></button>
      </div>
    </div>
  </form>
<{elseif $op=="show_one_tad_web_action"}>

  <{if $isMineAction}>
  <script>
    function delete_tad_web_action_func(ActionID){
      var sure = window.confirm("<{$smarty.const._TAD_DEL_CONFIRM}>");
      if (!sure)  return;
      location.href="action.php?WebID=<{$WebID}>&op=delete_tad_web_action&ActionID=" + ActionID;
    }
  </script>
  <{/if}>

  <h1><{$ActionName}></h1>
  <div class="row-fluid">
    <div class="span4"><{$smarty.const._MD_TCW_ACTIONDATE}><{$smarty.const._TAD_FOR}><{$ActionDate}></div>
    <div class="span4"><{$smarty.const._MD_TCW_ACTIONPLACE}><{$smarty.const._TAD_FOR}><{$ActionPlace}></div>
    <div class="span4"><{$ActionInfo}></div>
  </div>
  <div class="well"><{$ActionDesc}></div>

  <div class="row-fluid">
    <{$pics}>
  </div>

  <{if $isMineAction}>
    <div class="text-right">
      <a href="javascript:delete_tad_web_action_func(<{$ActionID}>);" class="btn btn-danger"><{$smarty.const._TAD_DEL}></a>
      <a href="action.php?WebID=<{$WebID}>&op=tad_web_action_form&ActionID=<{$ActionID}>" class="btn btn-warning"><{$smarty.const._TAD_EDIT}></a>
    </div>
  <{/if}>
<{else}>
  <{$FooTableJS}>
  <{includeq file="db:tad_web_common_action.html"}>
<{/if}>