当前位置: 首页>>代码示例>>PHP>>正文


PHP elgg_view_input函数代码示例

本文整理汇总了PHP中elgg_view_input函数的典型用法代码示例。如果您正苦于以下问题:PHP elgg_view_input函数的具体用法?PHP elgg_view_input怎么用?PHP elgg_view_input使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了elgg_view_input函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: elgg_format_element

// default map location coords
echo elgg_format_element('div', [], elgg_view_input('text', array('name' => 'params[default_coords]', 'value' => $plugin->default_coords, 'label' => elgg_echo('sharemaps:settings:default_coords'), 'help' => elgg_echo('sharemaps:settings:default_coords:help'))));
// Map width
echo elgg_format_element('div', [], elgg_view_input('text', array('name' => 'params[map_width]', 'value' => $plugin->map_width, 'label' => elgg_echo('sharemaps:settings:map_width'), 'help' => elgg_echo('sharemaps:settings:map_width:help'), 'style' => 'width: 200px;')));
// Map height
echo elgg_format_element('div', [], elgg_view_input('text', array('name' => 'params[map_height]', 'value' => $plugin->map_height, 'label' => elgg_echo('sharemaps:settings:map_height'), 'help' => elgg_echo('sharemaps:settings:map_height:help'), 'style' => 'width: 200px;')));
// allow or not the upload of maps
$map_upload = $plugin->map_upload;
if (empty($map_upload)) {
    $map_upload = SHAREMAPS_GENERAL_YES;
}
echo elgg_format_element('div', [], elgg_view_input('dropdown', array('name' => 'params[map_upload]', 'value' => $map_upload, 'options_values' => $potential_yes_no, 'label' => elgg_echo('sharemaps:settings:map_upload'), 'help' => elgg_echo('sharemaps:settings:map_upload:help'))));
// allow or not to insert google maps links
$map_creation = $plugin->map_creation;
if (empty($map_creation)) {
    $map_creation = SHAREMAPS_GENERAL_YES;
}
echo elgg_format_element('div', [], elgg_view_input('dropdown', array('name' => 'params[map_creation]', 'value' => $map_creation, 'options_values' => $potential_yes_no, 'label' => elgg_echo('sharemaps:settings:map_creation'), 'help' => elgg_echo('sharemaps:settings:map_creation:help'))));
// allow or not to insert google maps links
$gmaps_links = $plugin->gmaps_links;
if (empty($gmaps_links)) {
    $gmaps_links = SHAREMAPS_GENERAL_NO;
}
echo elgg_format_element('div', [], elgg_view_input('dropdown', array('name' => 'params[gmaps_links]', 'value' => $gmaps_links, 'options_values' => $potential_yes_no, 'label' => elgg_echo('sharemaps:settings:gmaps_links'), 'help' => elgg_echo('sharemaps:settings:gmaps_links:help'))));
// select where to load map regarding description
$map_description = $plugin->map_description;
if (empty($map_description)) {
    $map_description = SHAREMAPS_GENERAL_BEFORE;
}
echo elgg_format_element('div', [], elgg_view_input('dropdown', array('name' => 'params[map_description]', 'value' => $map_description, 'options_values' => $potential_before_after, 'label' => elgg_echo('sharemaps:settings:map_description'), 'help' => elgg_echo('sharemaps:settings:map_description:help'))));
开发者ID:nlybe,项目名称:elgg-sharemaps,代码行数:30,代码来源:settings.php

示例2: gmmktime

