mirror of https://github.com/sipwise/www_admin.git
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.
91 lines
4.5 KiB
91 lines
4.5 KiB
<h3> Audio Files for Subscriber
|
|
<a class="noarrow" href="detail?subscriber_id=[% subscriber_id %]">
|
|
[% subscriber.username %]@[% subscriber.domain %]</a>
|
|
</h3>
|
|
|
|
<a href="preferences?subscriber_id=[% subscriber_id %]&#audio"><span class="button-back">Back</span></a>
|
|
|
|
<div class="p1">
|
|
[% IF messages.audiomsg %]<div class="success">[% messages.audiomsg %]</div>[% END %]
|
|
[% IF messages.audioerr %]<div class="error">[% messages.audioerr %]</div>[% END %]
|
|
|
|
<table class="audiofiles">
|
|
<tr class="table_header">
|
|
<td style="width:100px;">Handle</td>
|
|
<td style="width:250px;">Description</td>
|
|
<td style="width:180px;">Audio</td>
|
|
<td style="width:40px;" />
|
|
<td style="width:60px;" />
|
|
</tr>
|
|
[% id = 0 %]
|
|
[% FOREACH audio = audio_files %]
|
|
[% id = id + 1 %]
|
|
[% IF audio.handle == edit_audio %]
|
|
<tr>
|
|
<form action="/subscriber/do_update_audio" enctype="multipart/form-data" method="post">
|
|
<td>[% audio.handle %]</td>
|
|
<td>
|
|
<input type="text" class="iaudiodesc" title="free-form description string"
|
|
name="description" value="[% aerefill.description %]" />
|
|
</td>
|
|
<td>
|
|
<input type="file" size="10" class="file" id="eupload_audio" name="eupload_audio"
|
|
title="audio file in wave format" />
|
|
</td>
|
|
<td>
|
|
<input type="hidden" name="subscriber_id" value="[% subscriber_id %]" />
|
|
<input type="hidden" name="handle" value="[% audio.handle %]" />
|
|
<button class="button-save" id="audiosave">Save</button>
|
|
</td>
|
|
</form>
|
|
<td><a href="/subscriber/edit_audio_files?subscriber_id=[% subscriber_id %]"><span class="button-cancel">Cancel</span></a></td>
|
|
</tr>
|
|
[% IF aerefill && prov_error %]<tr><td colspan="5"><div class="error">[% prov_error %]</div></td></tr>[% END %]
|
|
[% ELSE %]
|
|
<tr>
|
|
<td>[% audio.handle %]</td>
|
|
<td>[% audio.description %]</td>
|
|
<td><a href="/subscriber/listen_audio?subscriber_id=[% subscriber_id %]&handle=[% audio.handle %]"><span class="button-listen">Listen</span></a></td>
|
|
<td>
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<a href="/subscriber/edit_audio_files?subscriber_id=[% subscriber_id %]&edit_audio=[% audio.handle %]"><span class="button-edit">Edit</span></a>
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
<form action="/subscriber/do_delete_audio" method="post">
|
|
<input type="hidden" name="subscriber_id" value="[% subscriber_id %]" />
|
|
<input type="hidden" name="handle" value="[% audio.handle %]" />
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<button class="button-delete" id="audiodel[% id %]">Delete</button>
|
|
[% END %]
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
[% END %]
|
|
<tr>
|
|
<form action="/subscriber/do_create_audio" enctype="multipart/form-data" method="post">
|
|
<td>
|
|
<input type="text" class="ihandle" title="unique identifier string"
|
|
name="handle" value="[% acrefill.handle %]" />
|
|
</td>
|
|
<td>
|
|
<input type="text" class="iaudiodesc" title="free-form description string"
|
|
name="description" value="[% acrefill.data.description %]" />
|
|
</td>
|
|
<td>
|
|
<input type="file" size="10" class="file" id="cupload_audio" name="cupload_audio"
|
|
title="audio file in wave format" />
|
|
</td>
|
|
<td>
|
|
<input type="hidden" name="subscriber_id" value="[% subscriber_id %]" />
|
|
<button class="button-add" id="audioadd">Add</button>
|
|
</td>
|
|
</form>
|
|
<td />
|
|
</tr>
|
|
</table>
|
|
[% IF acrefill && prov_error %]<div class="error">[% prov_error %]</div>[% END %]
|
|
</div>
|
|
|