From: Ivan Kohler Date: Thu, 13 Nov 2014 03:24:13 +0000 (-0800) Subject: add svc_domain.quota, RT#30832 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=d8950e63d6c3f6fb910c28077e3a3e054ad12388 add svc_domain.quota, RT#30832 --- diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index ce58dbf67..396c86622 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -3717,20 +3717,27 @@ sub tables_hashref { 'suffix', 'varchar', 'NULL', $char_d, '', '', 'catchall', 'int', 'NULL', '', '', '', 'parent_svcnum', 'int', 'NULL', '', '', '', + 'quota', 'varchar', 'NULL', $char_d, '', '', + + #registration info 'registrarnum', 'int', 'NULL', '', '', '', 'registrarkey', 'varchar', 'NULL', 512, '', '', 'setup_date', @date_type, '', '', 'renewal_interval', 'int', 'NULL', '', '', '', 'expiration_date', @date_type, '', '', + + #some weird shit australia-specific shit? yuck.. seems totally unused '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', '', '', '', 'cgp_aliases', 'varchar', 'NULL', 255, '', '', 'cgp_accessmodes','varchar','NULL', 255, '', '', #DomainAccessModes 'cgp_certificatetype','varchar','NULL', $char_d, '', '', - #settings + + #(account default) settings 'acct_def_password_selfchange', 'char', 'NULL', 1, '', '', 'acct_def_password_recover', 'char', 'NULL', 1, 'Y', '', 'acct_def_cgp_accessmodes', 'varchar', 'NULL', 255, '', '', @@ -3743,7 +3750,8 @@ sub tables_hashref { 'acct_def_cgp_mailtoall', 'char', 'NULL', 1, '', '', 'acct_def_cgp_addmailtrailer', 'char', 'NULL', 1, '', '', 'acct_def_cgp_archiveafter', 'int', 'NULL', '', '', '', - #preferences + + #(account default) preferences 'acct_def_cgp_deletemode', 'varchar', 'NULL', $char_d, '', '', 'acct_def_cgp_emptytrash', 'varchar', 'NULL', $char_d, '', '', 'acct_def_cgp_language', 'varchar', 'NULL', $char_d, '', '', diff --git a/FS/FS/svc_domain.pm b/FS/FS/svc_domain.pm index 9466b337c..b01d67310 100644 --- a/FS/FS/svc_domain.pm +++ b/FS/FS/svc_domain.pm @@ -67,25 +67,43 @@ FS::svc_Common. The following fields are currently supported: =over 4 -=item svcnum - primary key (assigned automatically for new accounts) +=item svcnum + +primary key (assigned automatically for new accounts) =item domain -=item catchall - optional svcnum of an svc_acct record, designating an email catchall account. +=item catchall + +optional svcnum of an svc_acct record, designating an email catchall account. + +=item suffix + +=item parent_svcnum + +=item quota + +Storage limit -=item suffix - +=item registrarnum -=item parent_svcnum - +Registrar (see L) -=item registrarnum - Registrar (see L) +=item registrarkey -=item registrarkey - Registrar key or password for this domain +Registrar key or password for this domain -=item setup_date - UNIX timestamp +=item setup_date -=item renewal_interval - Number of days before expiration date to start renewal +UNIX timestamp -=item expiration_date - UNIX timestamp +=item renewal_interval + +Number of days before expiration date to start renewal + +=item expiration_date + +UNIX timestamp =item max_accounts @@ -139,6 +157,11 @@ sub table_info { 'max_accounts' => { label => 'Maximum number of accounts', 'disable_inventory' => 1, }, + 'quota' => { + label => 'Quota', #storage limit + type => 'text', + disable_inventory => 1, + }, 'cgp_aliases' => { label => 'Communigate aliases', type => 'text', @@ -580,6 +603,7 @@ sub check { || $self->ut_textn('au_registrant_name') || $self->ut_numbern('catchall') || $self->ut_numbern('max_accounts') + || $self->ut_alphan('quota') || $self->ut_anything('trailer') #well || $self->ut_textn('cgp_aliases') #well || $self->ut_enum('acct_def_password_selfchange', [ '', 'Y' ]) diff --git a/httemplate/edit/svc_domain.cgi b/httemplate/edit/svc_domain.cgi index 417b1b4c5..9b54422d3 100755 --- a/httemplate/edit/svc_domain.cgi +++ b/httemplate/edit/svc_domain.cgi @@ -56,6 +56,17 @@ Available top-level domains: <% $export->option('tlds') %> +% if ( $part_svc->part_svc_column('quota')->columnflag =~ /^[FA]$/ ) { + +% } else { + + Quota + + + + +% } + <% include('svc_domain/communigate-basics.html', 'svc_domain' => $svc_domain, 'part_svc' => $part_svc, diff --git a/httemplate/edit/svc_domain/communigate-basics.html b/httemplate/edit/svc_domain/communigate-basics.html index dbad35f1c..67f442842 100644 --- a/httemplate/edit/svc_domain/communigate-basics.html +++ b/httemplate/edit/svc_domain/communigate-basics.html @@ -26,7 +26,7 @@ % } -% if ( $part_svc->part_svc_column('max_accounts')->columnflag =~ /^[FA]$/ ) { +% if ( ! $communigate || $part_svc->part_svc_column('max_accounts')->columnflag =~ /^[FA]$/ ) { % } else { diff --git a/httemplate/view/svc_domain/basics.html b/httemplate/view/svc_domain/basics.html index 71b7ca4eb..3c3c5a046 100644 --- a/httemplate/view/svc_domain/basics.html +++ b/httemplate/view/svc_domain/basics.html @@ -63,6 +63,13 @@ Service #<% $svcnum %> % } +% if ( $svc_domain->quota ) { + + Quota + <% $svc_domain->quota %> + +% } + % if ( $communigate && $svc_domain->max_accounts ) { Maximum number of Accounts