2009-08-16 16:40:54 +00:00
|
|
|
<input type="hidden" name="wdts[post_id]" value="<?php echo $post->ID ?>" />
|
2009-09-30 02:39:37 +00:00
|
|
|
|
|
|
|
<label>
|
|
|
|
<input id="wdts-<?php echo $checkbox_id = md5(rand()) ?>" type="checkbox" name="wdts[allow_on_post]" value="yes" <?php echo ($transcript_options->are_new_transcripts_allowed()) ? 'checked="checked"' : '' ?> />
|
|
|
|
<?php _e('Allow new transcripts to be submitted for this post', 'what-did-they-say') ?>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<?php $approved_editor_id = md5(rand()) ?>
|
|
|
|
|
2009-10-01 01:28:03 +00:00
|
|
|
<?php if (!is_admin()) { ?>
|
|
|
|
<?php include(dirname(__FILE__) . '/_manage-queued-transcripts.inc') ?>
|
|
|
|
<?php } ?>
|
|
|
|
|
2009-09-11 01:20:01 +00:00
|
|
|
<?php if (is_array($queued_transcripts) && !empty($queued_transcripts)) { ?>
|
2009-08-19 22:54:12 +00:00
|
|
|
<p><strong><?php _e('Manage queued transcripts:', 'what-did-they-say') ?></strong></p>
|
2009-09-29 01:54:02 +00:00
|
|
|
<?php
|
|
|
|
foreach ($queued_transcripts as $transcript) {
|
|
|
|
$user = get_userdata($transcript['user_id']);
|
|
|
|
if (!empty($user)) { include('_display-queued-transcript.inc'); }
|
|
|
|
}
|
|
|
|
?>
|
2009-08-19 22:54:12 +00:00
|
|
|
<?php } ?>
|
2009-08-15 20:45:08 +00:00
|
|
|
|
2009-09-30 02:39:37 +00:00
|
|
|
<div id="wdts-<?php echo $approved_editor_id ?>">
|
|
|
|
<?php if (!defined('WP_ADMIN')) { ?>
|
|
|
|
<h3 class="wdts"><?php _e('Edit Approved Transcripts:', 'what-did-they-say') ?></h3>
|
|
|
|
<?php } ?>
|
|
|
|
<div class="wdts-transcript-editor">
|
|
|
|
<label>
|
|
|
|
<?php _e('Language:', 'what-did-they-say') ?>
|
|
|
|
<select name="wdts[language]" class="wdts-transcript-selector">
|
|
|
|
<?php foreach ($options['languages'] as $code => $info) { ?>
|
|
|
|
<option value="<?php echo $code ?>" <?php echo $info['default'] ? 'selected="selected"' : '' ?>><?php echo $info['name'] ?></option>
|
|
|
|
<?php } ?>
|
|
|
|
</select>
|
|
|
|
</label>
|
2009-09-24 01:34:06 +00:00
|
|
|
|
2009-09-30 02:39:37 +00:00
|
|
|
<div class="wdts-button-holder"></div>
|
2009-09-24 11:29:33 +00:00
|
|
|
<?php foreach (array_keys($options['languages']) as $code) {
|
|
|
|
$approved_transcript_text = '';
|
|
|
|
foreach ($approved_transcripts as $transcript) {
|
|
|
|
if ($transcript['language'] == $code) { $approved_transcript_text = $transcript['transcript']; break; }
|
|
|
|
} ?>
|
2009-09-30 02:39:37 +00:00
|
|
|
<textarea class="edit-transcript" name="wdts[transcripts][<?php echo $code ?>]" style="display: none; width: 99%; height: 200px"><?php echo $approved_transcript_text ?></textarea>
|
2009-09-24 11:29:33 +00:00
|
|
|
<?php } ?>
|
2009-10-01 00:45:05 +00:00
|
|
|
<input type="button" class="wdts-modify-transcript" value="<?php _e('Update All Transcripts', 'what-did-they-say') ?>" />
|
|
|
|
<span class="wdts-update-message"></span>
|
2009-09-24 11:29:33 +00:00
|
|
|
</div>
|
2009-09-30 02:39:37 +00:00
|
|
|
</div>
|
2009-10-01 01:28:03 +00:00
|
|
|
|
2009-09-30 02:39:37 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
WhatDidTheySay.setup_transcript_editor('wdts-<?php echo $approved_editor_id ?>');
|
2009-10-01 01:28:03 +00:00
|
|
|
<?php
|
|
|
|
$allow_new_transcripts_parameters = array("'wdts-${checkbox_id}'");
|
|
|
|
if (isset($new_transcript_id)) {
|
|
|
|
$allow_new_transcripts_parameters[] = "'wdts-${new_transcript_id}'";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
WhatDidTheySay.setup_allow_new_transcripts(<?php echo implode(",", $allow_new_transcripts_parameters) ?>);
|
2009-09-30 02:39:37 +00:00
|
|
|
</script>
|