aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-28 10:19:13 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-28 10:19:13 +0000
commit4a17a58b082da0703bd9aa34a1b5adfc7ac74396 (patch)
tree3c32d489e9bb4d692132a7001892bce5eaff1640
parent43fe8c543ca43a8408cae5cb56a0545425bdcd04 (diff)
downloadelgg-4a17a58b082da0703bd9aa34a1b5adfc7ac74396.tar.gz
elgg-4a17a58b082da0703bd9aa34a1b5adfc7ac74396.tar.bz2
Email address input and output fields
git-svn-id: https://code.elgg.org/elgg/trunk@541 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--views/default/input/email.php22
-rw-r--r--views/default/output/email.php21
2 files changed, 43 insertions, 0 deletions
diff --git a/views/default/input/email.php b/views/default/input/email.php
new file mode 100644
index 000000000..b5c9a6e3b
--- /dev/null
+++ b/views/default/input/email.php
@@ -0,0 +1,22 @@
+<?php
+
+ /**
+ * Elgg email input
+ * Displays an email input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['js'] Any Javascript to enter into the input tag
+ * @uses $vars['internalname'] The name of the input field
+ *
+ */
+
+?>
+
+<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo $vars['value']; ?>" class="input-text"/> \ No newline at end of file
diff --git a/views/default/output/email.php b/views/default/output/email.php
new file mode 100644
index 000000000..0a4abe658
--- /dev/null
+++ b/views/default/output/email.php
@@ -0,0 +1,21 @@
+<?php
+
+ /**
+ * Elgg email output
+ * Displays an email address that was entered using an email input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ *
+ * @uses $vars['value'] The email address to display
+ *
+ */
+
+ if (!empty($vars['value'])) {
+ echo "<a href=\"mailto:" . $vars['value'] . "\">". $vars['value'] ."</a>";
+ }
+?> \ No newline at end of file