You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
www_admin/root/tt/domain.tt

148 lines
6.5 KiB

<h3>Edit Domains</h3>
<div class="p1">
[% IF messages.edommsg %]<div class="goodmsg">[% messages.edommsg %]</div>[% END %]
[% IF messages.edomerr %]<div class="errormsg">[% messages.edomerr %]</div>[% END %]
<table class="domains">
<tr class="table_header">
<td>domain</td>
<td class="tdcenter" style="width:40px;" >local</td>
<td class="tdcenter" style="width:40px;" >cc</td>
<td style="width:150px;" >timezone</td>
<td style="width:40px;" />
<td style="width:60px;" />
</tr>
[% id = 0 %]
[% FOREACH domain = domains %]
<tr>
<td>
[% IF Catalyst.config.domain.rewrite_features
|| Catalyst.config.domain.vsc_features
|| Catalyst.config.domain.audiofile_features %]
<a href="/domain/detail?domain=[% domain.domain %]" class="aaction">[% domain.domain %]</a>
[% ELSE %]
[% domain.domain %]
[% END %]
</td>
[% IF domain.domain == edit_domain %]
<form action="/domain/do_edit_domain" method="post">
<input type="hidden" name="domain" value="[% domain.domain %]" />
<td class="tdcenter">
<input type="checkbox" class="checkbox" title="check if domain contains local users"
name="local" [% IF domain.local %]checked="checked"[% END %] />
</td>
<td class="tdcenter"><input class="irealshort" title="integer, country code"
name="cc" value="[% domain.cc %]" /></td>
<td>
<input type="text" class="imedium" title="string, timezone in continent/capital format"
name="timezone" value="[% domain.timezone %]" />
</td>
<td>
<div class="postlink">
<label for="domsave[% id %]">save</label>
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="domsave[% id %]" />
</div>
</td>
</form>
<td><a href="/domain" class="aaction">cancel</a></td>
[% ELSE %]
<td class="tdcenter">
<input type="checkbox" class="checkbox" name="local"
[% IF domain.local %]checked="checked"[% END %] disabled="disabled" />
</td>
<td class="tdcenter">[% domain.cc %]</td>
<td>[% domain.timezone %]</td>
<td>
[% UNLESS Catalyst.session.admin.read_only %]
<a href="/domain?edit_domain=[% domain.domain %]" class="aaction">edit</a>
[% END %]
</td>
<form action="/domain/do_delete_domain" method="post">
<input type="hidden" name="domain" value="[% domain.domain %]" />
<td>
[% UNLESS Catalyst.session.admin.read_only %]
<div class="postlink">
<label for="domdel[% id %]">delete</label>
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="domdel[% id %]" />
</div>
[% END %]
</td>
</form>
[% END %]
</tr>
[% IF domain.domain == edit_domain %]
[% IF messages.ecc || messages.etimezone %]
<tr><td colspan="6">
<div class="errormsg">
[% messages.ecc %]
[% IF messages.ecc && messages.etimezone %]<br />[% END %]
[% messages.etimezone %]
</div>
</td></tr>
[% END %]
[% END %]
[% id = id + 1 %]
[% END %]
</table>
</div>
[% UNLESS Catalyst.session.admin.read_only %]
<h3>Create domain</h3>
<div class="p1">
[% IF messages.cdommsg %]<div class="goodmsg">[% messages.cdommsg %]</div>[% END %]
[% IF messages.cdomerr %]<div class="errormsg">[% messages.cdomerr %]</div>[% END %]
<table class="domains">
<tr class="table_header">
<td>domain</td>
<td class="tdcenter" style="width:40px;" >local</td>
<td class="tdcenter" style="width:40px;" >cc</td>
<td style="width:150px;" >timezone</td>
<td style="width:40px;" />
<td style="width:60px;" />
</tr>
<form action="/domain/do_create_domain" method="post">
<tr>
<td>
<input type="text" size="20" name="domain" title="string, SIP domain"
id="domainaddtxt" value="[% arefill.domain %]" />
</td>
<td class="tdcenter">
<input type="checkbox" class="checkbox" title="check if domain contains local users"
name="local" [% IF arefill.local %]checked="checked"[% END %] />
</td>
<td class="tdcenter">
<input type="text" class="irealshort" title="integer, country code"
name="cc" value="[% arefill.cc %]" />
</td>
<td>
<input type="text" class="imedium" title="string, timezone in continent/capital format"
name="timezone" value="[% arefill.timezone %]" />
</td>
<td />
<td>
<div class="postlink">
<label for="domainadd">add</label>
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="domainadd" />
</div>
</td>
</tr>
[% IF messages.acc || messages.atimezone %]
<tr><td colspan="5">
<div class="errormsg">
[% messages.acc %]
[% IF messages.acc && messages.atimezone %]<br />[% END %]
[% messages.atimezone %]
</div>
</td></tr>
[% END %]
</form>
</table>
</div>
[% END %]