本文整理汇总了PHP中print_widget函数的典型用法代码示例。如果您正苦于以下问题:PHP print_widget函数的具体用法?PHP print_widget怎么用?PHP print_widget使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_widget函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printView
function printView()
{
?>
<form method="post" id="add-family">
<input type="hidden" name="new_person_submitted" value="1" />
<input type="hidden" name="familyid" value="<?php
echo ents($_REQUEST['familyid']);
?>
" />
<h3>New Person Details</h3>
<?php
$this->_person->printForm();
if ($chooser = Action_Plan::getMultiChooser('execute_plan', 'add_person')) {
?>
<h3>Action Plans</h3>
<p>Execute the following action plans for the new person:</p>
<?php
echo $chooser;
?>
<p>Reference date for plans: <?php
print_widget('plan_reference_date', array('type' => 'date'), NULL);
?>
</p>
<?php
}
?>
<button type="submit" class="btn">Add Family Member</button>
<a href="<?php
echo build_url(array('view' => 'families'));
?>
" class="btn">Cancel</a>
</form>
<?php
}
示例2: _printParams
function _printParams()
{
?>
<form method="get" style="line-height: 200%" class="well well-small form-inline">
<input type="hidden" name="view" value="<?php
echo $_REQUEST['view'];
?>
" />
<?php
echo _('Show the attendance statistics for persons of each (current) status');
?>
<br />
<?php
echo _('between');
?>
<?php
print_widget('start_date', array('type' => 'date'), $this->_start_date);
?>
<?php
echo _('and');
?>
<?php
print_widget('end_date', array('type' => 'date'), $this->_end_date);
?>
<input type="submit" class="btn" value="Go" />
<p class="smallprint"><?php
echo _('Note: Any weeks where a person attendance is left blank (neither present nor absent) are ignored when calculating attendance percentages.');
?>
</p>
</form>
<?php
}
示例3: _printParams
function _printParams()
{
?>
<form method="get" style="line-height: 200%" class="well">
<input type="hidden" name="view" value="<?php
echo $_REQUEST['view'];
?>
" />
Show the average congregational attendance rate of persons of each status<br />
between <?php
print_widget('start_date', array('type' => 'date'), $this->_start_date);
?>
and <?php
print_widget('end_date', array('type' => 'date'), $this->_end_date);
?>
<table>
<tr>
<td>for members of </td>
<td><?php
print_widget('congregations', array('type' => 'reference', 'references' => 'congregation', 'allow_multiple' => TRUE), $this->_congregations);
?>
</td>
</tr>
</table>
<input type="submit" class="btn" value="Go" />
<p class="smallprint">Note: Any weeks where a person's attendance is left blank (neither present nor absent) are ignored when calculating attendance percentages</p>
</form>
<?php
}
示例4: printView
function printView()
{
?>
<form class="well well-small form-inline">
<input type="hidden" name="view" value="<?php
echo $_REQUEST['view'];
?>
" />
<?php
echo _('Show notes assigned to ');
print_widget('assignee', array('type' => 'reference', 'references' => 'staff_member', 'allow_empty' => true, 'empty_text' => 'Anyone', 'filter' => create_function('$x', 'return $x->getValue("active") && (($x->getValue("permissions") & PERM_EDITNOTE) == PERM_EDITNOTE);')), array_get($_REQUEST, 'assignee'));
?>
<button type="submit" class="btn"><?php
echo _('Go');
?>
</button>
</form>
<?php
$reassigning = $this->_reassigning;
if (empty($this->_notes)) {
?>
<p><i><?php
echo _('There are no notes to show');
?>
</i></p>
<?php
} else {
if (!$reassigning && $GLOBALS['user_system']->havePerm(PERM_BULKNOTE)) {
?>
<p class="pull-right">
<a href="<?php
echo build_url(array('reassigning' => 1));
?>
">
<i class="icon-wrench""></i>
<?php
echo _('Edit the assignees for all these notes');
?>
</a>
</p>
<?php
}
?>
<p><b><?php
echo sprintf(_('%s notes in total'), count($this->_notes));
?>
</b></p>
<?php
$notes =& $this->_notes;
include 'templates/list_notes_assorted.template.php';
}
}
示例5: printFieldInterface
function printFieldInterface($name, $prefix = '')
{
if ($name == 'action_date') {
?>
<div class="preserve-value">
<span class="radio-list">
<input type="radio" name="<?php
echo $prefix;
?>
action_date_type" value="fixed"
<?php
if ($this->getValue('action_date_type') == 'fixed') {
echo 'checked="checked"';
}
?>
>
<?php
echo print_widget($prefix . $name, array('type' => 'date'), $this->getValue('action_date'));
?>
</span>
<br />
<span class="radio-list">
<input type="radio" name="<?php
echo $prefix;
?>
action_date_type" value="relative"
<?php
if ($this->getValue('action_date_type') == 'relative') {
echo 'checked="checked"';
}
?>
>
<?php
$this->printFieldInterface('action_date_offset', $prefix);
?>
days
<?php
$this->printFieldInterface('action_date_operator', $prefix);
?>
the reference date
</span>
</div>
<?php
} else {
return parent::printFieldInterface($name, $prefix);
}
}
示例6: printView
function printView()
{
$attendances = $this->_person->getAttendance($_REQUEST['startdate'], $_REQUEST['enddate'], $_REQUEST['groupid']);
$map = array(1 => 'present', '0' => 'absent', '' => 'unknown');
?>
<form method="post">
<table class="table table-bordered table-condensed table-auto-width">
<thead>
<tr>
<?php
foreach ($attendances as $att) {
?>
<th>
<?php
echo format_date($att['date'], FALSE);
?>
</th>
<?php
}
?>
</tr>
</thead>
<tbody>
<tr>
<?php
foreach ($attendances as $att) {
?>
<td>
<?php
print_widget('attendances[' . $att['date'] . ']', array('options' => array('present' => 'Present', 'unknown' => '?', 'absent' => 'Absent'), 'type' => 'select', 'style' => 'colour-buttons', 'class' => 'vertical'), $map[$att['present']]);
?>
</td>
<?php
}
?>
</tr>
</tbody>
</table>
<input type="submit" class="btn" value="Save" />
<a class="btn" href="?view=persons&personid=<?php
echo $this->_person->id;
?>
#attendance">Cancel</a>
</form>
<?php
}
示例7: printFieldInterface
function printFieldInterface($name, $prefix = '')
{
switch ($name) {
case 'password':
if ($GLOBALS['user_system']->getCurrentUser('id') == $this->id || $GLOBALS['user_system']->havePerm(PERM_SYSADMIN)) {
?>
<input type="password" data-minlength="<?php
echo (int) $this->getMinPasswordLength();
?>
" autocomplete="off" name="<?php
echo $prefix . $name . '1';
?>
" /><br />
<input type="password" data-minlength="<?php
echo (int) $this->getMinPasswordLength();
?>
" autocomplete="off" name="<?php
echo $prefix . $name . '2';
?>
" /><br />
<p class="help-inline">Enter once, then again to confirm. Passwords must be at least <?php
echo (int) $this->getMinPasswordLength();
?>
characters and contain 2 letters and 2 numbers</p>
<?php
} else {
?>
<p class="small">A user's password can only be edited by system administrators or the user themselves</p>
<?php
}
break;
case 'restrictions':
$GLOBALS['system']->includeDBClass('person_group');
if ($GLOBALS['user_system']->havePerm(PERM_SYSADMIN)) {
?>
<table class="standard">
<tr>
<th>Restrict to these congregations: </th>
<th>Restrict to these groups:</th>
</tr>
<tr>
<td>
<?php
print_widget('restrictions[congregation]', array('type' => 'reference', 'references' => 'congregation', 'allow_multiple' => true), array_get($this->_restrictions, 'congregation', array()));
?>
</td>
<td>
<?php
Person_Group::printMultiChooser('restrictions[group]', array_get($this->_restrictions, 'group', array()), array(), FALSE);
?>
</td>
</tr>
</table>
<p class="help-inline">If you select congregations or groups here, this user will only be able to see persons who belong to one of the selected congregations or groups. It will look like those are the only congregations, groups and persons in the system. Users with congregation or group restrictions cannot add new persons or families. Changes to restrictions take effect immediately.</p>
<?php
} else {
$this->printFieldValue($name);
?>
<p class="help-inline">Only system administrators can edit this field</p>
<?php
}
break;
case 'permissions':
if ($name == 'permissions') {
// Subtly display the numeric permission level to help with config.php
?>
<div title="This number represents this combination of permissions, and can be used to set the default permissions in the config file" style="color: #ccc; position: absolute; right: 10px; padding: 3px"><?php
echo $this->getValue($name);
?>
</div>
<?php
}
if ($GLOBALS['user_system']->havePerm(PERM_SYSADMIN)) {
parent::printFieldInterface($name, $prefix);
?>
<p class="help-inline"><b>Note:</b> Changes to permissions only take effect the next time a user logs in</p>
<?php
} else {
$this->printFieldValue($name);
?>
<p class="help-inline">Only system administrators can edit this field</p>
<?php
}
break;
default:
parent::printFieldInterface($name, $prefix);
}
}
示例8: _printParams
function _printParams()
{
$views = $GLOBALS['system']->getDBObjectData('roster_view', array());
if (empty($views)) {
print_message("You need to set up some roster views before you can display or edit roster assignments", 'failure');
return;
}
$viewid = $this->_view ? $this->_view->id : null;
?>
<form method="get" class="well well-small no-print">
<input type="hidden" name="view" value="<?php
echo ents($_REQUEST['view']);
?>
" />
<table>
<tr>
<th>Roster view</th>
<td>
<?php
print_widget('viewid', array('type' => 'reference', 'references' => 'roster_view', 'order_by' => 'name'), $viewid);
?>
</td>
<td></td>
</tr>
<tr>
<th class="right">between</th>
<td><?php
print_widget('start_date', array('type' => 'date'), $this->_start_date);
?>
</td>
<td></td>
</tr>
<tr>
<th class="right">and</th>
<td>
<?php
print_widget('end_date', array('type' => 'date'), $this->_end_date);
?>
<button type="submit" class="btn">Go</button>
</td>
</tr>
</table>
</form>
<?php
if ($viewid) {
?>
<p class="no-print">
<?php
if ($this->_editing) {
echo '<a href="' . build_url(array('view' => 'rosters__display_roster_assignments')) . '"><i class="icon-th"></i>Show the read-only version</a>';
} else {
if ($GLOBALS['user_system']->havePerm(PERM_EDITROSTER)) {
echo '<a href="' . build_url(array('view' => 'rosters__edit_roster_assignments')) . '"><i class="icon-wrench"></i>Edit these assignments</a> ';
}
echo '<a target="print-roster" class="med-newwin" href="' . BASE_URL . '?call=display_roster&viewid=' . $viewid . '&start_date=' . $this->_start_date . '&end_date=' . $this->_end_date . '"><i class="icon-print"></i>Show the print/email version</a> ';
echo '<a href="?call=roster_csv&roster_view=' . $viewid . '&start_date=' . $this->_start_date . '&end_date=' . $this->_end_date . '" ><i class="icon-download-alt"></i>Download CSV</a> ';
echo '<a href="?call=email&roster_view=' . $viewid . '&start_date=' . $this->_start_date . '&end_date=' . $this->_end_date . '" class="hidden-frame"><i class="icon-email">@</i>Email all listed persons</a>';
}
?>
</p>
<?php
}
}
开发者ID:howardgrigg,项目名称:jethro-pmm,代码行数:64,代码来源:view_7_rosters__1_display_roster_assignments.class.php
示例9: printPersonFilters
public static function printPersonFilters($age_brackets, $statuses)
{
?>
<div class="row-fluid">
<div class="span6" style="margin-top: 5px">
<label class="checkbox nowrap" >
<?php
print_widget('age_brackets_all', array('type' => 'checkbox', 'attrs' => array('data-toggle' => "visible", 'data-target' => "#agebrackets")), empty($age_brackets));
?>
All age brackets
</label>
<div id="agebrackets" style="<?php
echo empty($age_brackets) ? 'display: none' : '';
?>
">
<?php
print_widget('age_brackets', array('type' => 'select', 'options' => explode(',', AGE_BRACKET_OPTIONS), 'default' => '', 'allow_empty' => true, 'allow_multiple' => true, 'height' => count(explode(',', AGE_BRACKET_OPTIONS))), $age_brackets);
?>
</div>
</div>
<div class="span6" style="margin-top: 5px">
<label class="checkbox nowrap">
<?php
print_widget('statuses_all', array('type' => 'checkbox', 'attrs' => array('data-toggle' => "visible", 'data-target' => "#statuses")), empty($statuses));
?>
All statuses
</label>
<div id="statuses" style="<?php
echo empty($statuses) ? 'display: none' : '';
?>
">
<?php
$statusOptions = self::getStatusOptions();
print_widget('statuses', array('type' => 'select', 'options' => $statusOptions, 'default' => '', 'allow_empty' => true, 'allow_multiple' => true, 'height' => count($statusOptions)), $statuses);
?>
</div>
</div>
</div>
<?php
}
示例10: printView
function printView()
{
$congs = $GLOBALS['system']->getDBObjectData('congregation', array('!meeting_time' => ''), 'AND', 'name');
if (empty($congs)) {
print_message("To edit services you must first go to admin > congregations and set the 'code name' for the relevant congregations", 'failure');
return;
}
?>
<form class="well well-small form-inline" style="line-height: 35px">
<input type="hidden" name="view" value="<?php
echo ents($_REQUEST['view']);
?>
" />
Show components containing
<input type="text" name="search" placeholder="Enter search terms" value="<?php
echo ents(array_get($_REQUEST, 'search'));
?>
">
<span style="white-space: nowrap">
tagged with
<?php
print_widget('tagid', array('type' => 'reference', 'references' => 'service_component_tag', 'allow_empty' => TRUE, 'empty_text' => '-- Choose Tag --'), array_get($_REQUEST, 'tagid'));
?>
</span>
used by
<?php
$options = array('' => 'Any Congregation');
foreach ($congs as $id => $cong) {
$options[$id] = $cong['name'];
}
$options['-'] = 'No congregation';
print_widget('congregationid', array('type' => 'select', 'options' => $options), array_get($_REQUEST, 'congregationid'));
?>
<button type="submit" class="btn">Go</button>
<a href="?view=<?php
echo ents($_REQUEST['view']);
?>
" class="btn">Clear</a>
</form>
<div class="row-fluid">
<div class="span6" id="service-comp-manager">
<?php
$cats = $GLOBALS['system']->getDBObjectdata('service_component_category');
$congRestriction = array();
if (!empty($_REQUEST['congregationid'])) {
$congRestriction['congregationid'] = (int) $_REQUEST['congregationid'];
}
?>
<ul class="nav nav-tabs">
<?php
$c = ' class="active"';
foreach ($cats as $catid => $cat) {
?>
<li<?php
echo $c;
?>
><a data-toggle="tab" href="#cat<?php
echo $catid;
?>
"><?php
echo ents($cat['category_name']);
?>
</a></li>
<?php
$c = '';
}
?>
</ul>
<div class="tab-content anchor-bottom">
<?php
$c = ' active';
foreach ($cats as $catid => $cat) {
?>
<div class="tab-pane<?php
echo $c;
?>
" id="cat<?php
echo $catid;
?>
">
<p class="pull-right">
<a href="?view=_import_service_components&categoryid=<?php
echo (int) $catid;
?>
"><i class="icon-upload"></i>Import</a>
<a href="?view=_add_service_component&categoryid=<?php
echo (int) $catid;
?>
"><i class="icon-plus-sign"></i>Add</a>
</p>
<table style="width: 100%;" class="table table-bordered service-comps clickable-rows">
<thead>
<tr>
<th>Title</th>
<?php
if (empty($_REQUEST['congregationid'])) {
?>
<th>Used By</th>
//.........这里部分代码省略.........
示例11: printForm
function printForm()
{
$GLOBALS['system']->includeDBClass('person_group');
$params = $this->getValue('params');
?>
<h3>Find me people...</h3>
<h4>whose person/family record matches these rules:</h4>
<table class="table table-border table-auto-width indent-left table-condensed">
<?php
foreach ($this->_query_fields as $i) {
$v = $this->_field_details[$i];
if (in_array($v['type'], array('select', 'reference', 'datetime', 'text')) && !in_array($i, array('p.first_name', 'p.last_name', 'f.family_name', 'p.remarks', 'p.email'))) {
?>
<tr>
<td>
<label class="checkbox">
<input autofocus="1" type="checkbox" name="enable_rule[]" value="<?php
echo $i;
?>
" id="enable_rule_<?php
echo $i;
?>
" class="select-rule-toggle" <?php
if (isset($params['rules'][$i])) {
echo 'checked="checked" ';
}
?>
/>
<strong><?php
echo $v['label'];
?>
</strong>
<?php
if ($v['type'] == 'datetime') {
echo 'is between...';
} else {
echo 'is...';
}
?>
</label>
</td>
<td>
<div class="select-rule-options" <?php
if (!isset($params['rules'][$i])) {
echo 'style="display: none" ';
}
?>
>
<?php
$key = str_replace('.', '_', $i);
if ($v['type'] == 'datetime') {
$value = array_get($params['rules'], $i, array('from' => '2000-01-01', 'to' => date('Y-m-d')));
print_widget('params_' . $key . '_from', array('type' => 'date'), $value['from']);
echo ' and ';
print_widget('params_' . $i . '_to', array('type' => 'date'), $value['to']);
} else {
$v['allow_multiple'] = TRUE;
print_widget('params_' . $key, $v, array_get($params['rules'], $i, $v['type'] == 'select' ? array() : ''));
}
?>
</div>
</td>
</tr>
<?php
}
}
?>
</table>
<?php
// DATE FIELD RULES
if ($GLOBALS['system']->featureEnabled('DATES')) {
if (empty($params['dates']) && !empty($params['rules']['date'])) {
$params['dates'][] = $params['rules']['date'] + array('criteria' => 'between');
unset($params['rules']['date']);
}
?>
<h4>who have
<?php
$dlParams = array('type' => 'select', 'options' => array('OR' => 'any', 'AND' => 'all'));
print_widget('params_date_logic', $dlParams, array_get($params, 'date_logic', 'AND'));
?>
the following date fields...</h4>
<table class="table expandable indent-left" id="datefield-rules">
<?php
$values = array_get($params, 'dates', array());
if (empty($values)) {
$values[] = array('typeid' => NULL, 'criteria' => 'any', 'anniversary' => TRUE, 'from' => '2000-01-01', 'to' => date('Y-m-d'));
}
foreach ($values as $i => $value) {
?>
<tr>
<td class="narrow">
<?php
print_widget('params_date_' . $i . '_typeid', array('type' => 'select', 'options' => array(0 => '--Choose--') + Person::getDateTypes()), (string) $value['typeid']);
?>
</td>
<td>
<?php
//.........这里部分代码省略.........
示例12: printForm
function printForm()
{
$GLOBALS['system']->includeDBClass('person_group');
$actions = $this->getValue('actions');
$notes = array_get($actions, 'notes');
if (empty($notes)) {
$notes = array(array());
// 1 blank note to start us off
}
?>
<table class="action-plan">
<tbody>
<tr>
<th>Name</th>
<td><?php
$this->printFieldInterface('name');
?>
</td>
</tr>
<tr>
<th>Notes</th>
<td>
When this plan is executed, add these notes to the person/family:
<table class="expandable">
<?php
foreach ($notes as $i => $note) {
?>
<tr>
<td>
<div class="well">
<?php
$this->_printNoteForm($note, $i);
?>
</div>
</td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
<tr>
<th>Groups</th>
<td>
When this plan is executed, <b>add</b> the persons / famiy members to these groups:
<?php
Person_Group::printMultiChooser('groups', array_get($actions, 'groups', array()), array(), FALSE);
?>
</td>
</tr>
<tr>
<th></th>
<td>
When this plan is executed, <b>remove</b> the persons / famiy members from these groups:
<?php
Person_Group::printMultiChooser('groups_remove', array_get($actions, 'groups_remove', array()), array(), FALSE);
?>
</td>
</tr>
<tr>
<th>Fields</th>
<td>
When this plan is executed, for each person / family member:
<table class="fields">
<?php
$fields = array_get($actions, 'fields', array());
$dummy = new Person();
foreach (array('congregationid', 'status', 'age_bracket') as $field) {
$value = '';
$addToExisting = FALSE;
$v = array_get($fields, $field);
if ($v) {
$value = $v['value'];
$addToExisting = $v['add'];
}
$dummy->fields[$field]['allow_empty'] = TRUE;
$dummy->fields[$field]['empty_text'] = '(No change)';
if (strlen($value)) {
$dummy->setValue($field, $value);
}
echo '<tr><td>';
print_widget('fields_enabled[' . $field . ']', array('type' => 'checkbox'), strlen($value));
echo 'Set ' . $dummy->getFieldLabel($field) . ' </td><td>';
$dummy->printFieldInterface($field);
echo '</td></tr>';
}
$customFields = $GLOBALS['system']->getDBObjectData('custom_field', array(), 'OR', 'rank');
$dummy = new Custom_Field();
$addParams = array('type' => 'select', 'options' => array('Replacing existing values ', 'Adding to existing values'));
foreach ($customFields as $fieldid => $fieldDetails) {
$value = '';
$addToExisting = FALSE;
$v = array_get($fields, 'custom_' . $fieldid);
if ($v) {
$value = $v['value'];
$addToExisting = $v['add'];
}
$dummy->populate($fieldid, $fieldDetails);
echo '<tr><td>';
//.........这里部分代码省略.........
示例13: print_widget
<span class="furtherspan"><a href="html/year.php?volume=14&year=2013" >೨೦೧೩<br />(ಸಂಪುಟ ೧೪)<br />ವಾರ್ಷಿಕ ಅನುಕ್ರಮಣಿಕೆ</a></span><br />
</div>
</div>
<div class="art_widget">
<div>
<a href="http://www.caminova.net/en/downloads/download.aspx?id=1" ><img src="html/images/djvu.png" alt="cover" title="ಡೆಜವೂ ಪ್ಲಗಿನ್"/></a>
</div>
<div style="width: 50%;" class="text">
<span class="furtherspan"><a href="http://www.caminova.net/en/downloads/download.aspx?id=1" >ಲೇಖನಗಳನ್ನು ಡೆಜವೂ (DjVu) ರೂಪದಲ್ಲಿಟ್ಟಿದೆ. ಅವುಗಳನ್ನು ನೋಡಲು ಡೆಜವೂ ಪ್ಲಗಿನ್ ಅಗತ್ಯ. ಇದು ಮುಕ್ತವಾಗಿ ಇಲ್ಲಿ ಸಿಗುತ್ತದೆ:</a></span><br />
</div>
</div>
<div class="art_widget">
<div class="tbar">ವಿಶೇಷ ಸಂಚಿಕೆ</div>
<?php
print_widget("ಸಂಪಾದಕೀಯ-1");
?>
</div>
</div>
</div>
<div class="footer">
<div class="foot_box">
<div class="left">
<ul>
<li><a href="javascript:void()">Terms of Use</a></li>
<li>|</li>
<li><a href="javascript:void()">Privacy Policy</a></li>
<li>|</li>
<li><a href="javascript:void()">Contact us</a></li>
</ul>
示例14: _printParams
function _printParams()
{
?>
<form method="get" class="well well-small clearfix">
<input type="hidden" name="view" value="<?php
echo $_REQUEST['view'];
?>
" />
<table class="attendance-config-table valign-middle">
<tr>
<th>Show attendance for</th>
<td colspan="2" class="fill-me">
<?php
print_widget('age_bracket', array('type' => 'select', 'options' => array('' => 'All age brackets') + explode(',', AGE_BRACKET_OPTIONS), 'default' => '', 'allow_empty' => false), $this->age_bracket);
?>
</td>
</tr>
<tr>
<th rowspan="2">at</th>
<td class="valign-top">
<label class="radio">
<input type="radio" name="for_type"
value="congregationid" id="for_type_congregation"
data-toggle="enable" data-target="#congregationchooser select"
<?php
if (empty($this->groupid)) {
echo 'checked="checked"';
}
?>
>
Congregation(s)
</label>
</td>
<td class="fill-me">
<table id="congregationchooser" class="expandable table-condensed no-padding" cellspacing="0">
<?php
$congs = $this->congregationids ? $this->congregationids : array(0);
foreach ($congs as $congid) {
?>
<tr>
<td>
<?php
print_widget('congregationid[]', array('type' => 'reference', 'references' => 'congregation', 'order_by' => 'name', 'allow_empty' => true, 'empty_text' => '-- Choose --'), $congid);
?>
</td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
<tr>
<td>
<label class="radio">
<input type="radio" name="for_type"
value="groupid" id="for_type_group"
data-toggle="enable" data-target="#groupchooser select"
<?php
if (!empty($this->groupid)) {
echo 'checked="checked"';
}
?>
>
Group
</label>
</td>
<td class="fill-me" id="groupchooser">
<?php
print_widget('groupid', array('type' => 'reference', 'references' => 'person_group', 'filter' => array('can_record_attendance' => '1', 'is_archived' => 0)), $this->groupid);
?>
</td>
</tr>
<tr>
<th>between</th>
<td colspan="2">
<?php
print_widget('start_date', array('type' => 'date'), $this->start_date);
?>
</td>
</tr>
<tr>
<th>and</th>
<td colspan="2">
<?php
print_widget('end_date', array('type' => 'date'), $this->end_date);
?>
</td>
</tr>
</table>
<button type="submit" class="btn attendance-config-submit">Go <i class="icon-chevron-right"></i></button>
<input type="hidden" name="params_submitted" value="1" />
</form>
<?php
}
示例15: printWidget
/**
* Print an interface for an end user to enter a value for this custom field for a person record
* @param mixed $value Existing value
* @param array $extraPrams Any extra params to pass to print_widget.
*/
public function printWidget($value, $extraParams = array())
{
print_widget('custom_' . $this->id . '[]', $extraParams + $this->getWidgetParams(), $value);
if ($this->getValue('type') == 'date' && !empty($this->values['params']['allow_note'])) {
$bits = explode(' ', $value);
$note = array_get($bits, 1);
print_widget('custom_' . $this->id . '_note[]', array('type' => 'text', 'placeholder' => '(Note)'), $note);
}
}