Skip to content

Commit

Permalink
Merge pull request #503 from k-yamamura/bug_fix
Browse files Browse the repository at this point in the history
bug fix.
  • Loading branch information
chihiro-adachi committed Jul 1, 2015
2 parents 0104076 + 26ac104 commit 4ef1c4f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Eccube/Form/Type/BlockType.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'property' => 'id',
))
->add('id', 'hidden')
->addEventListener(FormEvents::POST_SUBMIT, function ($event) {
->addEventListener(FormEvents::POST_SUBMIT, function ($event) use ($app) {
$form = $event->getForm();
$file_name = $form['file_name']->getData();
$DeviceType = $form['DeviceType']->getData();
$block_id = $form['id']->getData();

$qb = $this->app['orm.em']->createQueryBuilder();
$qb = $app['orm.em']->createQueryBuilder();
$qb->select('b')
->from('Eccube\\Entity\\Block', 'b')
->where('b.file_name = :file_name')
Expand Down
4 changes: 2 additions & 2 deletions src/Eccube/Form/Type/MainEditType.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'property' => 'id',
))
->add('id', 'hidden')
->addEventListener(FormEvents::POST_SUBMIT, function ($event) {
->addEventListener(FormEvents::POST_SUBMIT, function ($event) use ($app) {
$form = $event->getForm();
$file_name = $form['file_name']->getData();
$DeviceType = $form['DeviceType']->getData();
$page_id = $form['id']->getData();

$qb = $this->app['orm.em']->createQueryBuilder();
$qb = $app['orm.em']->createQueryBuilder();
$qb->select('p')
->from('Eccube\\Entity\\PageLayout', 'p')
->where('p.file_name = :file_name')
Expand Down
2 changes: 1 addition & 1 deletion src/Eccube/Resource/template/admin/Content/file.twig
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
<div class="form-group form-inline">
<label class="col-sm-4 col-lg-3 control-label">フォルダ作成</label>
<div class="col-sm-8 col-lg-9">
<input type="text" name="create_file0" class="form-control" value="">
<input type="text" name="create_file" class="form-control" value="">
<a class="btn btn-default btn-sm" href="javascript:;" onclick="eccube.fileManager.setTreeStatus('tree_status');eccube.setModeAndSubmit('create','',''); return false;">作成</a>
</div>
</div>
Expand Down

0 comments on commit 4ef1c4f

Please sign in to comment.