aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/reportedcontent/actions/reportedcontent/add.php (renamed from mod/reportedcontent/actions/add.php)0
-rw-r--r--mod/reportedcontent/actions/reportedcontent/archive.php (renamed from mod/reportedcontent/actions/archive.php)0
-rw-r--r--mod/reportedcontent/actions/reportedcontent/delete.php (renamed from mod/reportedcontent/actions/delete.php)0
-rw-r--r--mod/reportedcontent/start.php4
-rw-r--r--mod/reportedcontent/views/default/forms/reportedcontent/add.php57
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/form.php66
6 files changed, 59 insertions, 68 deletions
diff --git a/mod/reportedcontent/actions/add.php b/mod/reportedcontent/actions/reportedcontent/add.php
index f0a1b05c8..f0a1b05c8 100644
--- a/mod/reportedcontent/actions/add.php
+++ b/mod/reportedcontent/actions/reportedcontent/add.php
diff --git a/mod/reportedcontent/actions/archive.php b/mod/reportedcontent/actions/reportedcontent/archive.php
index dd5c6aef1..dd5c6aef1 100644
--- a/mod/reportedcontent/actions/archive.php
+++ b/mod/reportedcontent/actions/reportedcontent/archive.php
diff --git a/mod/reportedcontent/actions/delete.php b/mod/reportedcontent/actions/reportedcontent/delete.php
index f7d4e2107..f7d4e2107 100644
--- a/mod/reportedcontent/actions/delete.php
+++ b/mod/reportedcontent/actions/reportedcontent/delete.php
diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php
index e231216cd..9e5bb813a 100644
--- a/mod/reportedcontent/start.php
+++ b/mod/reportedcontent/start.php
@@ -36,7 +36,7 @@ function reportedcontent_init() {
'admin');
// Register actions
- $action_path = elgg_get_plugins_path() . "reportedcontent/actions";
+ $action_path = elgg_get_plugins_path() . "reportedcontent/actions/reportedcontent";
elgg_register_action('reportedcontent/add', "$action_path/add.php");
elgg_register_action('reportedcontent/delete', "$action_path/delete.php", 'admin');
elgg_register_action('reportedcontent/archive', "$action_path/archive.php", 'admin');
@@ -54,7 +54,7 @@ function reportedcontent_page_handler($page) {
gatekeeper();
$content .= elgg_view_title(elgg_echo('reportedcontent:this'));
- $content .= elgg_view('reportedcontent/form');
+ $content .= elgg_view_form('reportedcontent/add');
$sidebar = elgg_echo('reportedcontent:instructions');
$params = array(
diff --git a/mod/reportedcontent/views/default/forms/reportedcontent/add.php b/mod/reportedcontent/views/default/forms/reportedcontent/add.php
new file mode 100644
index 000000000..abc53e750
--- /dev/null
+++ b/mod/reportedcontent/views/default/forms/reportedcontent/add.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Elgg report content plugin form
+ *
+ * @package ElggReportContent
+ */
+
+$guid = 0;
+$title = get_input('title', "");
+$address = get_input('address', "");
+
+$description = "";
+$owner = elgg_get_logged_in_user_entity();
+
+?>
+
+<div>
+ <label>
+ <?php
+ echo elgg_echo('reportedcontent:title');
+ echo elgg_view('input/text', array(
+ 'internalname' => 'title',
+ 'value' => $title,
+ ));
+ ?>
+ </label>
+</div>
+<div>
+ <label>
+ <?php
+ echo elgg_echo('reportedcontent:address');
+ echo elgg_view('input/url', array(
+ 'internalname' => 'address',
+ 'value' => $address,
+ ));
+
+ ?>
+ </label>
+</div>
+<div>
+ <label>
+ <?php echo elgg_echo('reportedcontent:description'); ?>
+ </label>
+ <?php
+ echo elgg_view('input/longtext',array(
+ 'internalname' => 'description',
+ 'value' => $description,
+ ));
+ ?>
+</div>
+<div>
+ <?php
+ echo elgg_view('input/submit', array(
+ 'value' => elgg_echo('reportedcontent:report'),
+ ));
+ ?>
+</div>
diff --git a/mod/reportedcontent/views/default/reportedcontent/form.php b/mod/reportedcontent/views/default/reportedcontent/form.php
deleted file mode 100644
index b520d4060..000000000
--- a/mod/reportedcontent/views/default/reportedcontent/form.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/**
- * Elgg report content plugin form
- *
- * @package ElggReportContent
- */
-
-$guid = 0;
-$title = get_input('title', "");
-$description = "";
-$address = get_input('address', "");
-if ($address == "previous") {
- $address = $_SERVER['HTTP_REFERER'];
-}
-$tags = array();
-$access_id = ACCESS_PRIVATE;
-$shares = array();
-$owner = elgg_get_logged_in_user_entity();
-
-?>
-<form action="<?php echo elgg_get_site_url(); ?>action/reportedcontent/add" method="post" class="mtm">
-<?php echo elgg_view('input/securitytoken'); ?>
-
- <div>
- <label>
- <?php echo elgg_echo('reportedcontent:title'); ?>
- <?php
-
- echo elgg_view('input/text',array(
- 'internalname' => 'title',
- 'value' => $title,
- ));
-
- ?>
- </label>
- </div>
- <div>
- <label>
- <?php echo elgg_echo('reportedcontent:address'); ?>
- <?php
-
- echo elgg_view('input/url',array(
- 'internalname' => 'address',
- 'value' => $address,
- ));
-
- ?>
- </label>
- </div>
- <div>
- <label>
- <?php echo elgg_echo('reportedcontent:description'); ?>
- </label>
- <?php
-
- echo elgg_view('input/longtext',array(
- 'internalname' => 'description',
- 'value' => $description,
- ));
-
- ?>
- </div>
- <div>
- <input type="submit" value="<?php echo elgg_echo('reportedcontent:report'); ?>" />
- </div>
-</form>