aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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