$end_date = (int) gmmktime(0, 0, 0, date('n', $endtime), date('j', $endtime), date('Y', $endtime));
// get sticky form values
$title = elgg_get_sticky_value('wizard', 'title', $title);
$start_date = (int) elgg_get_sticky_value('wizard', 'start_date', $start_date);
$end_date = (int) elgg_get_sticky_value('wizard', 'end_date', $end_date);
$show_users = elgg_get_sticky_value('wizard', 'show_users', $show_users);
$user_can_close = elgg_get_sticky_value('wizard', 'user_can_close', $user_can_close);
$display_mode = elgg_get_sticky_value('wizard', 'display_mode', $display_mode);
$forward_url = elgg_get_sticky_value('wizard', 'forward_url', $forward_url);
// clear sticky form
elgg_clear_sticky_form('wizard');
// define some options
$hour_options = range(0, 23);
$min_options = range(0, 59);
// make form
echo elgg_view_input('text', ['label' => elgg_echo('title'), 'name' => 'title', 'value' => $title, 'required' => true]);
// trigger mode
echo elgg_view_input('radio', ['name' => 'show_users', 'label' => elgg_echo('wizard:edit:show_users'), 'options' => [elgg_echo('wizard:edit:show_users:new_users') => 'new_users', elgg_echo('wizard:edit:show_users:everybody') => 'everybody'], 'value' => empty($show_users) ? 'everybody' : $show_users, 'required' => true]);
echo elgg_view_input('checkboxes', ['name' => 'user_can_close', 'options' => [elgg_echo('wizard:edit:user_can_close') => 1], 'value' => empty($user_can_close) ? 0 : $user_can_close, 'help' => elgg_echo('wizard:edit:user_can_close:description')]);
// start date
echo elgg_view_input('date', ['label' => elgg_echo('wizard:edit:start_date'), 'name' => 'start_date', 'value' => $start_date, 'timestamp' => true, 'required' => true, 'help' => elgg_echo('wizard:edit:start_date:description')]);
// end date
echo elgg_view_input('date', ['label' => elgg_echo('wizard:edit:end_date'), 'name' => 'end_date', 'value' => empty($endtime) ? '' : $end_date, 'timestamp' => true, 'help' => elgg_echo('wizard:edit:end_date:description')]);
// display mode
echo elgg_view_input('radio', ['name' => 'display_mode', 'label' => elgg_echo('wizard:edit:display_mode'), 'help' => elgg_echo('wizard:edit:display_mode:help'), 'options' => [elgg_echo('wizard:edit:display_mode:full_screen') => 'full_screen', elgg_echo('wizard:edit:display_mode:overlay') => 'overlay'], 'value' => empty($display_mode) ? 'full_screen' : $display_mode, 'required' => true]);
// forward url
echo elgg_view_input('text', ['name' => 'forward_url', 'label' => elgg_echo('wizard:edit:forward_url'), 'help' => elgg_echo('wizard:edit:forward_url:help'), 'value' => $forward_url]);
// submit
echo '<div class="elgg-foot">';
echo elgg_view('input/submit', ['value' => elgg_echo('save')]);
echo '</div>';
开发者ID:coldtrick,项目名称:wizard,代码行数:31,代码来源:edit.php

示例3: elgg_extract

<?php

$user = elgg_extract('user', $vars);
if (!$user instanceof ElggUser) {
    return;
}
echo elgg_view('notifications/subscriptions/personal', $vars);
echo elgg_view('notifications/subscriptions/collections', $vars);
if (elgg_is_active_plugin('groups')) {
    echo elgg_view('notifications/subscriptions/groups', $vars);
}
echo elgg_view_input('hidden', array('name' => 'guid', 'value' => $user->guid));
echo elgg_view_input('submit', array('value' => elgg_echo('save'), 'field_class' => 'elgg-foot'));
开发者ID:hypeJunction,项目名称:Elgg-user_settings,代码行数:13,代码来源:notifications.php

示例4: elgg_extract

<?php

$container_guid = (int) elgg_extract('container_guid', $vars);
if ($container_guid) {
    return;
}
$dbprefix = elgg_get_config('dbprefix');
$user = elgg_get_logged_in_user_entity();
$groups = new ElggBatch('elgg_get_entities_from_relationship', array('relationship' => 'member', 'relationship_guid' => (int) $user->guid, 'inverse_relationship' => false, 'limit' => 0));
$options_values = array();
foreach ($groups as $group) {
    if ($group->canWriteToContainer(0, 'group', 'discussion')) {
        $options_values["{$group->guid}"] = $group->name;
    }
}
$options_values = elgg_trigger_plugin_hook('allowed_containers', 'object:discussion', $vars, $options_values);
if (empty($options_values)) {
    // @todo: do we need to terminate form rendering all together?
}
asort($options_values);
$placeholder = array('' => elgg_echo('discussion:group:container:select'));
$options_values = $placeholder + $options_values;
echo elgg_view_input('select', array('options_values' => $options_values, 'class' => 'select-discussion-container', 'required' => true, 'label' => elgg_echo('discussion:group:container')));
?>
<script>
	require(['input/discussions/container']);
</script>

开发者ID:hypejunction,项目名称:hypediscussions,代码行数:27,代码来源:container.php

示例5: elgg_view_input

<?php

