forked from WWBN/AVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanagerVideosLight_meta.php
58 lines (54 loc) · 2.02 KB
/
managerVideosLight_meta.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<div class="row">
<div class="form-group col-sm-6">
<label for="title"><?php echo __('Title'); ?></label>
<input type="text" class="form-control" id="title" placeholder="Enter email" value="<?php echo $title; ?>">
</div>
<div class="form-group col-sm-6">
<label for="categories_id"><?php echo __('Categories'); ?></label>
<?php echo Layout::getCategorySelect('categories_id', $categories_id, 'categories_id'); ?>
</div>
<div class="form-group col-sm-12">
<label for="description"><?php echo __('Description'); ?></label>
<textarea class="form-control" id="description" rows="10" ><?php echo $description; ?></textarea>
<?php
echo("<script>window.videos_id={$videos_id}</script>");
if (empty($advancedCustom->disableHTMLDescription)) {
echo getTinyMCE("description");
}
?>
</div>
</div>
<hr>
<button class="btn btn-success btn-lg btn-block" onclick="saveVideo(true);"><i class="fas fa-save"></i> <?php echo __('Save'); ?></button>
<script>
function saveVideo(close) {
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'objects/videoEditLight.php',
data: {
videos_id: <?php echo $videos_id; ?>,
title: $('#title').val(),
categories_id: $('#categories_id').val(),
description: <?php
if (empty($advancedCustom->disableHTMLDescription)) {
echo 'tinymce.get(\'description\').getContent()';
} else {
echo '$(\'#description\').val()';
}
?>
},
type: 'post',
success: function (response) {
modal.hidePleaseWait();
avideoResponse(response);
if (response && !response.error) {
if (close) {
avideoModalIframeClose();
}
}
}
});
}
$(document).ready(function () {
});
</script>