本文整理汇总了PHP中input_field函数的典型用法代码示例。如果您正苦于以下问题:PHP input_field函数的具体用法?PHP input_field怎么用?PHP input_field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了input_field函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: label_tag
<div>
<?php
echo label_tag(lang('projects shift dates'), 'projectFormShiftDates');
?>
<?php
echo checkbox_field('project[shift_dates]', true, array_var($project_data, 'shift_dates'), array('id' => 'projectFormShiftDates'));
?>
</div>
<div>
<?php
echo label_tag(lang('add days'), 'projectFormAddDaysFromNow');
?>
<?php
echo input_field('project[add_days]', array_var($project_data, 'add_days'), array('class' => 'short', 'id' => 'projectFormAddDays'));
?>
</div>
<div>
<?php
echo label_tag(lang('projects copy details'), 'projectFormCopyDetails');
?>
<?php
echo checkbox_field('project[copy_details]', true, array_var($project_data, 'copy_details'), array('id' => 'projectFormCopyDetails'));
?>
</div>
<div>
<?php
echo label_tag(lang('projects copy milestones'), 'projectFormCopyMilestones');
示例2: render_user_box
<div id="userboxWrapper"><?php
echo render_user_box(logged_user());
?>
</div>
<div id="searchbox">
<form name='search_form' class="internalForm" action="<?php
echo ROOT_URL . '/index.php';
?>
" method="get">
<table><tr><td>
<?php
$search_field_default_value = lang('search') . '...';
$search_field_attrs = array('onfocus' => 'if (value == \'' . $search_field_default_value . '\') value = \'\'', 'onblur' => 'if (value == \'\') value = \'' . $search_field_default_value . '\'');
?>
<?php
echo input_field('search_for', $search_field_default_value, $search_field_attrs);
?>
</td>
<td id="searchboxSearch">
<div id="searchboxButton"></div>
<input style="display:none" id="searchButtonReal" type="submit" />
<input type="hidden" name="c" value="search" />
<input type="hidden" name="a" value="search" />
<input type="hidden" name="current" value="search" />
<input type="hidden" id="hfVars" name="vars" value="dashboard" />
</td>
<td style="padding-left:10px">
<div id="quickAdd"></div>
</td>
</tr></table>
</form>
示例3: label_tag
?>
</a>
</fieldset>
</div>
<div>
<?php
echo label_tag(lang('description'), 'templateFormDescription', false);
?>
<?php
echo editor_widget('template[description]', array_var($template_data, 'description'), array('id' => $genid . 'templateFormDescription', 'class' => 'long', 'tabindex' => '2'));
?>
</div>
<?php
if (isset($add_to) && $add_to) {
echo input_field("add_to", "true", array("type" => "hidden"));
}
?>
<?php
foreach ($categories as $category) {
?>
<div <?php
if (!$category['visible']) {
echo 'style="display:none"';
}
?>
id="<?php
echo $genid . $category['name'];
?>
">
示例4: logged_user
$att_form = '';
if (!$event->isNew() && !$event->isTrashed()) {
$event_inv = EventInvitations::findById(array('event_id' => $event->getId(), 'contact_id' => logged_user()->getId()));
if ($event_inv != null) {
$event->addInvitation($event_inv);
$event_inv_state = $event_inv->getInvitationState();
if (!SystemPermissions::userHasSystemPermission(logged_user(), 'can_update_other_users_invitations')) {
$options = array(option_tag(lang('yes'), 1, $event_inv_state == 1 ? array('selected' => 'selected') : null), option_tag(lang('no'), 2, $event_inv_state == 2 ? array('selected' => 'selected') : null), option_tag(lang('maybe'), 3, $event_inv_state == 3 ? array('selected' => 'selected') : null));
if ($event_inv_state == 0) {
$options[] = option_tag(lang('decide later'), 0, $event_inv_state == 0 ? array('selected' => 'selected') : null);
}
$att_form = '<form style="height:100%;background-color:white" class="internalForm" action="' . get_url('event', 'change_invitation_state') . '" method="post">';
$att_form .= '<table><tr><td style="padding-right:6px;"><b>' . lang('attendance') . '<b></td><td>';
$att_form .= select_box('event_attendance', $options, array('id' => 'viewEventFormComboAttendance')) . '</td><td>';
$att_form .= input_field('event_id', $event->getId(), array('type' => 'hidden'));
$att_form .= input_field('user_id', logged_user()->getId(), array('type' => 'hidden'));
$att_form .= submit_button(lang('Save'), null, array('style' => 'margin-top:0px;margin-left:10px')) . '</td></tr></table></form>';
}
}
//if
}
// if
$otherInvitationsTable = '';
if (!$event->isNew()) {
$otherInvitations = EventInvitations::findAll(array('conditions' => 'event_id = ' . $event->getId()));
if (isset($otherInvitations) && is_array($otherInvitations)) {
$otherInvitationsTable .= '<div class="coInputMainBlock adminMainBlock" style="width:70%;">';
$otherInvitationsTable .= '<table style="width:100%;"><col width="50%" /><col width="50%" />';
$otherInvitationsTable .= '<tr><th><b>' . lang('name') . '</b></th><th><b>' . lang('participate') . '</b></th></tr>';
$isAlt = false;
$cant = 0;
示例5: text_field
/**
* Creates a new text field.
*
* @param string $name
* @param string|null $value
* @param array $attributes
* @return string
*/
function text_field($name, $value = null, $attributes = [])
{
return input_field($name, $value, 'text', $attributes);
}
示例6: label_tag
echo label_tag(lang('due date'), null, true);
?>
<?php
echo pick_date_widget('milestone_due_date', array_var($milestone_data, 'due_date'));
?>
</div>
<?php
if (logged_user()->getProjectPermission($milestone->getProject(), 'milestones-edit_goal')) {
?>
<div>
<?php
echo label_tag(lang('goal'), 'milestoneFormGoal');
?>
<?php
echo input_field('milestone[goal]', array_var($milestone_data, 'goal'), array('class' => 'short', 'id' => 'milestoneFormGoal'));
?>
</div>
<?php
}
// if
?>
<?php
if (logged_user()->isMemberOfOwnerCompany()) {
?>
<div class="formBlock">
<label><?php
echo lang('private milestone');
?>
: <span class="desc">(<?php
示例7: label_tag
echo label_tag(lang('priority'), 'taskListFormPriority');
?>
<?php
echo input_field('task_list[priority]', array_var($task_list_data, 'priority'), array('class' => 'short', 'id' => 'taskListFormPriority'));
?>
</div>
<?php
if (config_option('enable_efqm') == 'yes' && logged_user()->getProjectPermission($task_list->getProject(), 'tasks-edit_score')) {
?>
<div>
<?php
echo label_tag(lang('score'), 'taskListFormScore');
?>
<?php
echo input_field('task_list[score]', array_var($task_list_data, 'score'), array('class' => 'short', 'id' => 'taskListFormScore'));
?>
<?php
echo '<a href="' . get_url('task', 'edit_score') . '">' . lang('edit score') . '</a>';
?>
</div>
<?php
}
// if
?>
<div>
<?php
echo label_tag(lang('description'), 'taskListFormDescription');
?>
<?php
示例8: checkbox_field
<div id="<?php echo $genid ?>assignto_container_div"></div>
</td><td style="padding-left:10px"><div id="<?php echo $genid ?>taskFormSendNotificationDiv" style="display:none">
<?php echo checkbox_field('task[send_notification]', array_var($task_data, 'send_notification'), array('id' => $genid . 'taskFormSendNotification')) ?>
<label for="<?php echo $genid ?>taskFormSendNotification" class="checkbox"><?php echo lang('send task assigned to notification') ?></label>
</div>
<?php if (!$task->isNew()) { ?>
<?php echo checkbox_field('task[apply_assignee_subtasks]', array_var($task_data, 'apply_assignee_subtasks'), array('id' => $genid . 'taskFormApplyAssignee')) ?>
<label for="<?php echo $genid ?>taskFormApplyAssignee" class="checkbox"><?php echo lang('apply assignee to subtasks') ?></label>
<?php } ?>
</td></tr></table>
</div>
<?php Hook::fire('draw_additional_task_html', $genid, $task); ?>
<?php echo input_field("task[is_template]", array_var($task_data, 'is_template', false), array("type" => "hidden", 'tabindex' => '160')); ?>
<?php echo submit_button($task->isNew() ? (array_var($task_data, 'is_template', false) ? lang('save template') : lang('add task list')) : lang('save changes'), 's', array('tabindex' => '20000')) ?>
</div>
</div>
</form>
<script>
var assigned_user = '<?php echo array_var($task_data, 'assigned_to_contact_id', 0) ?>';
var start = true;
og.drawAssignedToSelectBox = function(companies, only_me, groups) {
usersStore = ogTasks.buildAssignedToComboStore(companies, only_me, groups);
var assignCombo = new Ext.form.ComboBox({
renderTo:'<?php echo $genid ?>assignto_container_div',
name: 'taskFormAssignedToCombo',
示例9: array
?>
<?php
$options = array('project', 'task list', 'task', 'all');
#need to add milestone
foreach ($options as $option) {
$option_attributes = $reminder_prefs->getSummarizedBy() == $option ? array('selected' => 'selected') : null;
$formOptions[] = option_tag(lang($option), $option, $option_attributes);
}
print select_box('prefs_form[summarized_by]', $formOptions);
?>
<?php
echo label_tag(lang('show tasks in future'), null, false);
?>
<?php
echo input_field("prefs_form[future]", $reminder_prefs->getRemindersFuture(), array('size' => '2'));
?>
<?php
echo label_tag(lang('include whom question'), null, false);
?>
<?php
echo yes_no_widget('prefs_form[ivsteam]', 'reminderFormDailySummarized', $reminder_prefs->getIncludeEveryone(), lang('for all'), lang('for me'));
?>
<?php
echo label_tag(lang('days to send'), null, true);
?>
<table>
<tr>
<?php
for ($i = $dayOfWeek; $i < $dayOfWeek + 7; $i++) {
echo "<th><center>" . lang($weekArray[$i % 7]) . "</center></th>";
示例10: label_tag
<div>
<?php
echo label_tag(lang('due date'), null, true);
?>
<?php
echo pick_date_widget('task_list_due_date', array_var($task_list_data, 'due_date'));
?>
</div>
<div>
<?php
echo label_tag(lang('priority'), 'taskListFormPriority');
?>
<?php
echo input_field('task_list[priority]', array_var($task_list_data, 'priority'), array('class' => 'short', 'id' => 'taskListFormPriority'));
?>
</div>
<div>
<?php
echo label_tag(lang('description'), 'taskListFormDescription');
?>
<?php
echo textarea_field('task_list[description]', array_var($task_list_data, 'description'), array('class' => 'short', 'id' => 'taskListFormDescription'));
?>
</div>
<div class="formBlock">
<?php
echo label_tag(lang('milestone'), 'taskListFormMilestone');
示例11: render_object_link_form
echo $genid;
?>
add_linked_objects_div" class="form-tab">
<?php
echo render_object_link_form($milestone);
?>
</div>
<?php
}
// if
?>
<?php
echo input_field("milestone[is_template]", array_var($milestone_data, 'is_template', false), array("type" => "hidden"));
?>
<?php
foreach ($categories as $category) {
?>
<div id="<?php
echo $genid . $category['name'];
?>
" class="form-tab">
<?php
echo $category['content'];
?>
</div>
<?php
示例12: if
<?php if (trim($event_description = $event->getDisplayDescription())) { ?>
<div class="desc"><?php echo clean($event_description) ?></div>
<?php } // if ?>
</td>
<td class="cronEventsDate">
<?php if ($event->getDate() instanceof DateTimeValue)
$date = new DateTimeValue($event->getDate()->getTimestamp() + logged_user()->getTimezone() * 3600);
else $date = null;
?>
<table><tbody><tr><td><?php echo pick_date_widget2('cron_events['.$event->getId().'][date]', $date, null, false) ?>
</td><td><?php echo pick_time_widget2('cron_events['.$event->getId().'][time]', $date) ?>
</td></tr></tbody></table>
</td>
<td class="cronEventsDelay">
<?php echo input_field('cron_events['.$event->getId().'][delay]', $event->getDelay(), array('class' => 'short')) ?>
<span class="desc"><?php echo lang('minutes') ?></span>
</td>
<td class="cronEventsEnabled">
<?php echo checkbox_field('cron_events['.$event->getId().'][enabled]', $event->getEnabled()) ?>
</td>
</tr>
<?php } // foreach ?>
</tbody></table>
<?php echo submit_button(lang('save')) ?> <button class="submit" type="reset"><?php echo lang('reset') ?></button>
<?php } else { ?>
<p><?php echo lang('no cron events to display') ?></p>
<?php } // if ?>
</div>
</form>
示例13: show_addtag_button
/**
* Show button with javascript to add tag from combo to text box
* $src source control name
* $dest destination control name
*/
function show_addtag_button($src, $dest, $attributes = null)
{
$src = 'document.getElementById(\'' . $src . '\').value';
$dest = 'document.getElementById(\'' . $dest . '\').value';
$js = 'javascript:' . 'if(' . $dest . '==\'\') ' . ' ' . $dest . ' = ' . $src . '; ' . ' else ' . ' ' . $dest . ' = ' . ' ' . $dest . ' + ", " +(' . $src . ')';
$attributes['type'] = 'button';
$attributes['onclick'] = $js;
return input_field('addTagButton', '>', $attributes);
}
示例14: trace
<?php } // if {?>
<?php } // foreach ?>
</ul>
<?php } // if ?>
</div>
<?php trace(__FILE__,'body searchBox') ?>
<div id="searchBox">
<form action="<?php echo active_project()->getSearchUrl() ?>" method="get">
<div>
<?php
$search_field_default_value = lang('search') . '...';
$search_field_attrs = array(
'onfocus' => 'if (value == \'' . $search_field_default_value . '\') value = \'\'',
'onblur' => 'if (value == \'\') value = \'' . $search_field_default_value . '\'');
?>
<?php echo input_field('search_for', array_var($_GET, 'search_for', $search_field_default_value), $search_field_attrs) ?><button type="submit"><?php echo lang('search button caption') ?></button>
<input type="hidden" name="c" value="project" />
<input type="hidden" name="a" value="search" />
<input type="hidden" name="active_project" value="<?php echo active_project()->getId() ?>" />
</div>
</form>
</div>
</div>
</div>
<?php trace(__FILE__,'body contentWrapper') ?>
<!-- content wrapper -->
<div id="outerContentWrapper">
<?php if (is_array(page_actions())) { ?>
<div id="page_actionsWrapper">
<div id="page_actionsBlock">
示例15: lang
<div class="desc mail-account-item dataBlock"><?php
echo lang('personal settings desc');
?>
</div>
<div class="mail-account-item dataBlock">
<label for="<?php
echo $genid;
?>
sender_name">
<?php
echo lang('mail account sender name');
?>
</label>
<?php
echo input_field('sender_name', array_var($user_settings, 'sender_name', ''), array('id' => $genid . "sender_name", 'tabindex' => 1210));
?>
<span class="desc"><?php
echo lang('mail account sender name description');
?>
</span>
</div>
<?php
if ($is_admin) {
?>
<div class="mail-account-item dataBlock">
<label for="<?php
echo $genid;
?>
assign_to">