aboutsummaryrefslogtreecommitdiff
path: root/mod/invitefriends/views/default
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-07-14 14:33:29 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-07-14 14:33:29 +0000
commit7600c8f5a898806e7788c9d26627f19083eb45e3 (patch)
tree54a1fb26c32538bb89536dd81126ffae8b70f64c /mod/invitefriends/views/default
parentff07d7f469b8f50f9ab96e040354af6bc7ccc706 (diff)
downloadelgg-7600c8f5a898806e7788c9d26627f19083eb45e3.tar.gz
elgg-7600c8f5a898806e7788c9d26627f19083eb45e3.tar.bz2
Disabling friend invite form when site has disabled new user registration.
git-svn-id: http://code.elgg.org/elgg/trunk@6703 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/invitefriends/views/default')
-rw-r--r--mod/invitefriends/views/default/invitefriends/formitems.php35
1 files changed, 24 insertions, 11 deletions
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');
+}