[Astpp-commit] SF.net SVN: astpp:[2229] trunk/web_interface/astpp-admin.cgi
Brought to you by:
darrenkw
From: <dar...@us...> - 2009-02-01 00:59:04
|
Revision: 2229 http://astpp.svn.sourceforge.net/astpp/?rev=2229&view=rev Author: darrenkw Date: 2009-02-01 00:59:00 +0000 (Sun, 01 Feb 2009) Log Message: ----------- Have interface return all accounts in the list field if the type is not specified. Modified Paths: -------------- trunk/web_interface/astpp-admin.cgi Modified: trunk/web_interface/astpp-admin.cgi =================================================================== --- trunk/web_interface/astpp-admin.cgi 2009-02-01 00:34:10 UTC (rev 2228) +++ trunk/web_interface/astpp-admin.cgi 2009-02-01 00:59:00 UTC (rev 2229) @@ -2192,6 +2192,7 @@ filename => '/var/lib/astpp/templates/account-list.tpl', die_on_bad_params => $config->{template_die_on_bad_params} ); + $params->{type} = -1 if !$params->{type}; # Default to listing all accounts; my $yes = gettext("YES"); my $no = gettext("NO"); return gettext("Cannot view account until database is configured") @@ -2380,6 +2381,7 @@ return gettext("Please configure 'Pricelists'") . "\n" unless @pricelists; if ( $params->{action} eq gettext("Generate Account") ) { + if ( $params->{logintype} == 1 || $params->{logintype} == 5 ) { my $pricelistinfo = &get_pricelist( $astpp_db, $params->{pricelist} ); @@ -2390,9 +2392,10 @@ $params->{count} = 1; $params->{pennies} = 0; $params->{number} = $params->{customnum}; + if ($params->{number} > 0) { $status .= &generate_accounts( $params, $config ); my $accountinfo = &get_account( $astpp_db, $params->{number} ); - ### Here we add support to add IAX and SIP devices at account creation. + ## Here we add support to add IAX and SIP devices at account creation. if ( $params->{SIP} ) { $config->{rt_sip_type} = $params->{devicetype}; $config->{ipaddr} = $params->{ipaddr}; @@ -2463,6 +2466,9 @@ } } ### End of Device creation support + } else { + $status = "No account number entered!"; + } } $template->param( pricelist_menu => popup_menu( @@ -2496,6 +2502,7 @@ accounttype_menu => popup_menu( -name => "accounttype", -values => \%types, + -labels => $types, -default => 0 ) ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |