Skip to content

Commit 1bda24d

Browse files
kareilaalierak
authored andcommitted
add error on submit if no account type selected
1 parent 59849f2 commit 1bda24d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

bin/upgrading/en.dat

+2
Original file line numberDiff line numberDiff line change
@@ -5417,6 +5417,8 @@ widget.shopitemoptions.error.notforsale=This purchase type is currently not for
54175417

54185418
widget.shopitemoptions.error.notloggedin=You must be logged in as a personal account in order to purchase paid time for yourself.
54195419

5420+
widget.shopitemoptions.error.notype=Please select which type of account time you wish to purchase.
5421+
54205422
widget.shopitemoptions.error.nousers=There are currently no active free users.
54215423

54225424
widget.shopitemoptions.header.paid=Paid Account

cgi-bin/DW/Controller/Shop/Account.pm

+4
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ sub shop_account_handler {
137137
DW::Pay::validate_deliverydate( $post->{deliverydate}, $errors, $item_data );
138138
}
139139

140+
unless ( $post->{accttype} ) {
141+
$errors->add( 'accttype', 'widget.shopitemoptions.error.notype' );
142+
}
143+
140144
unless ( $errors->exist ) {
141145
$item_data->{anonymous} = 1
142146
if $post->{anonymous} || !$remote;

0 commit comments

Comments
 (0)