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