Skip to content

Commit

Permalink
Fix thelia 2.5 form compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
zawaze committed May 28, 2024
1 parent f1ecac3 commit e03c9b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Config/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>2.0.0</version>
<version>2.0.1</version>
<authors>
<author>
<name>Franck Allimant</name>
Expand Down
6 changes: 4 additions & 2 deletions Controller/OrderEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
namespace PayzenEmbedded\Controller;

use PayzenEmbedded\Event\TransactionUpdateEvent;
use PayzenEmbedded\Form\TransactionGetForm;
use PayzenEmbedded\Form\TransactionUpdateForm;
use PayzenEmbedded\LyraClient\LyraTransactionGetWrapper;
use PayzenEmbedded\PayzenEmbedded;
use Symfony\Component\EventDispatcher\EventDispatcher;
Expand Down Expand Up @@ -49,7 +51,7 @@ public function updateTransaction(EventDispatcher $dispatcher, Translator $trans
$errorMsg = $ex = false;

// Create the Form from the request
$updateForm = $this->createForm('payzen_embedded.order-edit.form');
$updateForm = $this->createForm(TransactionUpdateForm::getName());

try {
// Check the form against constraints violations
Expand Down Expand Up @@ -103,7 +105,7 @@ public function refreshTransaction(EventDispatcher $dispatcher, Translator $tran
$errorMsg = $ex = false;

// Create the Form from the request
$getForm = $this->createForm('payzen_embedded.get.form');
$getForm = $this->createForm(TransactionGetForm::getName());

try {
// Check the form against constraints violations
Expand Down
4 changes: 2 additions & 2 deletions templates/backOffice/default/payzen-embedded/order-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{/ifloop}

{elseloop rel="transaction-history"}
{form name="payzen_embedded.get.form"}
{form name="payzen_embedded_get_form"}
{if $form_error}
<div class="alert alert-danger">{$form_error_message}</div>
{/if}
Expand Down Expand Up @@ -69,7 +69,7 @@
{intl l='You can update here the PayZen transaction related to this order. You can change the transaction amount (it should be greater or eaqual to the current amount), define the capture date (the date at which the payment is done), and the validation mode, to change manual validation to automatic validation of the transaction' d=$_d}
</div>
{loop type="order" name="order" customer="*" id=$order_id}
{form name="payzen_embedded.order-edit.form"}
{form name="payzen_embedded_order_edit_form"}
<form method="post" action="{url path="/admin/module/payzen-embedded/update-transaction/%order_id" order_id=$ID}">
{if $form_error}
<div class="alert alert-danger">{$form_error_message}</div>
Expand Down

0 comments on commit e03c9b8

Please # to comment.