summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-11-12 19:24:13 -0800
committerIvan Kohler <ivan@freeside.biz>2014-11-12 19:24:13 -0800
commitd8950e63d6c3f6fb910c28077e3a3e054ad12388 (patch)
treea269726f8cbdb7a40e269bbc8d097c7cb5e65bd3
parent051101dc91e9d6164cda897495880c8f2f7705be (diff)
add svc_domain.quota, RT#30832
-rw-r--r--FS/FS/Schema.pm12
-rw-r--r--FS/FS/svc_domain.pm42
-rwxr-xr-xhttemplate/edit/svc_domain.cgi11
-rw-r--r--httemplate/edit/svc_domain/communigate-basics.html2
-rw-r--r--httemplate/view/svc_domain/basics.html7
5 files changed, 62 insertions, 12 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index ce58dbf..396c866 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 9466b33..b01d673 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<FS::registrar>)
-=item registrarnum - Registrar (see L<FS::registrar>)
+=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 417b1b4..9b54422 100755
--- a/httemplate/edit/svc_domain.cgi
+++ b/httemplate/edit/svc_domain.cgi
@@ -56,6 +56,17 @@ Available top-level domains: <% $export->option('tlds') %>
</TD>
</TR>
+% if ( $part_svc->part_svc_column('quota')->columnflag =~ /^[FA]$/ ) {
+ <INPUT TYPE="hidden" NAME="quota" VALUE="<% $svc_domain->quota %>">
+% } else {
+ <TR>
+ <TD ALIGN="right">Quota</TD>
+ <TD>
+ <INPUT TYPE="text" NAME="quota" SIZE=8 VALUE="<% $svc_domain->quota %>">
+ </TD>
+ </TR>
+% }
+
<% 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 dbad35f..67f4428 100644
--- a/httemplate/edit/svc_domain/communigate-basics.html
+++ b/httemplate/edit/svc_domain/communigate-basics.html
@@ -26,7 +26,7 @@
<INPUT TYPE="hidden" NAME="cgp_aliases" VALUE="<% $svc_domain->cgp_aliases %>">
% }
-% if ( $part_svc->part_svc_column('max_accounts')->columnflag =~ /^[FA]$/ ) {
+% if ( ! $communigate || $part_svc->part_svc_column('max_accounts')->columnflag =~ /^[FA]$/ ) {
<INPUT TYPE="hidden" NAME="max_accounts" VALUE="<% $svc_domain->max_accounts %>">
% } else {
<TR>
diff --git a/httemplate/view/svc_domain/basics.html b/httemplate/view/svc_domain/basics.html
index 71b7ca4..3c3c5a0 100644
--- a/httemplate/view/svc_domain/basics.html
+++ b/httemplate/view/svc_domain/basics.html
@@ -63,6 +63,13 @@ Service #<B><% $svcnum %></B>
% }
+% if ( $svc_domain->quota ) {
+ <TR>
+ <TD ALIGN="right">Quota</TD>
+ <TD BGCOLOR="#ffffff"><% $svc_domain->quota %></TD>
+ </TR>
+% }
+
% if ( $communigate && $svc_domain->max_accounts ) {
<TR>
<TD ALIGN="right">Maximum number of Accounts</TD>