aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/invitefriends/languages/en.php3
-rw-r--r--mod/invitefriends/views/default/invitefriends/formitems.php35
2 files changed, 27 insertions, 11 deletions
diff --git a/mod/invitefriends/languages/en.php b/mod/invitefriends/languages/en.php
index ad64e4fd8..d7dbd4c8f 100644
--- a/mod/invitefriends/languages/en.php
+++ b/mod/invitefriends/languages/en.php
@@ -13,6 +13,9 @@
$english = array(
'friends:invite' => 'Invite friends',
+
+ 'invitefriends:registration_disabled' => 'New user registration has been disabled on this site; you are unable to invite new users.',
+
'invitefriends:introduction' => 'To invite friends to join you on this network, enter their email addresses below (one per line):',
'invitefriends:message' => 'Enter a message they will receive with your invitation:',
'invitefriends:subject' => 'Invitation to join %s',
diff --git a/mod/invitefriends/views/default/invitefriends/formitems.php b/mod/invitefriends/views/default/invitefriends/formitems.php
index ce9a84073..ae04b78f7 100644
--- a/mod/invitefriends/views/default/invitefriends/formitems.php
+++ b/mod/invitefriends/views/default/invitefriends/formitems.php
@@ -10,16 +10,29 @@
* @link http://elgg.org/
*/
+if ($CONFIG->allow_registration) {
+ $invite = elgg_echo('friends:invite');
+ $introduction = elgg_echo('invitefriends:introduction');
+ $message = elgg_echo('invitefriends:message');
+ $default = sprintf(elgg_echo('invitefriends:message:default'), $CONFIG->site->name);
-echo "<h2>".elgg_echo('friends:invite')."</h2>";
-?>
+ echo <<< HTML
+<h2>$invite</h2>
<p class="margin_top">
-<label>
- <?php echo elgg_echo('invitefriends:introduction'); ?>
-<textarea class="input_textarea" name="emails" ></textarea></label></p>
-<p><label>
- <?php echo elgg_echo('invitefriends:message'); ?>
-<textarea class="input_textarea" name="emailmessage" ><?php
- echo sprintf(elgg_echo('invitefriends:message:default'),$CONFIG->site->name);
-?></textarea></label></p>
-<?php echo elgg_view('input/submit', array('value' => elgg_echo('send'))); ?>
+ <label>
+ $introduction
+ <textarea class="input_textarea" name="emails" ></textarea>
+ </label>
+</p>
+<p>
+ <label>
+ $message
+ <textarea class="input_textarea" name="emailmessage" >$default</textarea>
+ </label>
+</p>
+HTML;
+
+ echo elgg_view('input/submit', array('value' => elgg_echo('send')));
+} else {
+ echo elgg_echo('invitefriends:registration_disabled');
+}