Author: michiel
Date: 2010-02-09 10:18:23 +0100 (Tue, 09 Feb 2010)
New Revision: 40918

Modified:
   
mmbase/branches/MMBase-1_9/applications/resources/src/main/resources/META-INF/tags/mm/resources/captcha.tagx
Log:
support for font

Modified: 
mmbase/branches/MMBase-1_9/applications/resources/src/main/resources/META-INF/tags/mm/resources/captcha.tagx
===================================================================
--- 
mmbase/branches/MMBase-1_9/applications/resources/src/main/resources/META-INF/tags/mm/resources/captcha.tagx
        2010-02-09 08:50:00 UTC (rev 40917)
+++ 
mmbase/branches/MMBase-1_9/applications/resources/src/main/resources/META-INF/tags/mm/resources/captcha.tagx
        2010-02-09 09:18:23 UTC (rev 40918)
@@ -21,6 +21,7 @@
   <jsp:directive.attribute name="fill"     type="java.lang.String" />
 
   <jsp:directive.attribute name="background" type="java.lang.String" />
+  <jsp:directive.attribute name="font" type="java.lang.String" />
 
   <!-- If the key is stated explicitely, no new key is generated, but this 
given one is shown. -->
   <jsp:directive.attribute name="key"      type="java.lang.String" />
@@ -29,6 +30,7 @@
     String text = null;;
     int length = 5;
     int swirl = 30;
+    String font = null;
   </jsp:scriptlet>
   <c:if test="${! empty template}">
     <mm:node>
@@ -47,6 +49,11 @@
       <jsp:scriptlet>text = k;</jsp:scriptlet>
     </mm:write>
   </c:if>
+  <c:if test="${! empty font}">
+    <mm:write referid="font" jspvar="f" vartype="string" write="false">
+      <jsp:scriptlet>font = f;</jsp:scriptlet>
+    </mm:write>
+  </c:if>
   <mm:import jspvar="fillColor" from="this" externid="fill">000000</mm:import>
   <mm:import jspvar="backgroundColor" from="this" 
externid="background">white</mm:import>
   <jsp:scriptlet>
@@ -57,6 +64,7 @@
     image.swirl = swirl;
     image.fillColor = fillColor;
     image.background = backgroundColor;
+    image.font = font;
     CaptchaDataType.createCaptchaImage(input, image);
 
     session.setAttribute("captchakey", image.text); // deprecated

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to