echo elgg_view_input('text', ['label' => elgg_echo('elasticsearch:inspect:guid'), 'help' => elgg_echo('elasticsearch:inspect:guid:help'), 'name' => 'guid', 'value' => get_input('guid')]);
// build footer
$footer = elgg_view_input('submit', ['value' => elgg_echo('elasticsearch:inspect:submit')]);
echo elgg_format_element('div', ['class' => 'elgg-foot'], $footer);
开发者ID:ColdTrick,项目名称:elasticsearch,代码行数:6,代码来源:inspect.php

示例6: elgg_echo

    // using the first entity to check supported options
    $migrate = new $class($entities[0]);
    $rows = '<tr>';
    $rows .= '<th>' . elgg_echo('title') . '</th>';
    if ($migrate->canBackDate()) {
        $rows .= '<th>' . elgg_echo('entity_tools:created') . '</th>';
    }
    if ($migrate->canChangeOwner()) {
        $rows .= '<th>' . elgg_echo('entity_tools:owner') . '</th>';
    }
    if ($migrate->canChangeContainer()) {
        $rows .= '<th>' . elgg_echo('entity_tools:container') . '</th>';
    }
    $rows .= '</tr>';
    foreach ($entities as $entity) {
        $rows .= elgg_view('entity_tools/listing/entity', ['entity' => $entity]);
    }
    echo elgg_format_element('table', ['id' => 'entity-tools-listing-table', 'class' => 'elgg-table mbm'], $rows);
    $entity_options['count'] = true;
    $count = elgg_get_entities($entity_options);
    echo elgg_view('navigation/pagination', ['count' => $count, 'offset' => $offset, 'limit' => $limit]);
} else {
    echo elgg_echo('notfound');
}
if (elgg_get_page_owner_guid() != elgg_get_logged_in_user_guid()) {
    echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('entity_tools:forms:owner_listing:disclaimer'));
}
echo elgg_view_input('hidden', ['name' => 'subtype', 'value' => $subtype]);
echo '<div class="elgg-foot">';
echo elgg_view('input/submit', ['value' => elgg_echo('save'), 'class' => 'elgg-button-submit', 'data-confirm' => elgg_echo('question:areyousure')]);
echo '</div>';
开发者ID:coldtrick,项目名称:entity_tools,代码行数:31,代码来源:update_entities.php

示例7: elgg_view_input

<?php

echo elgg_view_input('file', ['name' => 'file', 'required' => true]);
echo elgg_view('input/submit', ['value' => elgg_echo('upload')]);
开发者ID:coldtrick,项目名称:asset_library,代码行数:4,代码来源:upload.php

示例8: elgg_extract

<?php

/**
 * Saves subsription notification settings by group
 *
 * @uses $vars['user'] ElggUser
 */
$user = elgg_extract('user', $vars);
if (!elgg_instanceof($user, 'user')) {
    return;
}
echo elgg_view_input('hidden', ['name' => 'guid', 'value' => $user->guid]);
echo elgg_format_element('p', ['class' => 'elgg-text-help'], elgg_echo('notifications:subscriptions:groups:description'));
$records = elgg_view('notifications/subscriptions/groups', $vars);
echo elgg_format_element('div', ['class' => 'elgg-subscriptions'], $records);
$footer = elgg_view_input('submit', ['value' => elgg_echo('save')]);
elgg_set_form_footer($footer);
开发者ID:elgg,项目名称:elgg,代码行数:17,代码来源:groups.php

示例9: elgg_view

<?php

$ipsum = elgg_view('developers/ipsum');
?>
<form action="#">
	<fieldset>
		<legend>Fieldset Legend</legend>
		<?php 
