• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.1.0
    • 1.0.0
    • None
    • 4.8.0 M5

      How to reproduce it :

      • with the template web on dev mode, add the plugin in the ivy-webapp.xml : <dependency org="org.ametys.plugins" name="captchetat" branch="1.1.x" rev="latest.integration" conf="cms_compile_dependencies->compile_dependencies;cms_runtime_dependencies->runtime_dependencies;cms_compile,cms_runtime->runtime"/>
      • launch again the dev mode, resolve and restart the tomcat
      • Configure the captcha in the _admin
      • disable the conf of a template page
      • add a category of newsletter
      • on a page with template page add the subscribe service
      • put reader right on the page to have the captcha

      > the label of the captcha is missing. On the documentation we can see a screenshot with the label rewritted into the placeholder so perhaps we lost it ? Wanted label ...

          [CAPTCHETAT-2] The label of the captcha is missing

          Laurence Aumeunier added a comment - - edited

          Le label is not part of the "captcha" template.
          Each caller of this template should handle its own label using for example:

          <xsl:if test="captcha:requiresUserInteraction()">
                      <div class="label">
                          <label for="captcha"><i18n:text i18n:key="NEWSLETTERS_SERVICE_INPUT_CAPTCHA"/></label>
                      </div>
                  </xsl:if>
          

          If placeholder is needed, you should call "captcha" template with your own placeholder.
          For example:

          <xsl:call-template name="captcha">
          		            <xsl:with-param name="key-name" select="'CaptchaKey'"/>
          		
          		            <xsl:with-param name="value-name" select="'Captcha'"/>
          		            <xsl:with-param name="value-id" select="concat('captcha-', $uniqueId)"/>
          		            <xsl:with-param name="value-class">captcha</xsl:with-param>
          		
          		            <xsl:with-param name="image-alt"/>
          		            <xsl:with-param name="image-alt-i18n" select="false()"/>
          		            <xsl:with-param name="image-class">captcha-image</xsl:with-param>
          		            
          		            <xsl:with-param name="image-height">50</xsl:with-param>
          		            <xsl:with-param name="image-width">160</xsl:with-param>
          		            
          		            <xsl:with-param name="placeholder" select="substring-after($placeholder, ':')"/>
          		            <xsl:with-param name="placeholder-i18n" select="true()"/>
          		            <xsl:with-param name="placeholder-catalogue" select="substring-before($placeholder, ':')"/>
          		        </xsl:call-template>
          

          There is some use where label is displayed only if captcha implementation is "jcaptcha". It should be fixed.

          Laurence Aumeunier added a comment - - edited Le label is not part of the "captcha" template. Each caller of this template should handle its own label using for example: < xsl:if test= "captcha:requiresUserInteraction()" > <div class= "label" > <label for= "captcha" > <i18n:text i18n:key= "NEWSLETTERS_SERVICE_INPUT_CAPTCHA" /> </label> </div> </ xsl:if > If placeholder is needed, you should call "captcha" template with your own placeholder. For example: < xsl:call-template name= "captcha" > < xsl:with-param name= "key-name" select= " 'CaptchaKey' " /> < xsl:with-param name= "value-name" select= " 'Captcha' " /> < xsl:with-param name= "value-id" select= "concat( 'captcha-' , $uniqueId)" /> < xsl:with-param name= "value-class" > captcha </ xsl:with-param > < xsl:with-param name= "image-alt" /> < xsl:with-param name= "image-alt-i18n" select= "false()" /> < xsl:with-param name= "image-class" > captcha-image </ xsl:with-param > < xsl:with-param name= "image-height" > 50 </ xsl:with-param > < xsl:with-param name= "image-width" > 160 </ xsl:with-param > < xsl:with-param name= "placeholder" select= "substring-after($placeholder, ':' )" /> < xsl:with-param name= "placeholder-i18n" select= "true()" /> < xsl:with-param name= "placeholder-catalogue" select= "substring-before($placeholder, ':' )" /> </ xsl:call-template > There is some use where label is displayed only if captcha implementation is "jcaptcha". It should be fixed.

            laurence Laurence Aumeunier
            llopez Laure Lopez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: