aboutsummaryrefslogtreecommitdiff
path: root/mod/invitefriends/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/invitefriends/views')
-rw-r--r--mod/invitefriends/views/default/forms/invitefriends/invite.php35
-rw-r--r--mod/invitefriends/views/default/invitefriends/form.php8
-rw-r--r--mod/invitefriends/views/default/invitefriends/formitems.php4
3 files changed, 47 insertions, 0 deletions
diff --git a/mod/invitefriends/views/default/forms/invitefriends/invite.php b/mod/invitefriends/views/default/forms/invitefriends/invite.php
new file mode 100644
index 000000000..0d7f5d9f2
--- /dev/null
+++ b/mod/invitefriends/views/default/forms/invitefriends/invite.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * Elgg invite form contents
+ *
+ * @package ElggInviteFriends
+ */
+
+if (elgg_get_config('allow_registration')) {
+ $site = elgg_get_site_entity();
+ $introduction = elgg_echo('invitefriends:introduction');
+ $message = elgg_echo('invitefriends:message');
+ $default = elgg_echo('invitefriends:message:default', array($site->name));
+
+ echo <<< HTML
+<div>
+ <label>
+ $introduction
+ <textarea class="elgg-input-textarea" name="emails" ></textarea>
+ </label>
+</div>
+<div>
+ <label>
+ $message
+ <textarea class="elgg-input-textarea" name="emailmessage" >$default</textarea>
+ </label>
+</div>
+HTML;
+
+ echo '<div class="elgg-foot">';
+ echo elgg_view('input/submit', array('value' => elgg_echo('send')));
+ echo '</div>';
+} else {
+ echo elgg_echo('invitefriends:registration_disabled');
+}
diff --git a/mod/invitefriends/views/default/invitefriends/form.php b/mod/invitefriends/views/default/invitefriends/form.php
new file mode 100644
index 000000000..badcf8759
--- /dev/null
+++ b/mod/invitefriends/views/default/invitefriends/form.php
@@ -0,0 +1,8 @@
+<?php
+/**
+ * Elgg invite form wrapper
+ *
+ * @package ElggInviteFriends
+ */
+
+echo elgg_view_form('invitefriends/invite');
diff --git a/mod/invitefriends/views/default/invitefriends/formitems.php b/mod/invitefriends/views/default/invitefriends/formitems.php
new file mode 100644
index 000000000..afdff4164
--- /dev/null
+++ b/mod/invitefriends/views/default/invitefriends/formitems.php
@@ -0,0 +1,4 @@
+<?php
+
+elgg_deprecated_notice("invitefriends/formitems was moved to forms/invitefriends/invite", 1.8);
+echo elgg_view('forms/invitefriends/invite'); \ No newline at end of file