diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 01:07:33 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 01:07:33 +0000 |
commit | fbc1fdd0b7244d2f03164b62eb893223ff930319 (patch) | |
tree | 2b1c79d2795ee2d1ecc3b019fe3643bcf52010ad /mod/invitefriends | |
parent | 3a6e0dc6e80434789abe5b98e2748a6fc79bf320 (diff) | |
download | elgg-fbc1fdd0b7244d2f03164b62eb893223ff930319.tar.gz elgg-fbc1fdd0b7244d2f03164b62eb893223ff930319.tar.bz2 |
Converted most forms to use elgg_view_form (therefore also moved the views to forms/*). Some views are left that _only_ do elgg_view_form, so I wonder if those should even be kept around.
git-svn-id: http://code.elgg.org/elgg/trunk@8127 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/invitefriends')
3 files changed, 37 insertions, 38 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..555311dd0 --- /dev/null +++ b/mod/invitefriends/views/default/forms/invitefriends/invite.php @@ -0,0 +1,33 @@ +<?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 +<p class="margin-top"> + <label> + $introduction + <textarea class="elgg-input-textarea" name="emails" ></textarea> + </label> +</p> +<p> + <label> + $message + <textarea class="elgg-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'); +} diff --git a/mod/invitefriends/views/default/invitefriends/form.php b/mod/invitefriends/views/default/invitefriends/form.php index 7ab9314f7..badcf8759 100644 --- a/mod/invitefriends/views/default/invitefriends/form.php +++ b/mod/invitefriends/views/default/invitefriends/form.php @@ -5,9 +5,4 @@ * @package ElggInviteFriends */ -echo elgg_view('input/form', array( - 'action' => 'action/invitefriends/invite', - 'body' => elgg_view('invitefriends/formitems'), - 'method' => 'post' - ) -); +echo elgg_view_form('invitefriends/invite'); diff --git a/mod/invitefriends/views/default/invitefriends/formitems.php b/mod/invitefriends/views/default/invitefriends/formitems.php index 555311dd0..afdff4164 100644 --- a/mod/invitefriends/views/default/invitefriends/formitems.php +++ b/mod/invitefriends/views/default/invitefriends/formitems.php @@ -1,33 +1,4 @@ -<?php +<?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 -<p class="margin-top"> - <label> - $introduction - <textarea class="elgg-input-textarea" name="emails" ></textarea> - </label> -</p> -<p> - <label> - $message - <textarea class="elgg-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'); -} +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 |