diff options
author | levinse <levinse> | 2011-01-19 21:50:05 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-01-19 21:50:05 +0000 |
commit | 084fdb6ca683275964f29e42c6419d859084186f (patch) | |
tree | 67eb5699b9e21de201b909ed886a9af7a652c1c6 | |
parent | add94dc87400b5d19c80b23ec9a8627abba5dd26 (diff) |
Add experimental OpenSRS export changes, and svc_domain UI changes for .au registrations
-rw-r--r-- | FS/FS/Schema.pm | 2 | ||||
-rw-r--r-- | FS/FS/part_export/domreg_opensrs.pm | 8 | ||||
-rw-r--r-- | FS/FS/svc_domain.pm | 55 | ||||
-rwxr-xr-x | httemplate/edit/svc_domain.cgi | 17 |
4 files changed, 82 insertions, 0 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 6ac9923b0..fab562b2b 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -1775,6 +1775,8 @@ sub tables_hashref { 'setup_date', @date_type, '', '', 'renewal_interval', 'int', 'NULL', '', '', '', 'expiration_date', @date_type, '', '', + 'au_registrant_name', 'varchar', 'NULL', $char_d, '', '', + 'au_eligibility_type', 'varchar', 'NULL', $char_d, '', '', #communigate pro fields (quota = MaxAccountSize) 'max_accounts', 'int', 'NULL', '', '', '', 'trailer', 'text', 'NULL', '', '', '', diff --git a/FS/FS/part_export/domreg_opensrs.pm b/FS/FS/part_export/domreg_opensrs.pm index 6728e8cbc..0c7a95dcc 100644 --- a/FS/FS/part_export/domreg_opensrs.pm +++ b/FS/FS/part_export/domreg_opensrs.pm @@ -73,6 +73,9 @@ tie %options, 'Tie::IxHash', size => scalar(@tldlist), options => [ @tldlist ], default => 'com net org' }, + 'auoptions' => { label => 'Enable AU-specific registration fields', + type => 'checkbox' + }, ; %info = ( @@ -396,6 +399,11 @@ sub register { my $c = gen_contact_info($cust_main); + if ( $svc_domain->domain =~ /\.au$/ ) { + $c->{'registrant_name'} = $svc_domain->au_registrant_name; + $c->{'eligibility_type'} = $svc_domain->au_eligibility_type; + } + $err = validate_contact_info($c); return $err if $err; diff --git a/FS/FS/svc_domain.pm b/FS/FS/svc_domain.pm index a97f35bf8..9466b337c 100644 --- a/FS/FS/svc_domain.pm +++ b/FS/FS/svc_domain.pm @@ -89,6 +89,14 @@ FS::svc_Common. The following fields are currently supported: =item max_accounts +=item au_eligibility_type + +AU-specific field for domain registrations + +=item au_registrant_name + +AU-specific field for domain registrations + =back =head1 METHODS @@ -118,6 +126,16 @@ sub table_info { disable_inventory => 1, disable_select => 1, }, + 'au_registrant_name' => { label => 'AU Registrant Name', + disable_inventory => 1, + disable_select => 1, + }, + 'au_eligibility_type' => { label => 'AU Eligibility Type', + type => 'select', + select_list => __PACKAGE__->au_eligibility_type_values, + disable_inventory => 1, + disable_select => 1, + }, 'max_accounts' => { label => 'Maximum number of accounts', 'disable_inventory' => 1, }, @@ -287,6 +305,41 @@ sub search_sql { $class->search_sql_field('domain', $string); } +=item au_eligibility_type_values + +=cut + +sub au_eligibility_type_values { + + [ '', + 'Charity', + 'Child Care Centre', + 'Citizen/Resident', + 'Club', + 'Commercial Statutory Body', + 'Company', + 'Government School', + 'Higher Education Institution', + 'Incorporated Association', + 'Industry Body', + 'National Body', + 'Non-Government School', + 'Non-profit Organisation', + 'Other', + 'Partnership', + 'Pending TM Owner', + 'Political Party', + 'Pre-school', + 'Registered Business', + 'Religious/Church Group', + 'Research Organisation', + 'Sole Trader', + 'Trade Union', + 'Trademark Owner', + 'Training Organisation', + ]; + +} =item label @@ -523,6 +576,8 @@ sub check { #my $part_svc = $x; my $error = $self->ut_numbern('svcnum') + || $self->ut_textn('au_eligibility_type') + || $self->ut_textn('au_registrant_name') || $self->ut_numbern('catchall') || $self->ut_numbern('max_accounts') || $self->ut_anything('trailer') #well diff --git a/httemplate/edit/svc_domain.cgi b/httemplate/edit/svc_domain.cgi index 54a933dee..c3307fa8c 100755 --- a/httemplate/edit/svc_domain.cgi +++ b/httemplate/edit/svc_domain.cgi @@ -35,6 +35,23 @@ Available top-level domains: <% $export->option('tlds') %> </TR> +% if($export->option('auoptions')) { +% # XXX: this whole thing should be done like svc_Common with label_fixup, etc. eventually + <% include('/elements/tr-select.html', + 'field' => 'au_eligibiilty_type', + 'label' => 'AU Eligibility Type', + 'value' => $svc_domain->au_eligibility_type, + 'options' => $svc_domain->au_eligibility_type_values, + ) + %> + <% include('/elements/tr-input-text.html', + 'field' => 'au_registrant_name', + 'label' => 'AU Registrant Name', + 'value' => $svc_domain->au_registrant_name, + ) + %> +% } + % } </TD> </TR> |