Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
add.php
Go to the documentation of this file.
1 <?php
6 $label_text = elgg_echo('profile:label');
7 $type_text = elgg_echo('profile:type');
8 
9 $label_control = elgg_view('input/text', array('name' => 'label'));
10 $type_control = elgg_view('input/select', array('name' => 'type', 'options_values' => array(
11  'text' => elgg_echo('profile:field:text'),
12  'longtext' => elgg_echo('profile:field:longtext'),
13  'tags' => elgg_echo('profile:field:tags'),
14  'url' => elgg_echo('profile:field:url'),
15  'email' => elgg_echo('profile:field:email'),
16  'location' => elgg_echo('profile:field:location'),
17  'date' => elgg_echo('profile:field:date'),
18 )));
19 
20 $submit_control = elgg_view('input/submit', array('name' => elgg_echo('add'), 'value' => elgg_echo('add')));
21 
22 $formbody = <<< END
23  <div>$label_text: $label_control</div>
24  <div class="elgg-foot">$type_text: $type_control
25  $submit_control</div>
26 END;
27 
28 echo elgg_autop(elgg_echo('profile:explainchangefields'));
29 echo $formbody;
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$type_text
Definition: add.php:7
$type_control
Definition: add.php:10
$formbody
Definition: add.php:22
elgg_autop($string)
Create paragraphs from text with line spacing.
Definition: output.php:56
$label_text
Add a new field to the set of custom profile fields.
Definition: add.php:6
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
$label_control
Definition: add.php:9
$submit_control
Definition: add.php:20