本文整理汇总了PHP中print_custom_field_input函数的典型用法代码示例。如果您正苦于以下问题:PHP print_custom_field_input函数的具体用法?PHP print_custom_field_input怎么用?PHP print_custom_field_input使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_custom_field_input函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach ($t_related_custom_field_ids as $t_id) {
$t_def = custom_field_get_definition($t_id);
if (($t_def['display_update'] || $t_def['require_update']) && custom_field_has_write_access($t_id, $t_bug_id)) {
$t_custom_fields_found = true;
echo '<tr>';
echo '<td class="category">';
if ($t_def['require_update']) {
echo '<span class="required">*</span>';
}
if ($t_def['type'] != CUSTOM_FIELD_TYPE_RADIO && $t_def['type'] != CUSTOM_FIELD_TYPE_CHECKBOX) {
echo '<label for="custom_field_' . string_attribute($t_def['id']) . '">' . string_display(lang_get_defaulted($t_def['name'])) . '</label>';
} else {
echo string_display(lang_get_defaulted($t_def['name']));
}
echo '</td><td colspan="5">';
print_custom_field_input($t_def, $t_bug_id);
echo '</td></tr>';
}
}
# foreach( $t_related_custom_field_ids as $t_id )
if ($t_custom_fields_found) {
# spacer
echo '<tr class="spacer"><td colspan="6"></td></tr>';
echo '<tr class="hidden"></tr>';
}
# Bugnote Text Box
echo '<tr>';
echo '<th class="category"><label for="bugnote_text">' . lang_get('add_bugnote_title') . '</label></th>';
echo '<td colspan="5"><textarea ', helper_get_tab_index(), ' id="bugnote_text" name="bugnote_text" cols="80" rows="10"></textarea></td></tr>';
# Bugnote Private Checkbox (if permitted)
if (access_has_bug_level(config_get('private_bugnote_threshold'), $t_bug_id)) {
示例2: string_attribute
<label for="custom_field_<?php
echo string_attribute($t_def['id']);
?>
"><?php
echo string_display(lang_get_defaulted($t_def['name']));
?>
</label>
<?php
} else {
echo string_display(lang_get_defaulted($t_def['name']));
}
?>
</th>
<td>
<?php
print_custom_field_input($t_def, $f_master_bug_id === 0 ? null : $f_master_bug_id);
?>
</td>
</tr>
<?php
}
}
# foreach( $t_related_custom_field_ids as $t_id )
# File Upload (if enabled)
if ($t_show_attachments) {
$t_max_file_size = (int) min(ini_get_number('upload_max_filesize'), ini_get_number('post_max_size'), config_get('max_file_size'));
$t_file_upload_max_num = max(1, config_get('file_upload_max_num'));
?>
<tr>
<th class="category">
<label for="file"><?php
示例3: if
?>
<div class="field-container">
<label>
<span>
<?php if( $t_def['require_report'] ) { ?>
<span class="required">*</span>
<?php } ?>
<?php if( $t_def['type'] != CUSTOM_FIELD_TYPE_RADIO && $t_def['type'] != CUSTOM_FIELD_TYPE_CHECKBOX ) { ?>
<label for="custom_field_<?php echo string_attribute( $t_def['id'] ) ?>"><?php echo string_display( lang_get_defaulted( $t_def['name'] ) ) ?></label>
<?php } else {
echo string_display( lang_get_defaulted( $t_def['name'] ) );
} ?>
</span>
</label>
<span class="input">
<?php print_custom_field_input( $t_def, ( $f_master_bug_id === 0 ) ? null : $f_master_bug_id ) ?>
</span>
<span class="label-style"></span>
</div>
<?php
}
} # foreach( $t_related_custom_field_ids as $t_id )
?>
<?php
# File Upload (if enabled)
if( $t_show_attachments ) {
$t_max_file_size = (int)min( ini_get_number( 'upload_max_filesize' ), ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );
$t_file_upload_max_num = max( 1, config_get( 'file_upload_max_num' ) );
?>
<div class="field-container">
<label>