From d8810b495fc5fcc62d157fdff0d619c2ab05d62c Mon Sep 17 00:00:00 2001 From: Florian Palme Date: Tue, 2 Jul 2019 16:00:08 +0200 Subject: [PATCH 1/2] moved code to its own template file and changed markup to match flow template --- application/views/blocks/captcha_form.tpl | 17 +---------------- application/views/tpl/oecaptcha.tpl | 21 +++++++++++++++++++++ metadata.php | 4 +++- 3 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 application/views/tpl/oecaptcha.tpl diff --git a/application/views/blocks/captcha_form.tpl b/application/views/blocks/captcha_form.tpl index 8f10081..a0487c1 100644 --- a/application/views/blocks/captcha_form.tpl +++ b/application/views/blocks/captcha_form.tpl @@ -1,18 +1,3 @@ [{$smarty.block.parent}] -[{assign var="oCaptcha" value=$oView->getCaptcha()}] - - -
  • - - [{assign var="oCaptcha" value=$oView->getCaptcha()}] - [{if $oCaptcha->isImageVisible()}] - - [{else}] - [{$oCaptcha->getText()}] - [{/if}] - -

    - [{oxmultilang ident="ERROR_MESSAGE_INPUT_NOTALLFIELDS"}] -

    -
  • +[{include file="oecaptcha.tpl"}] diff --git a/application/views/tpl/oecaptcha.tpl b/application/views/tpl/oecaptcha.tpl new file mode 100644 index 0000000..e00b907 --- /dev/null +++ b/application/views/tpl/oecaptcha.tpl @@ -0,0 +1,21 @@ +[{assign var="oCaptcha" value=$oView->getCaptcha()}] + + +
    + + +
    +
    + + [{if $oCaptcha->isImageVisible()}] + + [{else}] + [{$oCaptcha->getText()}] + [{/if}] + + +
    + +
    +
    \ No newline at end of file diff --git a/metadata.php b/metadata.php index 4a5fa21..33ce471 100755 --- a/metadata.php +++ b/metadata.php @@ -47,7 +47,9 @@ $aModule = array( 'oecaptcha' => 'oe/captcha/core/oecaptcha.php', 'oecaptchaEvents' => 'oe/captcha/core/oecaptchaevents.php', ), - 'templates' => array(), + 'templates' => array( + 'oecaptcha.tpl' => 'oe/captcha/application/views/tpl/oecaptcha.tpl', + ), 'blocks' => array( array('template' => 'form/contact.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'), array('template' => 'form/privatesales/invite.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'), From 8cfe123289b173bf4174835e244e9f61b06d8a48 Mon Sep 17 00:00:00 2001 From: Florian Palme Date: Tue, 2 Jul 2019 16:07:37 +0200 Subject: [PATCH 2/2] removed false markup --- application/views/tpl/oecaptcha.tpl | 2 -- 1 file changed, 2 deletions(-) diff --git a/application/views/tpl/oecaptcha.tpl b/application/views/tpl/oecaptcha.tpl index e00b907..b482fc4 100644 --- a/application/views/tpl/oecaptcha.tpl +++ b/application/views/tpl/oecaptcha.tpl @@ -15,7 +15,5 @@
    - -
    \ No newline at end of file