| @@ 67-88 (lines=22) @@ | ||
| 64 | $form = $builder->getForm();  | 
                                |
| 65 | $form->handleRequest($request);  | 
                                |
| 66 | ||
| 67 |         if ($form->isSubmitted() && $form->isValid()) { | 
                                |
| 68 |             if ($Customer->getPassword() === $app['config']['default_password']) { | 
                                |
| 69 | $Customer->setPassword($previous_password);  | 
                                |
| 70 |             } else { | 
                                |
| 71 | $Customer->setPassword(  | 
                                |
| 72 | $app['eccube.repository.customer']->encryptPassword($app, $Customer)  | 
                                |
| 73 | );  | 
                                |
| 74 | }  | 
                                |
| 75 | $app['orm.em']->flush();  | 
                                |
| 76 | ||
| 77 | $event = new EventArgs(  | 
                                |
| 78 | array(  | 
                                |
| 79 | 'form' => $form,  | 
                                |
| 80 | 'Customer' => $Customer,  | 
                                |
| 81 | ),  | 
                                |
| 82 | $request  | 
                                |
| 83 | );  | 
                                |
| 84 | $app['eccube.event.dispatcher']->dispatch(EccubeEvents::FRONT_MYPAGE_CHANGE_INDEX_COMPLETE, $event);  | 
                                |
| 85 | ||
| 86 |             return $app->redirect($app->url('mypage_change_complete')); | 
                                |
| 87 | }  | 
                                |
| 88 | ||
| 89 | $app['security']->getToken()->setUser($LoginCustomer);  | 
                                |
| 90 | ||
| 91 |         return $app->render('Mypage/change.twig', array( | 
                                |
| @@ 721-746 (lines=26) @@ | ||
| 718 | ||
| 719 | $form->handleRequest($request);  | 
                                |
| 720 | ||
| 721 |         if ($form->isSubmitted() && $form->isValid()) { | 
                                |
| 722 | // 会員の場合、お届け先情報を新規登録  | 
                                |
| 723 | $Shipping->setFromCustomerAddress($CustomerAddress);  | 
                                |
| 724 | ||
| 725 |             if ($Customer instanceof Customer) { | 
                                |
| 726 | $app['orm.em']->persist($CustomerAddress);  | 
                                |
| 727 | }  | 
                                |
| 728 | ||
| 729 | // 配送料金の設定  | 
                                |
| 730 | $app['eccube.service.shopping']->setShippingDeliveryFee($Shipping);  | 
                                |
| 731 | ||
| 732 | // 配送先を更新  | 
                                |
| 733 | $app['orm.em']->flush();  | 
                                |
| 734 | ||
| 735 | $event = new EventArgs(  | 
                                |
| 736 | array(  | 
                                |
| 737 | 'form' => $form,  | 
                                |
| 738 | 'Shipping' => $Shipping,  | 
                                |
| 739 | 'CustomerAddress' => $CustomerAddress,  | 
                                |
| 740 | ),  | 
                                |
| 741 | $request  | 
                                |
| 742 | );  | 
                                |
| 743 | $app['eccube.event.dispatcher']->dispatch(EccubeEvents::FRONT_SHOPPING_SHIPPING_EDIT_COMPLETE, $event);  | 
                                |
| 744 | ||
| 745 |             return $app->redirect($app->url('shopping')); | 
                                |
| 746 | }  | 
                                |
| 747 | ||
| 748 |         return $app->render('Shopping/shipping_edit.twig', array( | 
                                |
| 749 | 'form' => $form->createView(),  | 
                                |