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

Revision 18700, 8.9 KB checked in by nanasess, 14 years ago (diff)

Copyright の更新(#601)

  • Property svn:eol-style set to LF
  • Property svn:mime-type set to text/x-smarty-template; charset=UTF-8
Line 
1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2010 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="?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            <!--{assign var=index value=$smarty.section.question.index}-->
110            <tr id="Q<!--{$smarty.section.question.index|escape}-->-name">
111                <th rowspan="3">質問<!--{$smarty.section.question.iteration}--><!--{if $smarty.section.question.iteration eq 1}--><span class="attention">*</span><!--{/if}--></th>
112                <td>
113                    <input type="text" name="question[<!--{$index|escape}-->][name]" size="70" class="box70" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$smarty.post.question[$index].name|escape}-->" <!--{if $ERROR.question[$index].name}--><!--{sfSetErrorStyle}--><!--{/if}-->>
114                    <!--{if $ERROR.question[$index].name}--><br /><span class="attention"><!--{$ERROR.question[$index].name}--></span><!--{/if}-->
115                </td>
116            </tr>
117            <tr>
118                <td>
119                    <span style=background-color:"<!--{$ERROR_COLOR.question[$index].kind}-->">
120                    <!--{html_radios_ex onClick="func_disp(`$index`)" name="question[`$index`][kind]" options="$arrQuestion" selected="`$smarty.post.question[$index].kind`"}-->
121                    </span>
122                    <!--{if $ERROR.question[$index].kind}--><br><span class="red"><!--{$ERROR.question[$index].kind}--></span><!--{/if}-->
123                </td>
124            </tr>
125            <!--{* ▼回答 *}-->
126            <tr id="Q<!--{$index|escape}-->-option">
127                <td>
128                    <!--{section name=option loop=4 start=0 max=7}-->
129                        <div>
130                            <!--{assign var=option_index1 value=$smarty.section.option.index*2}-->
131                            <!--{assign var=option_index2 value=$option_index1+1}-->
132                            <!--{assign var=num1 value=$option_index1+1}-->
133                            <!--{assign var=num2 value=$option_index2+1}-->
134                            <!--{assign var=error1 value=$ERROR.question[$index].option[$option_index1]}-->
135                            <!--{assign var=error2 value=$ERROR.question[$index].option[$option_index2]}-->
136                            <!--{* 回答エラー *}-->
137                            <!--{if $error1}--><span class="red"><!--{$error1}--></span><br /><!--{/if}-->
138                            <!--{if $error2}--><span class="red"><!--{$error2}--></span><br /><!--{/if}-->
139                            <!--{* 回答フォーム *}-->
140                            <!--{$num1}--> <input type="text" name="question[<!--{$index|escape}-->][option][<!--{$option_index1|escape}-->]" size="40" class="box40" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$smarty.post.question[$index].option[$option_index1]|escape}-->" <!--{if $error1}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
141                            <!--{$num2}--> <input type="text" name="question[<!--{$index|escape}-->][option][<!--{$option_index2|escape}-->]" size="40" class="box40" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$smarty.post.question[$index].option[$option_index2]|escape}-->" <!--{if $error2}--><!--{sfSetErrorStyle}--><!--{/if}-->>
142                        </div>
143                    <!--{/section}-->
144                </td>
145            </tr>
146            <!--{* ▲回答 *}-->
147        <!--{/section}-->
148    </table>
149
150    <div class="btn">
151        <button type="submit"><span>登録する</span></button>
152        <button type="reset"><span>内容をクリア</span></button>
153    </div>
154</form>
155
156<form name="form2" method="post" action="?">
157    <h2>登録済みアンケート</h2>
158    <table class="list center">
159        <tr>
160            <th>編集</th>
161            <th>登録日</th>
162            <th>アンケートタイトル</th>
163            <th>ページ参照</th>
164            <th>結果取得</th>
165            <th>削除</th>
166        </tr>
167        <!--{section name=data loop=$list_data}-->
168        <tr <!--{if $list_data[data].question_id eq $smarty.request.question_id}--><!--{sfSetErrorStyle}--><!--{/if}-->>
169            <td class="main"><a href="<!--{$smarty.server.PHP_SELF|escape}-->?question_id=<!--{$list_data[data].question_id}-->">編集</a></td>
170            <td><!--{$list_data[data].disp_date}--></td>
171            <td class="left"><!--{$list_data[data].question_name|escape}--></td>
172            <td><a href="<!--{$smarty.const.SITE_URL}-->inquiry/<!--{$smarty.const.DIR_INDEX_URL}-->?question_id=<!--{$list_data[data].question_id}-->" target="_blank">参照</a></td>
173            <td><a href="<!--{$smarty.server.PHP_SELF|escape}-->?mode=csv&amp;question_id=<!--{$list_data[data].question_id}-->">download</a></td>
174            <td><a href="<!--{$smarty.server.PHP_SELF|escape}-->?mode=delete&amp;question_id=<!--{$list_data[data].question_id}-->" onClick="return delete_check()">削除</a></td>
175        </tr>
176        <!--{/section}-->
177    </table>
178</form>
179
180</div>
181
182<script type="text/javascript">
183<!--
184    <!--{section name=question loop=$cnt_question}-->
185        func_disp(<!--{$smarty.section.question.index}-->);
186    <!--{/section}-->
187//-->
188</script>
189
Note: See TracBrowser for help on using the repository browser.