source: branches/comu-ver2/data/Smarty/templates/default/admin/contents/inquiry.tpl @ 17351

Revision 17351, 8.9 KB checked in by pineray, 16 years ago (diff)
  • Property svn:eol-style set to LF
  • Property svn:mime-type set to text/html; charset=UTF-8
Line 
1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2008 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23*}-->
24<script type="text/javascript">
25<!--
26  function func_check() {
27    res = confirm('登録します。宜しいですか?');
28    if( res == true ) {
29      return true;
30    }
31    return false;
32  }
33   
34   
35  function func_disp( no ){
36
37    ml = document.form1.elements['question[' + no + '][kind]'];
38    len = ml.length;
39
40    optd = $("#Q" + no + "-option");
41    nmth = $("#Q" + no + "-name").children("th");
42    var flag = 0;
43   
44    for( i = 0; i < len ; i++) {
45     
46        if ( ml[i].checked ){
47          if ( (ml[i].value == 3) || (ml[i].value == 4) ) {
48            optd.show();
49            nmth.attr("rowspan", "3");
50          } else {
51            optd.hide();
52            nmth.attr("rowspan", "2");
53          }
54          flag = 1;
55        }
56   
57    }
58
59    if ( flag == 0 ){
60      optd.hide();
61      nmth.attr("rowspan", "2");
62    }
63   
64  }
65 
66  function delete_check() {
67    res = confirm('アンケートを削除しても宜しいですか?');
68    if(res == true) {
69      return true;
70    }
71    return false;
72  }
73// -->
74</script>
75
76<div id="admin-contents" class="contents-main">
77<form name="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->?mode=regist" onSubmit="return func_check(); false;">
78<input type="hidden" name="question_id" value="<!--{$QUESTION_ID}-->" />
79  <h2><!--{if $QUESTION_ID}-->修正<!--{else}-->新規<!--{/if}-->登録</h2>
80  <!--{if $MESSAGE != ""}-->
81  <div class="message"><span class="attention"><!--{$MESSAGE}--></span></div>
82  <!--{/if}-->
83
84  <table>
85    <tr>
86      <th>稼働・非稼働<span class="attention">*</span></th>
87      <td>
88        <span <!--{if $ERROR.active}--><!--{sfSetErrorStyle}--><!--{/if}-->>
89        <!--{html_radios name="active" options=$arrActive selected=$smarty.post.active}-->
90        </span>
91        <!--{if $ERROR.active}--><br /><span class="attention"><!--{$ERROR.active}--></span><!--{/if}-->
92      </td>
93    </tr>
94    <tr>
95      <th>アンケートタイトル<span class="attention">*</span></th>
96      <td>
97        <input type="text" name="title" size="70" class="box70"  maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$smarty.post.title|escape}-->" <!--{if $ERROR.title}--><!--{sfSetErrorStyle}--><!--{/if}--> />
98        <!--{if $ERROR.title}--><br /><span class="attention"><!--{$ERROR.title}--></span><!--{/if}-->
99      </td>
100    </tr>
101    <tr>
102      <th>アンケート内容<span class="attention">*</span></th>
103      <td>
104        <textarea name="contents" cols="60" rows="4" class="area60" wrap="physical" <!--{if $ERROR.contents}--><!--{sfSetErrorStyle}--><!--{/if}-->><!--{$smarty.post.contents}--></textarea>
105        <!--{if $ERROR.contents}--><br /><span class="attention"><!--{$ERROR.contents}--></span><!--{/if}-->
106      </td>
107    </tr>
108    <!--{section name=question loop=$cnt_question}-->
109    <tr id="Q<!--{$smarty.section.question.index}-->-name">
110      <th rowspan="3">質問<!--{$smarty.section.question.iteration}--><!--{if $smarty.section.question.iteration eq 1}--><span class="attention">*</span><!--{/if}--></th>
111      <td>
112        <input type="text" name="question[<!--{$smarty.section.question.index}-->][name]" size="70" class="box70" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$smarty.post.question[$smarty.section.question.index].name|escape}-->" <!--{if $ERROR.question[$smarty.section.question.index].name}--><!--{sfSetErrorStyle}--><!--{/if}--> />
113        <!--{if $ERROR.question[$smarty.section.question.index].name}--><br /><span class="attention"><!--{$ERROR.question[$smarty.section.question.index].name}--></span><!--{/if}-->
114      </td>
115    </tr>
116    <tr id="Q<!--{$smarty.section.question.index}-->-kind">
117      <td>
118        <span<!--{if $ERROR_COLOR.question[$smarty.section.question.index].kind}--> style="background-color:<!--{$ERROR_COLOR.question[$smarty.section.question.index].kind}-->"<!--{/if}-->>
119        <!--{html_radios_ex onClick="func_disp(`$smarty.section.question.index`)" name="question[`$smarty.section.question.index`][kind]" options="$arrQuestion" selected="`$smarty.post.question[$smarty.section.question.index].kind`"}-->
120        </span>
121        <!--{if $ERROR.question[$smarty.section.question.index].kind}--><br /><span class="attention"><!--{$ERROR.question[$smarty.section.question.index].kind}--></span><!--{/if}-->
122      </td>
123    </tr>
124    <tr id="Q<!--{$smarty.section.question.index}-->-option">
125      <td>
126        1 <input type="text" name="question[<!--{$smarty.section.question.index}-->][option][0]" size="40" class="box40" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$smarty.post.question[$smarty.section.question.index].option.0|escape}-->" <!--{if $ERROR.question[$smarty.section.question.index].kind}--><!--{sfSetErrorStyle}--><!--{/if}--> /> 2 <input type="text" name="question[<!--{$smarty.section.question.index}-->][option][1]" size="40" class="box40" value="<!--{$smarty.post.question[$smarty.section.question.index].option.1|escape}-->" <!--{if $ERROR.question[$smarty.section.question.index].kind}--><!--{sfSetErrorStyle}--><!--{/if}--> /><br />
127        3 <input type="text" name="question[<!--{$smarty.section.question.index}-->][option][2]" size="40" class="box40" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$smarty.post.question[$smarty.section.question.index].option.2|escape}-->" /> 4 <input type="text" name="question[<!--{$smarty.section.question.index}-->][option][3]" size="40" class="box40" value="<!--{$smarty.post.question[$smarty.section.question.index].option.3|escape}-->" /><br />
128        5 <input type="text" name="question[<!--{$smarty.section.question.index}-->][option][4]" size="40" class="box40" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$smarty.post.question[$smarty.section.question.index].option.4|escape}-->" /> 6 <input type="text" name="question[<!--{$smarty.section.question.index}-->][option][5]" size="40" class="box40" value="<!--{$smarty.post.question[$smarty.section.question.index].option.5|escape}-->" /><br />
129        7 <input type="text" name="question[<!--{$smarty.section.question.index}-->][option][6]" size="40" class="box40" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$smarty.post.question[$smarty.section.question.index].option.6|escape}-->" /> 8 <input type="text" name="question[<!--{$smarty.section.question.index}-->][option][7]" size="40" class="box40" value="<!--{$smarty.post.question[$smarty.section.question.index].option.7|escape}-->" />
130      </td>
131    </tr>
132    <!--{/section}-->
133  </table>
134
135  <div class="btn">
136    <button type="submit"><span>アンケートを<!--{if $QUESTION_ID}-->修正<!--{else}-->作成<!--{/if}--></span></button>
137    <button type="reset"><span>内容をクリア</span></button>
138  </div>
139</form>
140
141<form name="form2" method="post" action="<!--{$smaryt.server.PHP_SELF|escape}-->">
142  <h2>登録済みアンケート</h2>
143  <table class="list center">
144    <tr>
145      <th>編集</th>
146      <th>登録日</th>
147      <th>アンケートタイトル</th>
148      <th>ページ参照</th>
149      <th>結果取得</th>
150      <th>削除</th>
151    </tr>
152    <!--{section name=data loop=$list_data}-->
153    <tr <!--{if $list_data[data].question_id eq $smarty.request.question_id}--><!--{sfSetErrorStyle}--><!--{/if}-->>
154      <td class="main"><a href="<!--{$smarty.server.PHP_SELF|escape}-->?question_id=<!--{$list_data[data].question_id}-->">編集</a></td>
155      <td><!--{$list_data[data].disp_date}--></td>
156      <td class="left"><!--{$list_data[data].question_name|escape}--></td>
157      <td><a href="<!--{$smarty.const.SITE_URL}-->inquiry/index.php?question_id=<!--{$list_data[data].question_id}-->" target="_blank">参照</a></td>
158      <td><a href="<!--{$smarty.server.PHP_SELF|escape}-->?mode=csv&amp;question_id=<!--{$list_data[data].question_id}-->">download</a></td>
159      <td><a href="<!--{$smarty.server.PHP_SELF|escape}-->?mode=delete&amp;question_id=<!--{$list_data[data].question_id}-->" onClick="return delete_check()">削除</a></td>
160    </tr>
161    <!--{/section}-->
162  </table>
163</form>
164
165</div>
166
167<script type="text/javascript">
168<!--
169  <!--{section name=question loop=$cnt_question}-->
170    func_disp(<!--{$smarty.section.question.index}-->);
171  <!--{/section}--> 
172//-->
173</script>
174
Note: See TracBrowser for help on using the repository browser.