echo elgg_view_field(array('#type' => 'text', 'required' => true, 'name' => 'f1', 'id' => 'f1', 'value' => 'input text', '#label' => 'Text input (.elgg-input-text):', '#help' => 'This is how help text looks'));
echo elgg_view_field(array('#type' => 'password', 'name' => 'f2', 'id' => 'f2', 'value' => 'password', '#label' => 'Password input (.elgg-input-password):'));
echo elgg_view_field(array('#type' => 'radio', 'name' => 'f3', 'id' => 'f3', 'options' => array('a (.elgg-input-radio)' => 1, 'b (.elgg-input-radio)' => 2), '#label' => 'Radio input (.elgg-input-radios):'));
echo elgg_view_field(array('#type' => 'checkbox', 'name' => 'f4s', 'id' => 'f4s', 'value' => 1, 'default' => false, 'required' => true, 'label' => 'a (.elgg-input-checkbox)', '#help' => 'Single checkbox .elgg-input-checkbox wrapped in .elgg-input-single-checkbox (only label)'));
echo elgg_view_field(array('#type' => 'checkbox', 'name' => 'f4s', 'id' => 'f4s', 'value' => 1, 'default' => false, 'required' => true, '#label' => 'a (.elgg-input-checkbox)', '#help' => 'Single checkbox .elgg-input-checkbox wrapped in .elgg-input-single-checkbox (only #label)'));
echo elgg_view_field(array('#type' => 'checkbox', 'name' => 'f4s2', 'id' => 'f4s2', 'value' => 1, 'default' => false, 'required' => true, '#label' => 'a (.elgg-input-checkbox) - Field label', 'label' => 'a (.elgg-input-checkbox) - Input label', '#help' => 'Single checkbox .elgg-input-checkbox wrapped in .elgg-input-single-checkbox (label and #label)'));
echo elgg_view_input('checkbox', array('name' => 'f4s3', 'id' => 'f4s3', 'value' => 1, 'default' => false, 'required' => true, 'label' => 'a (.elgg-input-checkbox)', 'help' => 'Single checkbox .elgg-input-checkbox wrapped in .elgg-input-single-checkbox using elgg_view_input'));
echo elgg_view_field(array('#type' => 'checkboxes', 'name' => 'f4', 'id' => 'f4', 'options' => array('a (.elgg-input-checkbox)' => 1, 'b (.elgg-input-checkbox)' => 2), '#label' => 'Checkboxes input (.elgg-input-checkboxes):'));
echo elgg_view_field(array('#type' => 'select', 'name' => 'f5', 'id' => 'f5', 'options' => array('option 1', 'option 2', ['text' => 'disabled', 'disabled' => true]), '#label' => 'Select input (dropdown) (.elgg-input-dropdown) with a disabled option:'));
echo elgg_view_field(array('#type' => 'select', 'name' => 'f51[]', 'id' => 'f51', 'options_values' => array('value 1' => 'option 1', 'value 2' => 'option 2', 'value 3' => 'option 3'), 'multiple' => true, '#label' => 'Select input (multiselect) (.elgg-input-dropdown):'));
echo elgg_view_field(array('#type' => 'access', 'name' => 'f6', 'id' => 'f6', 'value' => ACCESS_PUBLIC, '#label' => 'Access input (.elgg-input-access):'));
echo elgg_view_field(array('#type' => 'file', 'name' => 'f7', 'id' => 'f7', '#label' => 'File input (.elgg-input-file):'));
echo elgg_view_field(array('#type' => 'url', 'name' => 'f8', 'id' => 'f8', 'value' => 'http://elgg.org/', '#label' => 'URL input (.elgg-input-url):'));
echo elgg_view_field(array('#type' => 'tags', 'name' => 'f9', 'id' => 'f9', 'value' => 'one, two, three', '#label' => 'Tags input (.elgg-input-tags):'));
echo elgg_view_field(array('#type' => 'email', 'name' => 'f10', 'id' => 'f10', 'value' => 'noone@elgg.org', '#label' => 'Email input (.elgg-input-email):'));
echo elgg_view_field(array('#type' => 'autocomplete', 'name' => 'f11', 'id' => 'f11', 'match_on' => array('groups', 'friends'), '#label' => 'Autocomplete input (.elgg-input-autocomplete):'));
echo elgg_view_field(array('#type' => 'date', 'name' => 'f12', 'id' => 'f12', 'value' => '2012-12-31', '#label' => 'Date input (.elgg-input-date):'));
$year = date('Y');
echo elgg_view_field(array('#type' => 'date', 'name' => 'f12-custom', 'id' => 'f12-custom', 'value' => "{$year}/02/01", 'timestamp' => true, 'datepicker_options' => array('dateFormat' => 'yy/mm/dd', 'changeMonth' => false, 'changeYear' => false, 'minDate' => "{$year}/01/15", 'maxDate' => "{$year}/02/15"), '#label' => 'Date input (.elgg-input-date) with custom options:', '#help' => 'Select a date from 15 Jan to 15 Feb'));
echo elgg_view_field(array('#type' => 'userpicker', 'name' => 'f13', 'id' => 'f13', '#label' => 'User picker input (.elgg-user-picker):'));
echo elgg_view_field(array('#type' => 'userpicker', 'name' => 'f16', 'id' => 'f16', 'limit' => 1, '#label' => 'User picker input (with max 1 results) (.elgg-user-picker):'));
echo elgg_view_field(array('#type' => 'plaintext', 'name' => 'f15', 'id' => 'f15', 'value' => $ipsum, '#label' => 'Plain textarea input (.elgg-input-plaintext):'));
echo elgg_view_field(array('#type' => 'longtext', 'name' => 'f14', 'id' => 'f14', 'value' => $ipsum, '#label' => 'Long textarea input (.elgg-input-longtext):'));
开发者ID:elgg,项目名称:elgg,代码行数:31,代码来源:forms.php

