aboutsummaryrefslogtreecommitdiff
path: root/mod/widgettest/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/widgettest/views/default')
-rw-r--r--mod/widgettest/views/default/widgets/widgettest/edit.php7
-rw-r--r--mod/widgettest/views/default/widgets/widgettest/view.php13
2 files changed, 20 insertions, 0 deletions
diff --git a/mod/widgettest/views/default/widgets/widgettest/edit.php b/mod/widgettest/views/default/widgets/widgettest/edit.php
new file mode 100644
index 000000000..10958a7ba
--- /dev/null
+++ b/mod/widgettest/views/default/widgets/widgettest/edit.php
@@ -0,0 +1,7 @@
+<?php
+
+?>
+ <p>
+ Display a message:
+ <input type="text" name="params[description]" value="<?php echo htmlentities($vars['entity']->description); ?>" />
+ </p> \ No newline at end of file
diff --git a/mod/widgettest/views/default/widgets/widgettest/view.php b/mod/widgettest/views/default/widgets/widgettest/view.php
new file mode 100644
index 000000000..16ec7390e
--- /dev/null
+++ b/mod/widgettest/views/default/widgets/widgettest/view.php
@@ -0,0 +1,13 @@
+<h1>I am a test widget!</h1>
+<p>
+ <?php
+
+ $description = $vars['entity']->description;
+ if (!empty($description)) {
+ echo $vars['entity']->description;
+ } else {
+ echo "Click 'edit' to change my message.";
+ }
+
+ ?>
+</p> \ No newline at end of file