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

Revision 22212, 6.6 KB checked in by yomoro, 11 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
RevLine 
[17073]1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
[21867]5 * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
[17073]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*}-->
[21539]24
[22212]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
[17605]84<form name="form1" id="form1" method="post" action="?">
[20407]85<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
[17351]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">
[17073]89
[20509]90    <table class="form">
91        <tr>
[22130]92            <th><!--{t string="tpl_022"}--></th>
[20509]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"/>
[22121]96                <span class="attention"> <!--{t string="tpl_023" T_FIELD=$smarty.const.SMTEXT_LEN}--></span>
[20509]97            </td>
98        </tr>
99        <tr>
[22130]100            <th><!--{t string="tpl_024_1"}--></th>
[20509]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}-->
[22212]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}-->" />
[20509]110                <br />
[22121]111                <span class="attention"><!--{t string="tpl_025"}--></span>
[20509]112            </td>
113        </tr>
114    </table>
[17073]115
[20509]116    <div class="btn-area">
117        <ul>
[22121]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>
[20509]119        </ul>
120    </div>
[17073]121
[20509]122    <table class="list">
[21344]123        <col width="50%" />
[21345]124        <col width="20%" />
125        <col width="10%" />
126        <col width="10%" />
127        <col width="20%" />
[20509]128        <tr>
[22121]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>
[20509]134        </tr>
135        <!--{section name=cnt loop=$arrHoliday}-->
[20598]136        <tr style="background:<!--{if $tpl_holiday_id != $arrHoliday[cnt].holiday_id}-->#ffffff<!--{else}--><!--{$smarty.const.SELECT_RGB}--><!--{/if}-->;">
[20509]137            <!--{assign var=holiday_id value=$arrHoliday[cnt].holiday_id}-->
138            <td><!--{$arrHoliday[cnt].title|h}--></td>
[22163]139            <td><!--{t string="tpl_727" T_FIELD1=$arrHoliday[cnt].month|h T_FIELD2=$arrHoliday[cnt].day|h}--></td>
[20509]140            <td class="center">
141                <!--{if $tpl_holiday_id != $arrHoliday[cnt].holiday_id}-->
[22121]142                <a href="?" onclick="fnModeSubmit('pre_edit', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;"><!--{t string="tpl_003"}--></a>
[20509]143                <!--{else}-->
[22121]144                <!--{t string="tpl_026"}-->
[20509]145                <!--{/if}-->
146            </td>
147            <td class="center">
148                <!--{if $arrClassCatCount[$class_id] > 0}-->
149                -
150                <!--{else}-->
[22121]151                <a href="?" onclick="fnModeSubmit('delete', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;"><!--{t string="tpl_004"}--></a>
[20509]152                <!--{/if}-->
153            </td>
154            <td class="center">
155                <!--{if $smarty.section.cnt.iteration != 1}-->
[22121]156                <a href="?" onclick="fnModeSubmit('up', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;" /><!--{t string="tpl_077"}--></a>
[20509]157                <!--{/if}-->
158                <!--{if $smarty.section.cnt.iteration != $smarty.section.cnt.last}-->
[22121]159                <a href="?" onclick="fnModeSubmit('down', 'holiday_id', <!--{$arrHoliday[cnt].holiday_id}-->); return false;" /><!--{t string="tpl_078"}--></a>
[20509]160                <!--{/if}-->
161            </td>
162        </tr>
163        <!--{/section}-->
164    </table>
[17351]165
166</div>
[17073]167</form>
Note: See TracBrowser for help on using the repository browser.