Elgg  Version 2.3
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
24  <div class="elgg-foot">$type_text: $type_control
25  $submit_control</div>
26 END;
27 
28 echo elgg_autop(elgg_echo('profile:explainchangefields'));
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:46
fieldset div
Definition: admin.css.php:485
elgg echo
Translates a string.
Definition: languages.js:48
$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:336
$label_control
Definition: add.php:9
$submit_control
Definition: add.php:20