Commit a83098d1 authored by Nigel McNie's avatar Nigel McNie
Browse files

Render e-mail addresses with mailto links.

(cherry picked from commit 428b2522cec8f867f5c140ba403a40dcdc70c6e6)
parent a4688bda
......@@ -426,6 +426,16 @@ class ArtefactTypeEmail extends ArtefactTypeProfileField {
delete_records('artefact_internal_profile_email', 'artefact', $this->id);
parent::delete();
}
public function render_self($options) {
if (array_key_exists('link', $options) && $options['link'] == true) {
$html = '<a href="mailto:' . hsc($this->title) . '">' . hsc($this->title) . '</a>';
}
else {
$html = $this->title;
}
return array('html' => $html, 'javascript' => null);
}
}
class ArtefactTypeStudentid extends ArtefactTypeProfileField {}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment