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

  <{$formValidator_code}>


  <script type="text/javascript" src="<{$xoops_url}>/modules/tadtools/My97DatePicker/WdatePicker.js"></script>

  <h1><{$smarty.const._MD_TCW_ACTION_ADD}></h1>
  <div class="well">
    <form action="action.php" method="post" id="myForm" enctype="multipart/form-data" class="form-horizontal" role="form">

      <!--分類-->
      <{$cate_menu}>

      <!--活動名稱-->
      <div class="form-group">
        <div class="col-md-12">
          <input type="text" name="ActionName" value="<{$ActionName}>" id="ActionName" class="validate[required] form-control" placeholder="<{$smarty.const._MD_TCW_ACTIONNAME}>">
        </div>
      </div>


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

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



      <!--上傳圖檔-->
      <div class="form-group">
        <label class="col-md-2 control-label">
          <{$smarty.const._MD_TCW_ACTION_UPLOAD}>
        </label>
        <div class="col-md-10">
          <{$upform}>
        </div>
      </div>

      <div class="form-group">
        <div class="col-md-12 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>
  </div>
<{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="alert alert-info">
    <div class="row">
      <div class="col-md-3"><{$smarty.const._MD_TCW_ACTIONDATE}><{$smarty.const._TAD_FOR}><{$ActionDate}></div>
      <div class="col-md-3"><{$smarty.const._MD_TCW_ACTIONPLACE}><{$smarty.const._TAD_FOR}><{$ActionPlace}></div>
      <div class="col-md-6"><{$ActionInfo}></div>
    </div>
  </div>

  <{if $ActionDesc}>
    <div class="well"><{$ActionDesc}></div>
  <{/if}>

  <div class="row">
    <{$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_b3.html"}>
<{/if}>