add check for oCaptcha

This commit is contained in:
Markus Gärtner 2024-06-25 10:04:06 +02:00
parent ffcfed8ba0
commit 61133da014
2 changed files with 32 additions and 28 deletions

View File

@ -1,19 +1,21 @@
[{assign var="oCaptcha" value=$oView->getCaptcha()}] [{assign var="oCaptcha" value=$oView->getCaptcha()}]
<input type="hidden" name="c_mach" value="[{$oCaptcha->getHash()}]"/> [{if $oCaptcha}]
<input type="hidden" name="c_mach" value="[{$oCaptcha->getHash()}]"/>
<div class="form-group verify"> <div class="form-group verify">
<label class="req control-label [{$labelCssClass}]" for="c_mac">[{oxmultilang ident="VERIFICATION_CODE"}]</label> <label class="req control-label [{$labelCssClass}]" for="c_mac">[{oxmultilang ident="VERIFICATION_CODE"}]</label>
<div class="[{$inputCssClass}] controls"> <div class="[{$inputCssClass}] controls">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon"> <span class="input-group-addon">
[{if $oCaptcha->isImageVisible()}] [{if $oCaptcha->isImageVisible()}]
<img src="[{$oCaptcha->getImageUrl()}]" alt=""> <img src="[{$oCaptcha->getImageUrl()}]" alt="">
[{else}] [{else}]
<span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span> <span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span>
[{/if}] [{/if}]
</span> </span>
<input type="text" data-fieldsize="verify" name="c_mac" value="" class="form-control js-oxValidate js-oxValidate_notEmpty" required> <input type="text" data-fieldsize="verify" name="c_mac" value="" class="form-control js-oxValidate js-oxValidate_notEmpty" required>
</div>
</div> </div>
</div> </div>
</div> [{/if}]

View File

@ -1,19 +1,21 @@
[{assign var="oCaptcha" value=$oView->getCaptcha()}] [{assign var="oCaptcha" value=$oView->getCaptcha()}]
<input type="hidden" name="c_mach" value="[{$oCaptcha->getHash()}]"/> [{if $oCaptcha}]
<input type="hidden" name="c_mach" value="[{$oCaptcha->getHash()}]"/>
<div class="form-group row verify"> <div class="form-group row verify">
<label class="req [{$labelCssClass}]" for="c_mac">[{oxmultilang ident="VERIFICATION_CODE"}]</label> <label class="req [{$labelCssClass}]" for="c_mac">[{oxmultilang ident="VERIFICATION_CODE"}]</label>
<div class="[{$inputCssClass}]"> <div class="[{$inputCssClass}]">
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" style="padding-right:15px"> <span class="input-group-addon" style="padding-right:15px">
[{if $oCaptcha->isImageVisible()}] [{if $oCaptcha->isImageVisible()}]
<img src="[{$oCaptcha->getImageUrl()}]" alt=""> <img src="[{$oCaptcha->getImageUrl()}]" alt="">
[{else}] [{else}]
<span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span> <span class="verificationCode" id="verifyTextCode">[{$oCaptcha->getText()}]</span>
[{/if}] [{/if}]
</span> </span>
<input type="text" data-fieldsize="verify" name="c_mac" value="" class="form-control js-oxValidate js-oxValidate_notEmpty" required> <input type="text" data-fieldsize="verify" name="c_mac" value="" class="form-control js-oxValidate js-oxValidate_notEmpty" required>
</div>
</div> </div>
</div> </div>
</div> [{/if}]