From 2b49cbe76b94c6c1561aa2bf37beba7d47591190 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 24 Aug 2005 13:22:27 +0000 Subject: customer edit: abstract out billing info to billing.html, re-do payment type selection with HTML::Widgets::SelectLayers, add Switch/Solo/Maestro support for start date & issue #. customer view: re-order fields for consistency. selfservice API: support paystart_month, paystart_year, payissue and payip in MyAccount::process_payment and ::edit_info and Signup::new_customer, FS::cust_main::realtime_bop: support paystart_month paystart_year payissue payip fields --- httemplate/elements/select-month_year.html | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 httemplate/elements/select-month_year.html (limited to 'httemplate/elements/select-month_year.html') diff --git a/httemplate/elements/select-month_year.html b/httemplate/elements/select-month_year.html new file mode 100644 index 000000000..a0ea74ddd --- /dev/null +++ b/httemplate/elements/select-month_year.html @@ -0,0 +1,50 @@ +<% + + my %opt = @_; + + my $prefix = $opt{'prefix'} || ''; + my $disabled = $opt{'disabled'} || ''; + my $empty = $opt{'empty_option'} || ''; + my $date = $opt{'selected_date'} || ''; + $date = '' if $date eq '-'; + #$date ||= '01-2000' unless $empty; + my $start_year = $opt{'start_year'}; + my $end_year = $opt{'end_year'} || '2037'; + + my( $mon, $year ) = (0, 0); + if ( $date ) { + if ( $date =~ /^(\d{4})-(\d{1,2})-\d{1,2}$/ ) { #PostgreSQL date format + ( $mon, $year ) = ( $2, $1 ); + } elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) { + ( $mon, $year ) = ( $1, $3 ); + } else { + die "unrecognized expiration date format: $date"; + } + } + + unless ( $start_year ) { + my @t = localtime; + $start_year = $t[5] + 1900; + } + $start_year = $year if $start_year > $year && $year > 0; + +%> + +/ + -- cgit v1.2.1