49 |
wiki => $o->{wiki})); |
wiki => $o->{wiki})); |
50 |
$p->{-result} .= "\n"; |
$p->{-result} .= "\n"; |
51 |
|
|
52 |
|
FormattingRule: |
53 |
|
@Category[list]: form-input |
54 |
|
@Name: radio |
55 |
|
@Description: |
56 |
|
@@@: One of one-from-many selection |
57 |
|
@@lang: en |
58 |
|
@Parameter: |
59 |
|
@@Name: default |
60 |
|
@@Type: boolean |
61 |
|
@@Default: "0" |
62 |
|
@@Description: |
63 |
|
@@@@: Initial value |
64 |
|
@@@lang: en |
65 |
|
@Parameter: |
66 |
|
@@Name: desription |
67 |
|
@@Type: text |
68 |
|
@@Default: (none) |
69 |
|
@@Description: |
70 |
|
@@@@: Human readable description about this selection |
71 |
|
@@@lang: en |
72 |
|
@Parameter: |
73 |
|
@@Name: label |
74 |
|
@@Type: text |
75 |
|
@@Default: (none) |
76 |
|
@@Description: |
77 |
|
@@@@: A label descripting the selection |
78 |
|
@@@lang: en |
79 |
|
@Parameter: |
80 |
|
@@Name: value |
81 |
|
@@Type: text |
82 |
|
@@Default: (auto) |
83 |
|
@@Description: |
84 |
|
@@@@: Form control value returned when selected |
85 |
|
@@@lang: en |
86 |
|
@Formatting: |
87 |
|
SuikaWiki::Plugin->module_package ('Error') |
88 |
|
->report_error_simple ($o->{wiki}, |
89 |
|
WikiForm => SuikaWiki::Plugin->module_package ('WikiResource')->get_text |
90 |
|
(name => 'Obsolete:WikiForm:%radio', |
91 |
|
param => $o, |
92 |
|
wiki => $o->{wiki})); |
93 |
|
my $id = SuikaWiki::Plugin->module_package ('WikiFormCore') |
94 |
|
->control_id ($o, |
95 |
|
local_id => $p->{id}, |
96 |
|
require_local_id => 1); |
97 |
|
my $check = $p->{-parent}->append_new_node |
98 |
|
(type => '#element', |
99 |
|
namespace_uri => $NS_XHTML1, |
100 |
|
local_name => 'input'); |
101 |
|
$check->set_attribute (type => 'radio'); |
102 |
|
$check->set_attribute (name => $id->{local_id}); |
103 |
|
__ATTRTEXT:%value__;__ATTRTEXT:%default__;__ATTRTEXT:%description__; |
104 |
|
$check->set_attribute (checked => 'checked') if $p->{default}; |
105 |
|
$check->set_attribute (value => $p->{value}) if length $p->{value}; |
106 |
|
$check->set_attribute (disabled => 'disabled') if $o->{form}->{disabled}; |
107 |
|
$check->set_attribute (title => $p->{description}) |
108 |
|
if length $p->{description}; |
109 |
|
|
110 |
|
__ATTRNODE:%label__; |
111 |
|
if ($p->{label}->count) { |
112 |
|
$check->set_attribute (id => $id->{global_id}); |
113 |
|
my $label = $p->{-parent}->append_new_node |
114 |
|
(type => '#element', |
115 |
|
namespace_uri => $NS_XHTML1, |
116 |
|
local_name => 'label'); |
117 |
|
$label->set_attribute (for => $id->{global_id}); |
118 |
|
$label->append_node ($p->{label}); |
119 |
|
$label->set_attribute (title => $p->{description}) |
120 |
|
if length $p->{description}; |
121 |
|
} |
122 |
|
|
123 |
Resource: |
Resource: |
124 |
@Obsolete:WikiForm:n: |
@Obsolete:WikiForm:n: |
125 |
@@@: Formatting rule "n" is obsolete. Use "line" instead. |
@@@: Formatting rule "n" is obsolete. Use "line" instead. |
126 |
@@lang:en |
@@lang:en |
127 |
|
@Obsolete:WikiForm:%radio: |
128 |
|
@@@: Formatting rule "radio" is obsolete. |
129 |
|
@@lang: en |
130 |
|
|
131 |
|
|
132 |
|
|