source: branches/version-2_12-multilang/data/Smarty/templates/admin/order/pdf_input.tpl @ 22456

Revision 22456, 9.1 KB checked in by m_uehara, 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 
[18254]1<!--{*
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 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*}-->
[21539]24
[19805]25<!--{include file="`$smarty.const.TEMPLATE_ADMIN_REALDIR`admin_popup_header.tpl"}-->
[18254]26
27<script type="text/javascript">
28<!--
29self.moveTo(20,20);self.focus();
30
31function lfPopwinSubmit(formName) {
[20513]32    win02('about:blank','pdf','1000','900');
33    document[formName].target = "pdf";
34    document[formName].submit();
35    return false;
[18254]36}
[22395]37
38    $(function(){
39        console.log(ymd);
40        var dateFormat = $.datepicker.regional['<!--{$smarty.const.LANG_CODE}-->'].dateFormat;
41
42        <!--{if $arrForm.year != '' && $arrForm.month != '' && $arrForm.day != ''}-->
43        var year  = '<!--{$arrForm.year|h}-->';
44        var month = '<!--{$arrForm.month|h}-->';
45        var day   = '<!--{$arrForm.day|h}-->';
46        var ymd = $.datepicker.formatDate(dateFormat, new Date(year, month - 1, day));
47        $("#datepicker").val(ymd);
48        //console.log(ymd);
49        <!--{/if}-->
50
51        $( "#datepicker" ).datepicker({
52        beforeShowDay: function(date) {
53            if(date.getDay() == 0) {
54                return [true,"date-sunday"];
55            } else if(date.getDay() == 6){
56                return [true,"date-saturday"];
57            } else {
58                return [true];
59            }
60        }
61        ,changeMonth: 'true'
62        ,changeYear: 'true'
63        ,onSelect: function(dateText, inst){
64            var year  = inst.selectedYear;
65            var month = inst.selectedMonth + 1;
66            var day   = inst.selectedDay;
67            setDate(year + '/' + month + '/' + day);
68        },
69        showButtonPanel: true,
70        beforeShow: showAdditionalButton,
71        onChangeMonthYear: showAdditionalButton
72        });
73
74        $("#datepicker").change( function() {
75            var dateText   = $(this).val();
76            var dateFormat = $.datepicker.regional['<!--{$smarty.const.LANG_CODE}-->'].dateFormat;
77            // console.log(dateText);
78            // console.log(dateFormat);
79            var date;
80            var year  = '';
81            var month = '';
82            var day   = '';
83            try {
84                date = $.datepicker.parseDate(dateFormat, dateText);
85                year  = date.getFullYear();
86                month = date.getMonth() + 1;
[22456]87                day   = date.getDate();
[22395]88            } catch (e) {
89                // console.log(e);
90                // clear date text
91                $(this).val('');
92            }
93            setDate(year + '/' + month + '/' + day);
94        });
95
96    });
97
98    var btn = $('<button class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" type="button">Clear</button>');
99
100    var showAdditionalButton = function (input) {
101        setTimeout(function () {
102            var buttonPane = $(input)
103                     .datepicker("widget")
104                     .find(".ui-datepicker-buttonpane");
105            btn
106                    .unbind("click")
107                    .bind("click", function () {
108                        $.datepicker._clearDate(input);
109                        $("*[name=year]").val("");
110                        $("*[name=month]").val("");
111                        $("*[name=day]").val("");
112                    });
113            btn.appendTo(buttonPane);
114        }, 1);
115    };
116
117    function setDate(dateText){
118        var dates = dateText.split('/');
119        $("*[name=year]").val(dates[0]);
120        $("*[name=month]").val(dates[1]);
121        $("*[name=day]").val(dates[2]);
122    }
123
[18254]124//-->
125</script>
126
127<form name="form1" id="form1" method="post" action="?">
[20407]128<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
[18254]129<input type="hidden" name="mode" value="confirm" />
130<!--{foreach from=$arrForm.order_id item=order_id}-->
[20753]131    <input type="hidden" name="order_id[]" value="<!--{$order_id|h}-->">
[18254]132<!--{/foreach}-->
133
[22434]134<h2><!--コンテンツタイトル--><!--{t string="tpl_Ledger creation_01"}--></h2>
[18254]135
[20513]136<table class="form">
[21343]137    <col width="20%" />
138    <col width="80%" />
[18254]139    <tr>
[22422]140        <th><!--{t string="tpl_Order number_01"}--></th>
[20513]141        <td><!--{$arrForm.order_id|@join:', '}--></td>
[18254]142    </tr>
143    <tr>
[22434]144        <th><!--{t string="tpl_Issuance date<span class='attention'> *</span>_01" escape="none"}--></th>
[20513]145        <td><!--{if $arrErr.year}--><span class="attention"><!--{$arrErr.year}--></span><!--{/if}-->
[22395]146            <input id="datepicker"
147                   type="text"
148                   value="" <!--{if $arrErr.year != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />
149            <input type="hidden" name="year" value="<!--{$arrForm.year|h}-->" />
150            <input type="hidden" name="month" value="<!--{$arrForm.month|h}-->" />
151            <input type="hidden" name="day" value="<!--{$arrForm.day|h}-->" />
[20513]152        </td>
[18254]153    </tr>
154    <tr>
[22436]155        <th><!--{t string="tpl_Ledger type_01"}--></th>
[20513]156        <td><!--{if $arrErr.download}--><span class="attention"><!--{$arrErr.download}--></span><!--{/if}-->
157            <select name="type">
158            <!--{html_options options=$arrType selected=$arrForm.type}-->
159            </select>
160        </td>
[18254]161    </tr>
162    <tr>
[22436]163        <th><!--{t string="tpl_Download method_01"}--></th>
[20513]164        <td><!--{if $arrErr.download}--><span class="attention"><!--{$arrErr.download}--></span><!--{/if}-->
165            <select name="download">
166            <!--{html_options options=$arrDownload selected=$arrForm.download}-->
167            </select>
168        </td>
[18254]169    </tr>
170    <tr>
[22436]171        <th><!--{t string="tpl_Ledger title_01"}--></th>
[20513]172        <td><!--{if $arrErr.title}--><span class="attention"><!--{$arrErr.title}--></span><!--{/if}-->
173            <input type="text" name="title" size="40" value="<!--{$arrForm.title}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->"/><br />
[22436]174            <span style="font-size: 80%;"><!--{t string="tpl_* The default title is displayed when field is blank._01"}--></span><br />
[20513]175        </td>
[18254]176    </tr>
177    <tr>
[22436]178        <th><!--{t string="tpl_Ledger message_01"}--></th>
[20513]179        <td><!--{if $arrErr.msg1}--><span class="attention"><!--{$arrErr.msg1}--></span><!--{/if}-->
[22436]180            <!--{t string="tpl_1st line:_01"}--><input type="text" name="msg1" size="40" value="<!--{$arrForm.msg1|h}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->"/><br />
[20513]181            <!--{if $arrErr.msg2}--><span class="attention"><!--{$arrErr.msg1}--></span><!--{/if}-->
[22436]182            <!--{t string="tpl_2nd line:_01"}--><input type="text" name="msg2" size="40" value="<!--{$arrForm.msg2|h}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->"/><br />
[20513]183            <!--{if $arrErr.msg3}--><span class="attention"><!--{$arrErr.msg3}--></span><!--{/if}-->
[22436]184            <!--{t string="tpl_3rd line:_01"}--><input type="text" name="msg3" size="40" value="<!--{$arrForm.msg3|h}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->"/><br />
185            <span style="font-size: 80%;"><!--{t string="tpl_* The default message is displayed when fields are blank. _01"}--></span><br />
[20513]186        </td>
[18254]187    </tr>
188    <tr>
[22434]189        <th><!--{t string="tpl_Remarks_01"}--></th>
[20513]190        <td>
[22436]191            <!--{t string="tpl_1st line:_01"}--><input type="text" name="etc1" size="40" value="" maxlength="<!--{$smarty.const.STEXT_LEN}-->"/><br />
[20513]192            <!--{if $arrErr.etc2}--><span class="attention"><!--{$arrErr.msg1}--></span><!--{/if}-->
[22436]193            <!--{t string="tpl_2nd line:_01"}--><input type="text" name="etc2" size="40" value="" maxlength="<!--{$smarty.const.STEXT_LEN}-->"/><br />
[20513]194            <!--{if $arrErr.etc3}--><span class="attention"><!--{$arrErr.msg3}--></span><!--{/if}-->
[22436]195            <!--{t string="tpl_3rd line:_01"}--><input type="text" name="etc3" size="40" value="" maxlength="<!--{$smarty.const.STEXT_LEN}-->"/><br />
196            <span style="font-size: 80%;"><!--{t string="tpl_* Not displayed when fields are blank._01"}--></span><br />
[20513]197        </td>
[18254]198    </tr>
199    <!--{if $smarty.const.USE_POINT !== false}-->
[20513]200        <tr>
[22436]201            <th><!--{t string="tpl_Point notation_01"}--></th>
[20513]202            <td>
[22436]203                <input type="radio" name="disp_point" value="1" checked="checked" /><!--{t string="tpl_Yes_01"}-->&nbsp;<input type="radio" name="disp_point" value="0" /><!--{t string="tpl_No_01"}--><br />
204                <span style="font-size: 80%;"><!--{t string="tpl_* Even if 'Yes' is selected, it is not displayed unless the customer is a member._01"}--></span>
[20513]205            </td>
206        </tr>
[18254]207    <!--{else}-->
[20513]208        <input type="hidden" name="disp_point" value="0" />
[18254]209    <!--{/if}-->
[20513]210</table>
[18254]211
[20513]212<div class="btn-area">
[19909]213    <ul>
[22436]214        <li><a class="btn-action" href="javascript:;" onclick="return lfPopwinSubmit('form1');"><span class="btn-next"><!--{t string="tpl_Create using these contents_01"}--></span></a></li>
[19909]215    </ul>
[20513]216</div>
[18254]217
218</form>
219
[19805]220<!--{include file="`$smarty.const.TEMPLATE_ADMIN_REALDIR`admin_popup_footer.tpl"}-->
Note: See TracBrowser for help on using the repository browser.