aboutsummaryrefslogtreecommitdiff
path: root/mod/videolist/views/default/forms/videolist/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/videolist/views/default/forms/videolist/edit.php')
-rw-r--r--mod/videolist/views/default/forms/videolist/edit.php55
1 files changed, 55 insertions, 0 deletions
diff --git a/mod/videolist/views/default/forms/videolist/edit.php b/mod/videolist/views/default/forms/videolist/edit.php
new file mode 100644
index 000000000..18fb6ded4
--- /dev/null
+++ b/mod/videolist/views/default/forms/videolist/edit.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Videolist edit form body
+ *
+ * @package ElggVideolist
+ */
+
+$variables = elgg_get_config('videolist');
+
+if(empty($vars['guid'])){
+ unset($variables['title']);
+ unset($variables['description']);
+} else {
+ unset($variables['video_url']);
+}
+
+foreach ($variables as $name => $type) {
+?>
+<div>
+ <label><?php echo elgg_echo("videolist:$name") ?></label>
+ <?php
+ if ($type != 'longtext') {
+ echo '<br />';
+ }
+ ?>
+ <?php echo elgg_view("input/$type", array(
+ 'name' => $name,
+ 'value' => $vars[$name],
+ ));
+ ?>
+</div>
+<?php
+}
+
+$cats = elgg_view('categories', $vars);
+if (!empty($cats)) {
+ echo $cats;
+}
+
+
+echo '<div class="elgg-foot">';
+if ($vars['guid']) {
+ echo elgg_view('input/hidden', array(
+ 'name' => 'video_guid',
+ 'value' => $vars['guid'],
+ ));
+}
+echo elgg_view('input/hidden', array(
+ 'name' => 'container_guid',
+ 'value' => $vars['container_guid'],
+));
+
+echo elgg_view('input/submit', array('value' => elgg_echo('save')));
+
+echo '</div>';