Add hoverHelp for the Tax screen.
Change tax rate to be an integer.
This commit is contained in:
parent
3b3a733a19
commit
4dfac86f2f
2 changed files with 50 additions and 16 deletions
|
|
@ -406,11 +406,11 @@ sub www_addTax {
|
||||||
unless $admin->canManage;
|
unless $admin->canManage;
|
||||||
my $params;
|
my $params;
|
||||||
my ($form) = $session->quick('form');
|
my ($form) = $session->quick('form');
|
||||||
$params->{country} = $form->get('country');
|
$params->{country} = $form->get('country', 'text');
|
||||||
$params->{state} = $form->get('state');
|
$params->{state} = $form->get('state', 'text');
|
||||||
$params->{city} = $form->get('city');
|
$params->{city} = $form->get('city', 'text');
|
||||||
$params->{code} = $form->get('code');
|
$params->{code} = $form->get('code', 'text');
|
||||||
$params->{taxRate} = $form->get('taxRate');
|
$params->{taxRate} = $form->get('taxRate', 'integer');
|
||||||
$self->add($params);
|
$self->add($params);
|
||||||
return $self->www_manage;
|
return $self->www_manage;
|
||||||
}
|
}
|
||||||
|
|
@ -538,24 +538,29 @@ sub www_manage {
|
||||||
|
|
||||||
my $addForm = WebGUI::HTMLForm->new($session,action=>$url->page('shop=tax;method=addTax'));
|
my $addForm = WebGUI::HTMLForm->new($session,action=>$url->page('shop=tax;method=addTax'));
|
||||||
$addForm->text(
|
$addForm->text(
|
||||||
label => $i18n->get('country'),
|
label => $i18n->get('country'),
|
||||||
name => 'country',
|
hoverHelp => $i18n->get('country help'),
|
||||||
|
name => 'country',
|
||||||
);
|
);
|
||||||
$addForm->text(
|
$addForm->text(
|
||||||
label => $i18n->get('state'),
|
label => $i18n->get('state'),
|
||||||
name => 'state',
|
hoverHelp => $i18n->get('state help'),
|
||||||
|
name => 'state',
|
||||||
);
|
);
|
||||||
$addForm->text(
|
$addForm->text(
|
||||||
label => $i18n->get('city'),
|
label => $i18n->get('city'),
|
||||||
name => 'city',
|
hoverHelp => $i18n->get('city help'),
|
||||||
|
name => 'city',
|
||||||
);
|
);
|
||||||
$addForm->text(
|
$addForm->text(
|
||||||
label => $i18n->get('code'),
|
label => $i18n->get('code'),
|
||||||
name => 'code',
|
hoverHelp => $i18n->get('code help'),
|
||||||
|
name => 'code',
|
||||||
);
|
);
|
||||||
$addForm->text(
|
$addForm->integer(
|
||||||
label => $i18n->get('tax rate'),
|
label => $i18n->get('tax rate'),
|
||||||
name => 'taxRate',
|
hoverHelp => $i18n->get('tax rate help'),
|
||||||
|
name => 'taxRate',
|
||||||
);
|
);
|
||||||
$addForm->submit(
|
$addForm->submit(
|
||||||
value => $i18n->get('add a tax'),
|
value => $i18n->get('add a tax'),
|
||||||
|
|
|
||||||
|
|
@ -10,29 +10,58 @@ our $I18N = {
|
||||||
context => q|The name of a country, such as Portugal or Canada.|,
|
context => q|The name of a country, such as Portugal or Canada.|,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'country help' => {
|
||||||
|
message => q|The name of the country that the tax applies to.|,
|
||||||
|
lastUpdated => 1205120607,
|
||||||
|
context => q|The name of a country, such as Portugal or Canada.|,
|
||||||
|
},
|
||||||
|
|
||||||
'state' => {
|
'state' => {
|
||||||
message => q|State|,
|
message => q|State|,
|
||||||
lastUpdated => 1205120615,
|
lastUpdated => 1205120615,
|
||||||
context => q|A political subdivision of a country, such as California.|,
|
context => q|A political subdivision of a country, such as California.|,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'state help' => {
|
||||||
|
message => q|The name of the state or province that the tax applies to.|,
|
||||||
|
lastUpdated => 1205120615,
|
||||||
|
context => q|A political subdivision of a country, such as California.|,
|
||||||
|
},
|
||||||
|
|
||||||
'city' => {
|
'city' => {
|
||||||
message => q|City|,
|
message => q|City|,
|
||||||
lastUpdated => 1205120661,
|
lastUpdated => 1205120661,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'city help' => {
|
||||||
|
message => q|The name of the city that the tax applies to.|,
|
||||||
|
lastUpdated => 1205120661,
|
||||||
|
},
|
||||||
|
|
||||||
'code' => {
|
'code' => {
|
||||||
message => q|Code|,
|
message => q|Code|,
|
||||||
lastUpdated => 1205120660,
|
lastUpdated => 1205120660,
|
||||||
context => q|A postal code, or zip code.|,
|
context => q|A postal code, or zip code.|,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'code help' => {
|
||||||
|
message => q|The postal or zip code that the tax applies to.|,
|
||||||
|
lastUpdated => 1205120660,
|
||||||
|
context => q|A postal code, or zip code.|,
|
||||||
|
},
|
||||||
|
|
||||||
'tax rate' => {
|
'tax rate' => {
|
||||||
message => q|Tax Rate|,
|
message => q|Tax Rate|,
|
||||||
lastUpdated => 1206302052,
|
lastUpdated => 1206302052,
|
||||||
context => q|The amount that a person is charged to buy something, a percentage of the price.|,
|
context => q|The amount that a person is charged to buy something, a percentage of the price.|,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'tax rate help' => {
|
||||||
|
message => q|Enter the tax as a percentage. For 5%, enter 5|,
|
||||||
|
lastUpdated => 1206302052,
|
||||||
|
context => q|The amount that a person is charged to buy something, a percentage of the price.|,
|
||||||
|
},
|
||||||
|
|
||||||
'delete' => {
|
'delete' => {
|
||||||
message => q|delete|,
|
message => q|delete|,
|
||||||
lastUpdated => 1206385749,
|
lastUpdated => 1206385749,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue