Mercurial > hgrepos > hgweb.cgi > after5
comparison after5.rb @ 98:5e30d1645411 draft
Enclose checkbutton with label element
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Wed, 21 Aug 2019 10:02:12 +0900 |
parents | 65024f29b497 |
children | d765239327e0 |
comparison
equal
deleted
inserted
replaced
97:c0e61052aa37 | 98:5e30d1645411 |
---|---|
2 # -*- coding: euc-jp -*- | 2 # -*- coding: euc-jp -*- |
3 # | 3 # |
4 # Associative Scheduling Table - after5 | 4 # Associative Scheduling Table - after5 |
5 # (C)2003, 2004, 2006, 2008, 2012-2014 by HIROSE Yuuji [yuuji<at>gentei.org] | 5 # (C)2003, 2004, 2006, 2008, 2012-2014 by HIROSE Yuuji [yuuji<at>gentei.org] |
6 # $Id: after5.rb,v 1.20 2012/12/03 15:54:20 yuuji Exp $ | 6 # $Id: after5.rb,v 1.20 2012/12/03 15:54:20 yuuji Exp $ |
7 # Last modified Wed Jun 21 10:23:42 2017 on firestorm | 7 # Last modified Wed Aug 21 09:57:32 2019 on firestorm |
8 # See http://www.gentei.org/~yuuji/software/after5/ | 8 # See http://www.gentei.org/~yuuji/software/after5/ |
9 # このスクリプトはEUCで保存してください。 | 9 # このスクリプトはEUCで保存してください。 |
10 $hgid = <<_HGID_.split[1..-2].join(" ") | 10 $hgid = <<_HGID_.split[1..-2].join(" ") |
11 $HGid$ | 11 $HGid$ |
12 _HGID_ | 12 _HGID_ |
90 end | 90 end |
91 def hidden(name, value='') | 91 def hidden(name, value='') |
92 sprintf "<input type=\"hidden\" name=\"%s\" value=\"%s\">", name, value | 92 sprintf "<input type=\"hidden\" name=\"%s\" value=\"%s\">", name, value |
93 end | 93 end |
94 def radio(name, value, text='', checked=nil) | 94 def radio(name, value, text='', checked=nil) |
95 sprintf "<input type=\"radio\" name=\"%s\" value=\"%s\"%s>%s", | 95 sprintf "%s<input type=\"radio\" name=\"%s\" value=\"%s\"%s>%s%s", |
96 name, value, checked ? " checked" : "", text | 96 "<label>", name, value, checked ? " checked" : "", text, "</label>" |
97 end | 97 end |
98 def checkbox(name, value, text='', checked=nil) | 98 def checkbox(name, value, text='', checked=nil) |
99 sprintf "<input type=\"checkbox\" name=\"%s\" value=\"%s\"%s>%s", | 99 sprintf "%s<input type=\"checkbox\" name=\"%s\" value=\"%s\"%s>%s%s", |
100 name, value, checked ? " checked" : "", text | 100 "<label>", name, value, checked ? " checked" : "", text, "</label>" |
101 end | 101 end |
102 def submit(name, value, text='') | 102 def submit(name, value, text='') |
103 sprintf "<input type=\"submit\" name=\"%s\" value=\"%s\">%s\n", | 103 sprintf "<input type=\"submit\" name=\"%s\" value=\"%s\">%s\n", |
104 name, value, text | 104 name, value, text |
105 end | 105 end |