source: branches/version-2_12-multilang/data/Smarty/templates/admin/basis/holiday.tpl @ 22212

Revision 22212, 6.6 KB checked in by yomoro, 8 years ago (diff)

#1987 (国際化テンプレート:年月日のセレクトボックス廃止)

  • 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-2012 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<!--
27$(function(){
28        $.datepicker.setDefaults( $.datepicker.regional[ "<!--{$smarty.const.LANG_CODE}-->" ] );
29       
30        $( "#datepicker" ).datepicker({
31        beforeShowDay: function(date) {
32            if(date.getDay() == 0) {
33                return [true,"date-sunday"];
34            } else if(date.getDay() == 6){
35                return [true,"date-saturday"];
36            } else {
37                return [true];
38            }
39        },changeMonth: 'true'
40        ,changeYear: 'false'
41        ,onSelect: function(dateText, inst){
42            setDate(dateText);
43        },
44        showButtonPanel: true,
45        beforeShow: showAdditionalButton,       
46        onChangeMonthYear: showAdditionalButton
47        });
48       
49        $("#datepicker").blur( function() {
50            var dateText = $(this).val();
51            setDate(dateText);
52        });
53       
54    });
55   
56    var btn = $('<button class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" type="button">Clear</button>');
57   
58    var showAdditionalButton = function (input) {
59        setTimeout(function () {
60            var buttonPane = $(input)
61                     .datepicker("widget")
62                     .find(".ui-datepicker-buttonpane");
63            btn
64                    .unbind("click")
65                    .bind("click", function () {
66                        $.datepicker._clearDate(input);
67                        $("*[name=year]").val("");
68                        $("*[name=month]").val("");
69                        $("*[name=day]").val("");
70                    });
71            btn.appendTo(buttonPane);
72        }, 1);
73    };
74   
75    function setDate(dateText){
76    var dates = dateText.split('/');
77    $("*[name=year]").val(dates[0]);
78    $("*[name=month]").val(dates[1]);
79    $("*[name=day]").val(dates[2]);
80    }
81//-->
82</script>
83
84<form name="form1" id="form1" method="post" action="?">
85<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
86<input type="hidden" name="mode" value="edit" />
87<input type="hidden" name="holiday_id" value="<!--{$tpl_holiday_id}-->" />
88<div id="basis" class="contents-main">
89
90    <table class="form">
91        <tr>
92            <th><!--{t string="tpl_022"}--></th>
93            <td>
94                <!--{if $arrErr.title}--><span class="attention"><!--{$arrErr.title}--></span><!--{/if}-->
95                <input type="text" name="title" value="<!--{$arrForm.title|h}-->" maxlength="<!--{$smarty.const.SMTEXT_LEN}-->" style="" size="60" class="box60"/>
96                <span class="attention"> <!--{t string="tpl_023" T_FIELD=$smarty.const.SMTEXT_LEN}--></span>
97            </td>
98        </tr>
99        <tr>
100            <th><!--{t string="tpl_024_1"}--></th>
101            <td>
102                <!--{if $arrErr.date || $arrErr.month || $arrErr.day}-->
103                <span class="attention"><!--{$arrErr.date}--></span>
104                <span class="attention"><!--{$arrErr.month}--></span>
105                <span class="attention"><!--{$arrErr.day}--></span>
106                <!--{/if}-->
107                <input id="datepicker" type="text" value="<!--{if $arrForm.month != "" && $arrForm.day != ""}-->/<!--{$arrForm.month|h|string_format:'%02d'}-->/<!--{$arrForm.day|h|string_format:'%02d'}--><!--{/if}-->" <!--{if $arrErr.year != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
108                <input type="hidden" name="month" value="<!--{$arrForm.month}-->" />
109                <input type="hidden" name="day" value="<!--{$arrForm.day}-->" />
110                <br />
111                <span class="attention"><!--{t string="tpl_025"}--></span>
112            </td>
113        </tr>
114    </table>
115
116    <div class="btn-area">
117        <ul>
118            <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('form1', 'edit', '', ''); return false;"><span class="btn-next"><!--{t string="tpl_021"}--></span></a></li>
119        </ul>
120    </div>
121
122    <table class="list">
123        <col width="50%" />
124        <col width="20%" />
125        <col width="10%" />
126        <col width="10%" />
127        <col width="20%" />
128        <tr>
129            <th><!--{t string="tpl_022"}--></th>
130            <th><!--{t string="tpl_024"}--></th>
131            <th class="edit"><!--{t string="tpl_003"}--></th>
132            <th class="delete"><!--{t string="tpl_004"}--></th>
133            <th><!--{t string="tpl_005"}--></th>
134        </tr>
135        <!--{section name=cnt loop=$arrHoliday}-->
136        <tr style="background:<!--{if $tpl_holiday_id != $arrHoliday[cnt].holiday_id}-->#ffffff<!--{else}--><!--{$smarty.const.SELECT_RGB}--><!--{/if}-->;">
137            <!--{assign var=holiday_id value=$arrHoliday[cnt].holiday_id}-->
138            <td><!--{$arrHoliday[cnt].title|h}--></td>
139            <td><!--{t string="tpl_727" T_FIELD1=$arrHoliday[cnt].month|h T_FIELD2=$arrHoliday[cnt].day|h}--></td>
140            <td class="center">
141                <!--{if $tpl_holiday_id != $arrHoliday[cnt].holiday_id}-->
142                <a href="?" onclick="fnModeSubmit('pre_edit', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;"><!--{t string="tpl_003"}--></a>
143                <!--{else}-->
144                <!--{t string="tpl_026"}-->
145                <!--{/if}-->
146            </td>
147            <td class="center">
148                <!--{if $arrClassCatCount[$class_id] > 0}-->
149                -
150                <!--{else}-->
151                <a href="?" onclick="fnModeSubmit('delete', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;"><!--{t string="tpl_004"}--></a>
152                <!--{/if}-->
153            </td>
154            <td class="center">
155                <!--{if $smarty.section.cnt.iteration != 1}-->
156                <a href="?" onclick="fnModeSubmit('up', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;" /><!--{t string="tpl_077"}--></a>
157                <!--{/if}-->
158                <!--{if $smarty.section.cnt.iteration != $smarty.section.cnt.last}-->
159                <a href="?" onclick="fnModeSubmit('down', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;" /><!--{t string="tpl_078"}--></a>
160                <!--{/if}-->
161            </td>
162        </tr>
163        <!--{/section}-->
164    </table>
165
166</div>
167</form>
Note: See TracBrowser for help on using the repository browser.