changeset 98:5e30d1645411 draft

Enclose checkbutton with label element
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 21 Aug 2019 10:02:12 +0900
parents c0e61052aa37
children 59a537e2abb8
files after5.rb
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/after5.rb	Wed Aug 21 10:01:50 2019 +0900
+++ b/after5.rb	Wed Aug 21 10:02:12 2019 +0900
@@ -4,7 +4,7 @@
 # Associative Scheduling Table - after5
 # (C)2003, 2004, 2006, 2008, 2012-2014 by HIROSE Yuuji [yuuji<at>gentei.org]
 # $Id: after5.rb,v 1.20 2012/12/03 15:54:20 yuuji Exp $
-# Last modified Wed Jun 21 10:23:42 2017 on firestorm
+# Last modified Wed Aug 21 09:57:32 2019 on firestorm
 # See http://www.gentei.org/~yuuji/software/after5/
 # このスクリプトはEUCで保存してください。
 $hgid = <<_HGID_.split[1..-2].join(" ")
@@ -92,12 +92,12 @@
     sprintf "<input type=\"hidden\" name=\"%s\" value=\"%s\">", name, value
   end
   def radio(name, value, text='', checked=nil)
-    sprintf "<input type=\"radio\" name=\"%s\" value=\"%s\"%s>%s",
-      name, value, checked ? " checked" : "", text
+    sprintf "%s<input type=\"radio\" name=\"%s\" value=\"%s\"%s>%s%s",
+      "<label>", name, value, checked ? " checked" : "", text, "</label>"
   end
   def checkbox(name, value, text='', checked=nil)
-    sprintf "<input type=\"checkbox\" name=\"%s\" value=\"%s\"%s>%s",
-      name, value, checked ? " checked" : "", text
+    sprintf "%s<input type=\"checkbox\" name=\"%s\" value=\"%s\"%s>%s%s",
+      "<label>", name, value, checked ? " checked" : "", text, "</label>"
   end
   def submit(name, value, text='')
     sprintf "<input type=\"submit\" name=\"%s\" value=\"%s\">%s\n",

yatex.org