示例10: elgg_echo

    $output_as_tags = $entity->output_as_tags;
    $blank_available = $entity->blank_available;
    $admin_only = $entity->admin_only;
    if (!array_key_exists($metadata_type, $options_values)) {
        $options_values[$metadata_type] = $metadata_type;
    }
}
$yes_no_options = ['yes' => elgg_echo('option:yes'), 'no' => elgg_echo('option:no')];
$no_yes_options = array_reverse($yes_no_options);
$formbody .= elgg_view_input('text', ['name' => 'metadata_name', 'value' => $metadata_name, 'required' => true, 'label' => elgg_echo('profile_manager:admin:metadata_name')]);
$formbody .= elgg_view_input('text', ['name' => 'metadata_label', 'value' => $metadata_label, 'label' => elgg_echo('profile_manager:admin:metadata_label')]);
$formbody .= elgg_view_input('text', ['name' => 'metadata_input_label', 'value' => $metadata_input_label, 'label' => elgg_echo('profile_manager:admin:metadata_input_label'), 'help' => elgg_echo('profile_manager:admin:metadata_input_label:help')]);
$formbody .= elgg_view_input('text', ['name' => 'metadata_hint', 'value' => $metadata_hint, 'label' => elgg_echo('profile_manager:admin:metadata_hint')]);
$formbody .= elgg_view_input('text', ['name' => 'metadata_placeholder', 'value' => $metadata_placeholder, 'label' => elgg_echo('profile_manager:admin:metadata_placeholder')]);
$formbody .= elgg_view_input('select', ['name' => 'metadata_type', 'options_values' => $options_values, 'value' => $metadata_type, 'label' => elgg_echo('profile_manager:admin:field_type'), 'onchange' => 'elgg.profile_manager.change_field_type();']);
$formbody .= elgg_view_input('text', ['name' => 'metadata_options', 'value' => $metadata_options, 'label' => elgg_echo('profile_manager:admin:metadata_options')]);
$options_table = '';
$options = ['show_on_register', 'mandatory', 'user_editable', 'output_as_tags', 'blank_available', 'admin_only'];
foreach ($options as $option) {
    $class = elgg_extract($option, $option_classes, '');
    $options_table .= '<tr>';
    $options_table .= '<td>' . elgg_echo("profile_manager:admin:{$option}") . ':</td>';
    $options_table .= '<td>';
    $options_table .= elgg_view('input/dropdown', ['name' => $option, 'options_values' => $no_yes_options, 'value' => ${$option}, 'class' => 'mhs custom_fields_form_field_option' . $class]);
    $options_table .= '</td>';
    $options_table .= elgg_format_element('td', [], elgg_echo("profile_manager:admin:{$option}:description"));
    $options_table .= '</tr>';
}
$options_table = elgg_format_element('table', [], $options_table);
$options_title = elgg_echo('profile_manager:admin:additional_options');
$options_title .= elgg_view('output/pm_hint', ['id' => 'more_info_profile_field_additional', 'text' => elgg_echo('profile_manager:tooltips:profile_field_additional')]);
开发者ID:coldtrick,项目名称:profile_manager,代码行数:31,代码来源:profile_field.php

示例11: elgg_extract

<?php

$widget = elgg_extract('entity', $vars);
$event_guids = $widget->event_guids;
echo elgg_view_input('objectpicker', ['values' => $event_guids, 'name' => 'params[event_guids]', 'subtype' => 'event', 'label' => elgg_echo('event_manager:widgets:highlighted_events:edit:event_guids'), 'help' => elgg_echo('event_manager:widgets:highlighted_events:description'), 'sortable' => true]);
echo elgg_view('input/checkbox', ['label' => elgg_echo('event_manager:widgets:highlighted_events:edit:show_past_events'), 'name' => 'params[show_past_events]', 'value' => 1, 'checked' => (bool) $widget->show_past_events]);
开发者ID:coldtrick,项目名称:event_manager,代码行数:6,代码来源:edit.php

示例12: elgg_extract

<?php

