diff options
author | ivan <ivan> | 2010-02-17 08:32:53 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-02-17 08:32:53 +0000 |
commit | cc647ae934abe5c9d9a5fc12f020adfc566349d9 (patch) | |
tree | c2181b801385a5b040186f9414c2a84e4cf20766 /httemplate | |
parent | af5b5947a7bcb13a94a84bb2b20c80a2778e0f35 (diff) |
communigate pro provisioning, RT#7083
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/edit/process/svc_domain.cgi | 6 | ||||
-rwxr-xr-x | httemplate/edit/svc_domain.cgi | 34 | ||||
-rwxr-xr-x | httemplate/view/svc_domain.cgi | 112 |
3 files changed, 119 insertions, 33 deletions
diff --git a/httemplate/edit/process/svc_domain.cgi b/httemplate/edit/process/svc_domain.cgi index 59b518097..d8c1a1298 100755 --- a/httemplate/edit/process/svc_domain.cgi +++ b/httemplate/edit/process/svc_domain.cgi @@ -24,10 +24,10 @@ my $new = new FS::svc_domain ( { my $error = ''; if ($cgi->param('svcnum')) { - $error="Can't modify a domain!"; + $error = $new->replace(); } else { - $error=$new->insert; - $svcnum=$new->svcnum; + $error = $new->insert; + $svcnum = $new->svcnum; } </%init> diff --git a/httemplate/edit/svc_domain.cgi b/httemplate/edit/svc_domain.cgi index 10079ce98..369d6a0fe 100755 --- a/httemplate/edit/svc_domain.cgi +++ b/httemplate/edit/svc_domain.cgi @@ -8,10 +8,18 @@ <INPUT TYPE="hidden" NAME="svcpart" VALUE="<% $svcpart %>"> <% ntable("#cccccc",2) %> + <TR> -<P>Domain <INPUT TYPE="text" NAME="domain" VALUE="<% $domain %>" SIZE=28 MAXLENGTH=63> -<BR> + <TD ALIGN="right">Domain</TD> + <TD> +% if ( !$svcnum || $conf->exists('svc_domain-edit_domain') ) { + <INPUT TYPE="text" NAME="domain" VALUE="<% $domain %>" SIZE=28 MAXLENGTH=63> +% } else { + <B><% $domain %></B> +% } + % if ($export) { +<BR> Available top-level domains: <% $export->option('tlds') %> </TR> @@ -27,11 +35,25 @@ Available top-level domains: <% $export->option('tlds') %> </TR> % } - -<TR> -<P><INPUT TYPE="submit" VALUE="Submit"> + </TD> </TR> + +% if ( $part_svc->part_svc_column('max_accounts')->columnflag =~ /^[FA]$/ ) { + <INPUT TYPE="hidden" NAME="max_accounts" VALUE="<% $svc_domain->max_accounts %>"> +% } else { + <TR> + <TD ALIGN="right">Maximum number of accounts</TD> + <TD> + <INPUT TYPE="text" NAME="max_accounts" SIZE=5 MAXLENGTH=6 VALUE="<% $svc_domain->max_accounts %>"> + </TD> + </TR> +% } + </TABLE> + +<BR> +<INPUT TYPE="submit" VALUE="Submit"> + </FORM> <% include('/elements/footer.html') %> @@ -41,6 +63,8 @@ Available top-level domains: <% $export->option('tlds') %> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific? +my $conf = new FS::Conf; + my($svcnum, $pkgnum, $svcpart, $kludge_action, $part_svc, $svc_domain); if ( $cgi->param('error') ) { diff --git a/httemplate/view/svc_domain.cgi b/httemplate/view/svc_domain.cgi index a9fc775ee..3f2d4736a 100755 --- a/httemplate/view/svc_domain.cgi +++ b/httemplate/view/svc_domain.cgi @@ -1,19 +1,48 @@ -<% include("/elements/header.html",'Domain View', menubar( - ( ( $pkgnum || $custnum ) - ? ( "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum", - ) - : ( "Delete this (unaudited) domain" => - "javascript:areyousure('${p}misc/cancel-unaudited.cgi?$svcnum', 'Delete $domain and all records?' )" ) - ) -)) %> +% if ( $custnum ) { + +%# <% include("/elements/header.html","View $svcdomain") %> + <% include("/elements/header.html","View domain") %> + <% include( '/elements/small_custview.html', $custnum, '', 1, + "${p}view/cust_main.cgi") %> + <BR> + +% } else { + + <% include("/elements/header.html",'View domain', menubar( + "Cancel this (unaudited) domain" => + "javascript:areyousure('${p}misc/cancel-unaudited.cgi?$svcnum', 'Delete $domain and all records?')", + )) + %> + +% } <% include('/elements/error.html') %> -Service #<% $svcnum %> -<BR>Service: <B><% $part_svc->svc %></B> -<BR>Domain name: <B><% $domain %></B> +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) { -<BR>Status: <B><% $status %></B> + <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> @@ -28,17 +57,30 @@ Service #<% $svcnum %> <A HREF="<% ${p} %>edit/process/domreg.cgi?op=revoke&svcnum=<% $svcnum %>">Revoke</A> % } % } + + </TD> + </TR> +% } + +% if ( $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') ) { - <BR>Catch all email <A HREF="<% ${p} %>misc/catchall.cgi?<% $svcnum %>">(change)</A>: -% } else { - <BR>Catch all email: + <A HREF="<% ${p} %>misc/catchall.cgi?<% $svcnum %>">(change)</A> % } + </TD> +</TR> + +</TABLE></TD></TR></TABLE> +<BR> -<% $email ? "<B>$email</B>" : "<I>(none)<I>" %> -<BR><BR><A HREF="<% ${p} %>misc/whois.cgi?custnum=<%$custnum%>;svcnum=<%$svcnum%>;domain=<%$domain%>">View whois information.</A> -<BR><BR> <SCRIPT> function areyousure(href, message) { if ( confirm(message) == true ) @@ -49,6 +91,7 @@ Service #<% $svcnum %> } </SCRIPT> +DNS records % my @records; if ( @records = $svc_domain->domain_record ) { <% include('/elements/table-grid.html') %> @@ -96,7 +139,6 @@ Service #<% $svcnum %> % } % if ( $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice') ) { - <BR> <FORM METHOD="POST" ACTION="<%$p%>edit/process/domain_record.cgi"> <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>"> <INPUT TYPE="text" NAME="reczone"> @@ -110,16 +152,12 @@ Service #<% $svcnum %> <INPUT TYPE="submit" VALUE="Add record"> </FORM> - <BR><BR> - or - <BR><BR> - <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 % } - Slave from nameserver IP + 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"> @@ -129,8 +167,30 @@ Service #<% $svcnum %> </FORM> % } +<BR> + +% my ( $settings, $defaults ) = $svc_domain->export_getsettings; +% if ( keys %$settings ) { + +%# XXX a way to label this "Communigate pro settings".. just a config maybe + External settings + <% ntable('#cccccc',2) %> + +% foreach my $key ( keys %$settings ) { + <TR> + <TD ALIGN="right"><% $key |h %></TD> + <TD BGCOLOR="<% $defaults->{$key} ? '#eeeeee' : '#ffffff' %>"> + <% $defaults->{$key} ? '<I>' : '<B>' %> + <% $settings->{$key} |h %> + <% $defaults->{$key} ? '</I>' : '</B>' %> + </TD> + </TR> +% } -<BR><BR> + </TABLE> + <BR> + +% } <% joblisting({'svcnum'=>$svcnum}, 1) %> @@ -140,6 +200,8 @@ Service #<% $svcnum %> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); +my $conf = new FS::Conf; + my($query) = $cgi->keywords; $query =~ /^(\d+)$/; my $svcnum = $1; |