source: branches/version-2_13-dev/data/Smarty/templates/admin/basis/mail.tpl @ 23063

Revision 23063, 5.3 KB checked in by pineray, 11 years ago (diff)

#2342 JavaScript?のグローバルな宣言を減らす
フォーム関連.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • 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-2013 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
25<script type="text/javascript">
26<!--
27var flag = 0;
28
29function setFlag(){
30    flag = 1;
31}
32function checkFlagAndSubmit(){
33    if ( flag == 1 ){
34        if( confirm("内容が変更されています。続行すれば変更内容は破棄されます。宜しいでしょうか?") ){
35            fnSetvalAndSubmit( 'form1', 'mode', 'id_set' );
36        } else {
37            return false;
38        }
39    } else {
40        fnSetvalAndSubmit( 'form1', 'mode', 'id_set' );
41    }
42}
43
44//-->
45</script>
46
47
48<form name="form1" id="form1" method="post" action="?">
49    <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
50    <input type="hidden" name="mode" value="regist" />
51    <div id="basis" class="contents-main">
52        <table>
53            <tr>
54                <th>テンプレート<span class="attention"> *</span></th>
55                <td>
56                <!--{assign var=key value="template_id"}-->
57                <!--{if $arrErr[$key]}-->
58                <span class="attention"><!--{$arrErr[$key]}--></span>
59                <!--{/if}-->
60                <select name="template_id" onChange="return checkFlagAndSubmit();" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
61                <option value="" selected="selected">選択してください</option>
62                <!--{html_options options=$arrMailTEMPLATE selected=$arrForm[$key]}-->
63                </select>
64                </td>
65            </tr>
66            <tr>
67                <th>メールタイトル<span class="attention"> *</span></th>
68                <td>
69                <!--{assign var=key value="subject"}-->
70                <!--{if $arrErr[$key]}-->
71                <span class="attention"><!--{$arrErr[$key]}--></span>
72                <!--{/if}-->
73                <input type="text" name="subject" value="<!--{$arrForm[$key]|h}-->" onChange="setFlag();" size="30" class="box30" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" />
74                </td>
75            </tr>
76            <tr>
77                <th>ヘッダー</th>
78                <td>
79                <!--{assign var=key value="header"}-->
80                <!--{if $arrErr[$key]}-->
81                <span class="attention"><!--{$arrErr[$key]}--></span>
82                <!--{/if}-->
83                <textarea name="header" cols="75" rows="12" class="area75" onChange="setFlag();" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"><!--{"\n"}--><!--{$arrForm[$key]|h}--></textarea><br />
84                <span class="attention"> (上限<!--{$smarty.const.LTEXT_LEN}-->文字)
85                </span>
86                <div>
87                    <a class="btn-normal" href="javascript:;" onclick="fnCharCount('form1','header','cnt_header'); return false;"><span>文字数カウント</span></a>
88                    今までに入力したのは
89                    <input type="text" name="cnt_header" size="4" class="box4" readonly="readonly" style="text-align:right" />
90                    文字です。
91                </div>
92                </td>
93            </tr>
94            <tr>
95                <th colspan="2" align="center">動的データ挿入部分</th>
96            </tr>
97            <tr>
98                <th>フッター</th>
99                <td>
100                <!--{assign var=key value="footer"}-->
101                <!--{if $arrErr[$key]}-->
102                <span class="attention"><!--{$arrErr[$key]}--></span>
103                <!--{/if}-->
104                <textarea name="footer" cols="75" rows="12" class="area75" onChange="setFlag();" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"><!--{"\n"}--><!--{$arrForm[$key]|h}--></textarea><br />
105                <span class="attention"> (上限<!--{$smarty.const.LTEXT_LEN}-->文字)</span>
106                <div>
107                    <a class="btn-normal" href="javascript:;" onclick="fnCharCount('form1','footer','cnt_footer'); return false;"><span>文字数カウント</span></a>
108                    今までに入力したのは
109                    <input type="text" name="cnt_footer" size="4" class="box4" readonly="readonly" style="text-align:right" />
110                    文字です。
111                </div>
112                </td>
113            </tr>
114        </table>
115
116        <div class="btn-area">
117            <ul>
118                <li><a class="btn-action" href="javascript:;" onclick="eccube.common.fnFormModeSubmit('form1', 'regist', '', ''); return false;"><span class="btn-next">この内容で登録する</span></a></li>
119            </ul>
120        </div>
121    </div>
122</form>
Note: See TracBrowser for help on using the repository browser.