読み込みが終了しない場合は、しばらく待つか、リロードを行なってください。
If loading does not finish, wait for a while or reload.
エンジニア向けの情報を発信するブログです。
どなたでも発信できます。
お好きに利用していただれば幸いです。
📁 root/ec-cube/app/template/default/Mypage/change.twig {# 👇 ソースからコピペ #} {# This file is part of EC-CUBE Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. http://www.ec-cube.co.jp/ For the full copyright and license information, please view the LICENSE file that was distributed with this source code. #} {% extends 'default_frame.twig' %} {% set body_class = 'mypage' %} {% set mypageno = 'change' %} {% form_theme form 'Form/form_div_layout.twig' %} {% block javascript %} <script src="//yubinbango.github.io/yubinbango/yubinbango.js" charset="UTF-8"></script> {% endblock javascript %} {% block main %} <div class="ec-layoutRole__main"> <div class="ec-mypageRole"> <div class="ec-pageHeader"> <h1>{{ 'マイページ'|trans }}/{{ '会員情報編集'|trans }}</h1> </div> {% include 'Mypage/navi.twig' %} </div> <div class="ec-mypageRole"> <div class="ec-editRole"> <div class="ec-off1Grid"> <div class="ec-off1Grid__cell"> <form method="post" action="{{ url('mypage_change') }}" novalidate class="h-adr"> <span class="p-country-name" style="display:none;">Japan</span> {{ form_widget(form._token) }} <div class="ec-borderedDefs"> <dl> <dt> {{ form_label(form.name, 'お名前', { 'label_attr': { 'class': 'ec-label' }}) }} </dt> <dd> <div class="ec-halfInput{{ has_errors(form.name.name01, form.name.name02) ? ' error'}}"> {{ form_widget(form.name.name01, { 'attr': { 'placeholder': '姓' }}) }} {{ form_widget(form.name.name02, { 'attr': { 'placeholder': '名' }}) }} {{ form_errors(form.name.name01) }} {{ form_errors(form.name.name02) }} </div> </dd> </dl> <dl> <dt> {{ form_label(form.kana, 'お名前(カナ)', { 'label_attr': { 'class': 'ec-label' }}) }} </dt> <dd> <div class="ec-halfInput{{ has_errors(form.kana.kana01, form.kana.kana02) ? ' error'}}"> {{ form_widget(form.kana.kana01, { 'attr': { 'placeholder': 'セイ' }}) }} {{ form_widget(form.kana.kana02, { 'attr': { 'placeholder': 'メイ' }}) }} {{ form_errors(form.kana.kana01) }} {{ form_errors(form.kana.kana02) }} </div> </dd> </dl> {# 👇 こいつを2回表示したい #} <dl> <dt> {{ form_label(form.company_name, '会社名', { 'label_attr': { 'class': 'ec-label' }}) }} </dt> <dd> <div class="ec-halfInput{{ has_errors(form.company_name) ? ' error' }}"> {{ form_widget(form.company_name) }} {{ form_errors(form.company_name) }} </div> </dd> </dl> {# 以下省略 #}
📁 root/ec-cube/app/template/default/Mypage/change.twig {# This file is part of EC-CUBE Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. http://www.ec-cube.co.jp/ For the full copyright and license information, please view the LICENSE file that was distributed with this source code. #} {% extends 'default_frame.twig' %} {% set body_class = 'mypage' %} {% set mypageno = 'change' %} {% form_theme form 'Form/form_div_layout.twig' %} {% block javascript %} <script src="//yubinbango.github.io/yubinbango/yubinbango.js" charset="UTF-8"></script> {% endblock javascript %} {% block main %} <div class="ec-layoutRole__main"> <div class="ec-mypageRole"> <div class="ec-pageHeader"> <h1>{{ 'マイページ'|trans }}/{{ '会員情報編集'|trans }}</h1> </div> {% include 'Mypage/navi.twig' %} </div> <div class="ec-mypageRole"> <div class="ec-editRole"> <div class="ec-off1Grid"> <div class="ec-off1Grid__cell"> <form method="post" action="{{ url('mypage_change') }}" novalidate class="h-adr"> <span class="p-country-name" style="display:none;">Japan</span> {{ form_widget(form._token) }} <div class="ec-borderedDefs"> <dl> <dt> {{ form_label(form.name, 'お名前', { 'label_attr': { 'class': 'ec-label' }}) }} </dt> <dd> <div class="ec-halfInput{{ has_errors(form.name.name01, form.name.name02) ? ' error'}}"> {{ form_widget(form.name.name01, { 'attr': { 'placeholder': '姓' }}) }} {{ form_widget(form.name.name02, { 'attr': { 'placeholder': '名' }}) }} {{ form_errors(form.name.name01) }} {{ form_errors(form.name.name02) }} </div> </dd> </dl> <dl> <dt> {{ form_label(form.kana, 'お名前(カナ)', { 'label_attr': { 'class': 'ec-label' }}) }} </dt> <dd> <div class="ec-halfInput{{ has_errors(form.kana.kana01, form.kana.kana02) ? ' error'}}"> {{ form_widget(form.kana.kana01, { 'attr': { 'placeholder': 'セイ' }}) }} {{ form_widget(form.kana.kana02, { 'attr': { 'placeholder': 'メイ' }}) }} {{ form_errors(form.kana.kana01) }} {{ form_errors(form.kana.kana02) }} </div> </dd> </dl> <dl> <dt> {{ form_label(form.company_name, '会社名', { 'label_attr': { 'class': 'ec-label' }}) }} </dt> <dd> <div class="ec-halfInput{{ has_errors(form.company_name) ? ' error' }}"> {{ form_widget(form.company_name) }} {{ form_errors(form.company_name) }} </div> </dd> </dl> {# 👆こいつを👇以下のように複製 #} <dl> <dt> {{ form_label(form.company_name, '会社名', { 'label_attr': { 'class': 'ec-label' }}) }} </dt> <dd> <div class="ec-halfInput{{ has_errors(form.company_name) ? ' error' }}"> {{ form_widget(form.company_name) }} {{ form_errors(form.company_name) }} </div> </dd> </dl> {# 以下省略 #}
📁 root/ec-cube/app/template/default/Mypage/change.twig {# This file is part of EC-CUBE Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. http://www.ec-cube.co.jp/ For the full copyright and license information, please view the LICENSE file that was distributed with this source code. #} {% extends 'default_frame.twig' %} {% set body_class = 'mypage' %} {% set mypageno = 'change' %} {% form_theme form 'Form/form_div_layout.twig' %} {% block javascript %} <script src="//yubinbango.github.io/yubinbango/yubinbango.js" charset="UTF-8"></script> {% endblock javascript %} {% block main %} <div class="ec-layoutRole__main"> <div class="ec-mypageRole"> <div class="ec-pageHeader"> <h1>{{ 'マイページ'|trans }}/{{ '会員情報編集'|trans }}</h1> </div> {% include 'Mypage/navi.twig' %} </div> <div class="ec-mypageRole"> <div class="ec-editRole"> <div class="ec-off1Grid"> <div class="ec-off1Grid__cell"> <form method="post" action="{{ url('mypage_change') }}" novalidate class="h-adr"> <span class="p-country-name" style="display:none;">Japan</span> {{ form_widget(form._token) }} <div class="ec-borderedDefs"> <dl> <dt> {{ form_label(form.name, 'お名前', { 'label_attr': { 'class': 'ec-label' }}) }} </dt> <dd> <div class="ec-halfInput{{ has_errors(form.name.name01, form.name.name02) ? ' error'}}"> {{ form_widget(form.name.name01, { 'attr': { 'placeholder': '姓' }}) }} {{ form_widget(form.name.name02, { 'attr': { 'placeholder': '名' }}) }} {{ form_errors(form.name.name01) }} {{ form_errors(form.name.name02) }} </div> </dd> </dl> <dl> <dt> {{ form_label(form.kana, 'お名前(カナ)', { 'label_attr': { 'class': 'ec-label' }}) }} </dt> <dd> <div class="ec-halfInput{{ has_errors(form.kana.kana01, form.kana.kana02) ? ' error'}}"> {{ form_widget(form.kana.kana01, { 'attr': { 'placeholder': 'セイ' }}) }} {{ form_widget(form.kana.kana02, { 'attr': { 'placeholder': 'メイ' }}) }} {{ form_errors(form.kana.kana01) }} {{ form_errors(form.kana.kana02) }} </div> </dd> </dl> {# 👇 form_widgetで取得したhtmlを変数にセットしてしまう #} {% set company_name_form = form_widget(form.company_name) %} <dl> <dt> {{ form_label(form.company_name, '会社名', { 'label_attr': { 'class': 'ec-label' }}) }} </dt> <dd> <div class="ec-halfInput{{ has_errors(form.company_name) ? ' error' }}"> {# 👇 rawフィルターを使ってhtmlを出力する #} {{company_name_form|raw}} {{form_errors(form.company_name)}} </div> </dd> </dl> <dl> <dt> {{ form_label(form.company_name, '会社名', { 'label_attr': { 'class': 'ec-label' }}) }} </dt> <dd> <div class="ec-halfInput{{ has_errors(form.company_name) ? ' error' }}"> {# 👇 上記に同じ #} {{company_name_form|raw}} {{form_errors(form.company_name)}} </div> </dd> </dl> {# 以下省略 #}