source: branches/version-2_11-dev/data/Smarty/templates/sphone/mypage/login.tpl @ 21144

Revision 21144, 4.4 KB checked in by nanasess, 13 years ago (diff)

#1413 ログインエラーを alert に

  • mypage/login.php を対応
  • 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-2011 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<!--▼CONTENTS-->
25<script>
26  function ajaxLogin() {
27      var postData = new Object;
28      postData['<!--{$smarty.const.TRANSACTION_ID_NAME}-->'] = "<!--{$transactionid}-->";
29      postData['mode'] = 'login';
30      postData['login_email'] = $('input[type=email]').val();
31      postData['login_pass'] = $('input[type=password]').val();
32      postData['url'] = $('input[name=url]').val();
33
34      $.ajax({
35          type: "POST",
36          url: "<!--{$smarty.const.HTTPS_URL}-->frontparts/login_check.php",
37          data: postData,
38          cache: false,
39          dataType: "json",
40          error: function(XMLHttpRequest, textStatus, errorThrown){
41              alert(textStatus);
42          },
43          success: function(result){
44              if (result.success) {
45                  location.href = result.success;
46              } else {
47                  alert(result.login_error);
48              }
49          }
50      });
51  }
52</script>
53<section id="slidewindow">
54
55<h2 class="title"><!--{$tpl_title|h}--></h2>
56     <form name="login_mypage" id="login_mypage" method="post" action="javascript:;" onsubmit="return ajaxLogin();">
57        <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
58        <input type="hidden" name="mode" value="login" />
59        <input type="hidden" name="url" value="<!--{$smarty.server.REQUEST_URI|h}-->" />
60
61<div class="login_area">
62
63    <div class="loginareaBox">
64          <!--{assign var=key value="login_email"}-->
65               <span class="attention"><!--{$arrErr[$key]}--></span>
66                  <input type="email" name="<!--{$key}-->" value="<!--{$tpl_login_email|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="mailtextBox data-role-none" placeholder="メールアドレス" />
67
68          <!--{assign var=key value="login_pass"}-->
69               <span class="attention"><!--{$arrErr[$key]}--></span>
70                  <input type="password" name="<!--{$key}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="passtextBox data-role-none" placeholder="パスワード" />
71
72</div><!--▲loginBox -->
73
74<p class="arrowRtxt"><a rel="external" href="<!--{$smarty.const.HTTPS_URL|sfTrimURL}-->/forgot/<!--{$smarty.const.DIR_INDEX_PATH}-->">パスワードを忘れた方</a></p>
75
76        <div class="btn_area">
77                                       <input type="submit" value="ログイン" class="btn data-role-none" name="log" id="log" />
78        </div>
79     </div><!--▲loginarea -->
80    </form>
81               
82                <form name="member_form2" id="member_form2" method="post" action="?">
83      <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
84      <input type="hidden" name="mode" value="nonmember" />
85      <div class="login_area_btm">
86        <nav>
87          <ul class="navBox">
88            <li><a rel="external" href="<!--{$smarty.const.ROOT_URLPATH}-->entry/kiyaku.php">新規会員登録</a></li>
89          </ul>
90        </nav>
91       <p>会員登録をすると便利なMyページをご利用いただけます。</p>
92      </div>
93   </form>
94  </section>
95        <!--▼検索バー -->
96<section id="search_area">
97<form method="get" action="<!--{$smarty.const.ROOT_URLPATH}-->products/list.php">
98<input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
99<input type="search" name="name" id="search" value="" placeholder="キーワードを入力" class="searchbox" >
100</form>
101</section>
102<!--▲検索バー -->
103 <!--▲コンテンツここまで -->
104
Note: See TracBrowser for help on using the repository browser.