$widget = elgg_extract('entity', $vars);
$file_count = (int) $widget->file_count;
if ($file_count < 1) {
    $file_count = 4;
}
echo elgg_view_input('select', ['label' => elgg_echo('file:num_files'), 'name' => 'params[file_count]', 'options' => range(1, 10), 'value' => $file_count]);
开发者ID:coldtrick,项目名称:file_tools,代码行数:8,代码来源:edit.php

示例13: elgg_extract

<?php

$entity = elgg_extract('entity', $vars);
echo elgg_view_input('select', array('name' => 'params[show_statistics]', 'value' => isset($entity->show_statistics) ? $entity->show_statistics : true, 'label' => elgg_echo('user:settings:show_statistics'), 'options_values' => array(0 => elgg_echo('option:no'), 1 => elgg_echo('option:yes'))));
echo elgg_view_input('select', array('name' => 'params[show_language]', 'value' => isset($entity->show_language) ? $entity->show_language : true, 'label' => elgg_echo('user:settings:show_language'), 'options_values' => array(0 => elgg_echo('option:no'), 1 => elgg_echo('option:yes'))));
开发者ID:hypeJunction,项目名称:Elgg-user_settings,代码行数:5,代码来源:settings.php

示例14: explode

    $relationships = explode(',', $relationships_concat);
    foreach ($relationships as $relationship) {
        if (0 === strpos($relationship, 'notify')) {
            $method = str_replace('notify', '', $relationship);
            $preferred_methods[$method] = $method;
        }
    }
} else {
    foreach ($methods as $method) {
        if (check_entity_relationship($user->guid, "notify{$method}", $entity->guid)) {
            $preferred_methods[$method] = $method;
        }
    }
}
$method_options = [];
foreach ($methods as $method) {
    $label = elgg_echo("notification:method:{$method}");
    $method_options[$label] = $method;
}
?>
<div class="elgg-subscription-record">
	<div class="elgg-subscription-description">
		<?php 
echo elgg_view_image_block($icon, $name);
?>
	</div>
	<?php 
echo elgg_view_input('checkboxes', ['name' => "subscriptions[{$entity->guid}]", 'options' => $method_options, 'value' => $preferred_methods, 'align' => 'horizontal', 'field_class' => 'elgg-subscription-methods']);
?>
</div>
开发者ID:elgg,项目名称:elgg,代码行数:30,代码来源:record.php

示例15: elgg_extract

$message_type = elgg_extract('message_type', $vars);
$recipient_guids = elgg_extract('recipient_guids', $vars, array());
$subject = elgg_extract('subject', $vars, '');
$message = elgg_extract('body', $vars, '');
$multiple = elgg_extract('multiple', $vars, false);
$has_subject = elgg_extract('has_subject', $vars, true);
$allows_attachments = elgg_extract('allows_attachments', $vars, false);
echo elgg_view_input('hidden', array('name' => 'message_type', 'value' => $message_type));
echo elgg_view_input('hidden', array('name' => 'original_guid', 'value' => $original_message->guid));
if (!$original_message) {
    echo elgg_view_input('tokeninput', array('name' => 'recipients', 'value' => $recipient_guids, 'multiple' => $multiple, 'callback' => 'hypeJunction\\Inbox\\Search\\Recipients::search', 'query' => array('message_type' => $message_type), 'label' => $multiple ? elgg_echo('inbox:message:recipients') : elgg_echo('inbox:message:recipient')));
} else {
    foreach ($recipient_guids as $guid) {
        echo elgg_view_input('hidden', array('name' => 'recipients[]', 'value' => $guid));
    }
}
if ($has_subject) {
    if (!$original_message) {
        echo elgg_view_input('text', array('name' => 'subject', 'value' => $subject, 'label' => elgg_echo('inbox:message:subject')));
    } else {
        $subject = $original_message->getReplySubject();
        echo elgg_view_input('hidden', array('name' => 'subject', 'value' => $subject));
    }
}
echo elgg_view_input('inbox/message', array('name' => 'body', 'value' => $message, 'rows' => 5, 'label' => $original_message ? '' : elgg_echo('inbox:message:body')));
echo elgg_view('forms/messages/send/extend', $vars);
if ($allows_attachments) {
    echo elgg_view_input('attachments', ['name' => 'message_attachments', 'expand' => false, 'field_class' => 'clearfix']);
}
echo elgg_view_input('submit', array('value' => elgg_echo('inbox:message:send'), 'field_class' => 'elgg-foot'));
开发者ID:hypejunction,项目名称:hypeinbox,代码行数:30,代码来源:send.php


注:本文中的elgg_view_input函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。