| 1 |
#?SuikaWikiConfig/2.0 |
| 2 |
|
| 3 |
Plugin: |
| 4 |
@Name: WikiFormButton |
| 5 |
@FullName: |
| 6 |
WikiForm: Common Buttons |
| 7 |
@Description: |
| 8 |
@@@: This module provides common buttons. |
| 9 |
@@lang: en |
| 10 |
@License: %%GPL%% |
| 11 |
@Author[list]: |
| 12 |
Wakaba <[email protected]> |
| 13 |
@Date.RCS: $Date: 2004/01/16 07:50:17 $ |
| 14 |
@RequiredModule[list]: |
| 15 |
WikiFormCore |
| 16 |
|
| 17 |
PluginConst: |
| 18 |
@NS_XHTML1: |
| 19 |
http://www.w3.org/1999/xhtml |
| 20 |
|
| 21 |
FormattingRule: |
| 22 |
@Category[list]: |
| 23 |
form-input |
| 24 |
@Name: mode-button |
| 25 |
@Description: |
| 26 |
@@@@: Submitting form button, with mode specification |
| 27 |
@@@lang:en |
| 28 |
@Parameter: |
| 29 |
@@Name: class |
| 30 |
@@Type: class-list |
| 31 |
@@Default:(none) |
| 32 |
@@Description: |
| 33 |
@@@@: Class name list |
| 34 |
@@@lang:en |
| 35 |
@Parameter: |
| 36 |
@@Name:description |
| 37 |
@@Type: CDATA |
| 38 |
@@Default:(none) |
| 39 |
@@Description: |
| 40 |
@@@@: Human readable long description text |
| 41 |
@@lang:en |
| 42 |
@Parameter: |
| 43 |
@@Name: label |
| 44 |
@@Type: CDATA |
| 45 |
@@Default:(implied) |
| 46 |
@@Description: |
| 47 |
@@@@: Label |
| 48 |
@@@lang:en |
| 49 |
@Parameter: |
| 50 |
@@Name: mode |
| 51 |
@@Type: mode |
| 52 |
@@Default: "default" |
| 53 |
@@Description: |
| 54 |
@@@@: Mode name |
| 55 |
@@@lang: en |
| 56 |
@Formatting: |
| 57 |
my $SUBMIT = $p->{-parent}->append_new_node |
| 58 |
(type => '#element', |
| 59 |
namespace_uri => $NS_XHTML1, |
| 60 |
local_name => 'input'); |
| 61 |
for ($SUBMIT) { |
| 62 |
$_->set_attribute (type => 'submit'); |
| 63 |
$_->set_attribute (name => 'mode'); |
| 64 |
__ATTRTEXT:%mode__; |
| 65 |
$_->set_attribute (value => $p->{mode} || 'default'); |
| 66 |
__ATTRTEXT:%class__;__ATTRTEXT:%description__;__ATTRTEXT:%accesskey__; |
| 67 |
$_->set_attribute (class => $p->{class}) if $p->{class}; |
| 68 |
$_->set_attribute (title => $p->{description}) if $p->{description}; |
| 69 |
$_->set_attribute (accesskey => $p->{accesskey}) if defined $p->{accesskey}; |
| 70 |
$_->set_attribute (disabled => 'disabled') if $o->{form}->{disabled}; |
| 71 |
__ATTRTEXT:%label__; |
| 72 |
$_->set_attribute (value => $p->{label} || $p->{mode} || 'default'); |
| 73 |
$_->option (use_EmptyElemTag => 1); |
| 74 |
} |
| 75 |
$o->{form}->{output}->{submit_button} = 0; |
| 76 |
$o->{form}->{output}->{mode_specification} = 0; |