[freeside-commits] freeside/httemplate/view/svc_domain acct_defaults.html, NONE, 1.1.2.2 basics.html, NONE, 1.1.2.2 dns.html, NONE, 1.1.2.2
Ivan,,,
ivan at wavetail.420.am
Mon Feb 22 01:14:37 PST 2010
Update of /home/cvs/cvsroot/freeside/httemplate/view/svc_domain
In directory wavetail.420.am:/tmp/cvs-serv21114/httemplate/view/svc_domain
Added Files:
Tag: FREESIDE_1_9_BRANCH
acct_defaults.html basics.html dns.html
Log Message:
communigate: domain account defaults, RT#7083
--- NEW FILE: basics.html ---
Service #<B><% $svcnum %></B>
% #if ( $conf->exists('svc_domain-edit_domain') ) {
| <A HREF="<%$p%>edit/svc_domain.cgi?<%$svcnum%>">Edit this domain</A>
% #}
<% &ntable("#cccccc") %><TR><TD><% &ntable("#cccccc",2) %>
<TR>
<TD ALIGN="right">Service</TD>
<TD BGCOLOR="#ffffff"><% $part_svc->svc %></TD>
</TR>
<TR>
<TD ALIGN="right">Domain</TD>
<TD BGCOLOR="#ffffff">
<B><% $domain %></B>
<A HREF="<% ${p} %>misc/whois.cgi?custnum=<%$custnum%>;svcnum=<%$svcnum%>;domain=<%$domain%>">(view whois information)</A>
</TD>
</TR>
% if ($export) {
<TR>
<TD ALIGN="right">Registration status</TD>
<TD BGCOLOR="#ffffff"><B><% $status %></B>
% if ( $FS::CurrentUser::CurrentUser->access_right('Manage domain registration') ) {
% if ( defined($ops{'register'}) ) {
<A HREF="<% ${p} %>edit/process/domreg.cgi?op=register&svcnum=<% $svcnum %>">Register at <% $registrar->{'name'} %></A>
% }
% if ( defined($ops{'transfer'}) ) {
<A HREF="<% ${p} %>edit/process/domreg.cgi?op=transfer&svcnum=<% $svcnum %>">Transfer to <% $registrar->{'name'} %></A>
% }
% if ( defined($ops{'renew'}) ) {
<A HREF="<% ${p} %>edit/process/domreg.cgi?op=renew&svcnum=<% $svcnum %>&period=1">Renew at <% $registrar->{'name'} %></A>
% }
% if ( defined($ops{'revoke'}) ) {
<A HREF="<% ${p} %>edit/process/domreg.cgi?op=revoke&svcnum=<% $svcnum %>">Revoke</A>
% }
% }
</TD>
</TR>
% }
% if ( $communigate ) {
<TR>
<TD ALIGN="right">Administrator domain</TD>
<TD BGCOLOR="#ffffff">
% if ( $svc_domain->parent_svcnum ) {
% #XXX agent-virt aware the link
<A HREF="svc_domain.cgi?<% $svc_domain->parent_svcnum %>"><% $svc_domain->parent_svc_x->domain %></A>
% } else {
<I>(none)</I>
% }
</TD>
</TR>
<TR>
<TD ALIGN="right">Aliases</TD>
<TD BGCOLOR="#ffffff"><% $svc_domain->cgp_aliases %></TD>
</TR>
% }
% if ( $communigate && $svc_domain->max_accounts ) {
<TR>
<TD ALIGN="right">Maximum number of Accounts</TD>
<TD BGCOLOR="#ffffff"><% $svc_domain->max_accounts %></TD>
</TR>
% }
<TR>
<TD ALIGN="right">Catch all email</TD>
<TD BGCOLOR="#ffffff"><% $email ? "<B>$email</B>" : '<I>(none)</I>' %>
% if ( $FS::CurrentUser::CurrentUser->access_right('Edit domain catchall') ) {
<A HREF="<% ${p} %>misc/catchall.cgi?<% $svcnum %>">(change)</A>
% }
</TD>
</TR>
<TR>
<TD ALIGN="right">Enabled services</TD>
<TD BGCOLOR="#ffffff"><% $svc_domain->cgp_accessmodes %></TD>
</TR>
</TABLE></TD></TR></TABLE>
<%init>
my($svc_domain, %opt) = @_;
my $svcnum = $svc_domain->svcnum;
my $domain = $svc_domain->domain;
my $custnum = $opt{'custnum'};
my $part_svc = $opt{'part_svc'};
my $communigate = scalar($part_svc->part_export('communigate_pro'));
# || scalar($part_svc->part_export('communigate_pro_singledomain'));
my $email = '';
if ($svc_domain->catchall) {
my $svc_acct = qsearchs('svc_acct',{'svcnum'=> $svc_domain->catchall } );
die "Unknown svcpart" unless $svc_acct;
$email = $svc_acct->email;
}
# Find the first export that does domain registration
my @exports = grep $_->can('registrar'), $part_svc->part_export;
my $export = $exports[0];
# If we have a domain registration export, get the registrar object
my $registrar;
my $status = 'Unknown';
my %ops = ();
if ($export) {
$registrar = $export->registrar;
my $domstat = $export->get_status( $svc_domain );
if (defined($domstat->{'message'})) {
$status = $domstat->{'message'};
} elsif (defined($domstat->{'unregistered'})) {
$status = 'Not registered';
$ops{'register'} = "Register";
} elsif (defined($domstat->{'status'})) {
$status = $domstat->{'status'} . ' ' . $domstat->{'contact_email'} . ' ' . $domstat->{'last_update_time'};
} elsif (defined($domstat->{'expdate'})) {
$status = "Expires " . $domstat->{'expdate'};
$ops{'renew'} = "Renew";
$ops{'revoke'} = "Revoke";
} else {
$status = $domstat->{'reason'};
$ops{'transfer'} = "Transfer";
}
}
</%init>
--- NEW FILE: dns.html ---
<SCRIPT>
function areyousure(href, message) {
if ( confirm(message) == true )
window.location.href = href;
}
function slave_areyousure() {
return confirm("Remove all records and slave from " + document.SlaveForm.recdata.value + "?");
}
</SCRIPT>
DNS records
% my @records; if ( @records = $svc_domain->domain_record ) {
<% include('/elements/table-grid.html') %>
% my $bgcolor1 = '#eeeeee';
% my $bgcolor2 = '#ffffff';
% my $bgcolor = $bgcolor2;
<tr>
<th CLASS="grid" BGCOLOR="#cccccc">Zone</th>
<th CLASS="grid" BGCOLOR="#cccccc">Type</th>
<th CLASS="grid" BGCOLOR="#cccccc">Data</th>
</tr>
% foreach my $domain_record ( @records ) {
% my $type = $domain_record->rectype eq '_mstr'
% ? "(slave)"
% : $domain_record->recaf. ' '. $domain_record->rectype;
<tr>
<td CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $domain_record->reczone %></td>
<td CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $type %></td>
<td CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $domain_record->recdata %>
% unless ( $domain_record->rectype eq 'SOA'
% || ! $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice')
% ) {
% ( my $recdata = $domain_record->recdata ) =~ s/"/\\'\\'/g;
(<A HREF="javascript:areyousure('<%$p%>misc/delete-domain_record.cgi?<%$domain_record->recnum%>', 'Delete \'<% $domain_record->reczone %> <% $type %> <% $recdata %>\' ?' )">delete</A>)
% }
</td>
</tr>
% if ( $bgcolor eq $bgcolor1 ) {
% $bgcolor = $bgcolor2;
% } else {
% $bgcolor = $bgcolor1;
% }
% }
</table>
% }
% if ( $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice') ) {
<FORM METHOD="POST" ACTION="<%$p%>edit/process/domain_record.cgi">
<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
<INPUT TYPE="text" NAME="reczone">
<INPUT TYPE="hidden" NAME="recaf" VALUE="IN"> IN
<SELECT NAME="rectype">
% foreach (qw( A NS CNAME MX PTR TXT) ) {
<OPTION VALUE="<%$_%>"><%$_%></OPTION>
% }
</SELECT>
<INPUT TYPE="text" NAME="recdata">
<INPUT TYPE="submit" VALUE="Add record">
</FORM>
<FORM NAME="SlaveForm" METHOD="POST" ACTION="<%$p%>edit/process/domain_record.cgi">
<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
% if ( @records ) {
Delete all records and
% }
Or slave from nameserver IP
<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
<INPUT TYPE="hidden" NAME="reczone" VALUE="@">
<INPUT TYPE="hidden" NAME="recaf" VALUE="IN">
<INPUT TYPE="hidden" NAME="rectype" VALUE="_mstr">
<INPUT TYPE="text" NAME="recdata">
<INPUT TYPE="submit" VALUE="Slave domain" onClick="return slave_areyousure()">
</FORM>
% }
<%init>
my($svc_domain, %opt) = @_;
my $svcnum = $svc_domain->svcnum;
</%init>
--- NEW FILE: acct_defaults.html ---
% if ( $communigate ) {
Account defaults
<% &ntable("#cccccc") %><TR><TD><% &ntable("#cccccc",2) %>
<% include('/view/elements/tr.html',
label=>'Password modification',
value=>$svc_domain->acct_def_password_selfchange ? 'YES' : 'NO',
)
%>
<% include('/view/elements/tr.html',
label=>'Password recovery',
value=>$svc_domain->acct_def_password_recover ? 'YES' : 'NO',
)
%>
<% include('/view/elements/tr.html',
label=>'Enabled services',
value=>$svc_domain->acct_def_cgp_accessmodes,
)
%>
<% include('/view/elements/tr.html',
label=>'Mail storage limit',
value=>$svc_domain->acct_def_quota,
)
%>
<% include('/view/elements/tr.html',
label=>'File storage limit',
value=>$svc_domain->acct_def_file_quota,
)
%>
<% include('/view/elements/tr.html',
label=>'Files limt',
value=>$svc_domain->acct_def_file_maxnum,
)
%>
<% include('/view/elements/tr.html',
label=>'File size limit',
value=>$svc_domain->acct_def_file_maxsize,
)
%>
<% include('/view/elements/tr.html',
label=>'Message delete method',
value=>$svc_domain->acct_def_cgp_deletemode,
)
%>
<% include('/view/elements/tr.html',
label=>'On logout remove trash',
value=>$svc_domain->acct_def_cgp_emptytrash,
)
%>
</TABLE></TD></TR></TABLE>
% }
<%init>
my($svc_domain, %opt) = @_;
my $part_svc = $opt{'part_svc'};
my $communigate = scalar($part_svc->part_export('communigate_pro'));
# || scalar($part_svc->part_export('communigate_pro_singledomain'));
</%init>
More information about the freeside-commits
mailing list