本文整理汇总了PHP中simbio_form_element::hiddenField方法的典型用法代码示例。如果您正苦于以下问题:PHP simbio_form_element::hiddenField方法的具体用法?PHP simbio_form_element::hiddenField怎么用?PHP simbio_form_element::hiddenField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simbio_form_element
的用法示例。
在下文中一共展示了simbio_form_element::hiddenField方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: viewKardexes
/**
* View kardex list
* @return string
**/
public function viewKardexes()
{
$_can_read = utility::havePrivilege('serial_control', 'r');
$_can_write = utility::havePrivilege('serial_control', 'w');
// start the output buffer
ob_start();
?>
<script type="text/javascript">
function confirmProcess(int_serial_id, int_kardex_id)
{
var confirmBox = confirm('Are you sure to remove selected Kardex data?' + "\n" + 'Once deleted, it can\'t be restored!');
if (confirmBox) {
// set hidden element value
document.hiddenActionForm.serialID.value = int_serial_id;
document.hiddenActionForm.remove.value = int_kardex_id;
// submit form
document.hiddenActionForm.submit();
}
}
</script>
<?php
$_table = new simbio_table();
$_table->table_attr = 'align="center" class="detailTable" style="width: 100%;" cellpadding="2" cellspacing="0"';
$_table->table_header_attr = 'class="dataListHeader" style="font-weight: bold;"';
$_table->highlight_row = true;
$_table->setHeader(array(' ', __('Date Expected'), __('Date Received'), __('Seq. Number'), __('Note')));
if ($_can_read and $_can_write) {
$_add_link = '<span title="Add New Kardex" class="extendLink"> </span>';
$_date_exp = simbio_form_element::dateField('dateExpected[0]');
$_date_rec = simbio_form_element::dateField('dateReceived[0]');
$_seq_num = simbio_form_element::textField('text', 'seqNumber[0]', '', 'width: 100%;');
$_notes = simbio_form_element::textField('text', 'notes[0]', '', 'width: 100%;');
$_table->appendTableRow(array($_add_link, $_date_exp, $_date_rec, $_seq_num, $_notes));
$_table->setCellAttr(1, null, 'valign="top" class="alterCell2" style="font-weight: bold; width: auto;"');
$_table->setCellAttr(1, 0, 'valign="top" class="alterCell2" style="font-weight: bold; width: 5%;"');
$_table->setCellAttr(1, 1, 'valign="top" class="alterCell2" style="font-weight: bold; width: 25%;"');
$_table->setCellAttr(1, 2, 'valign="top" class="alterCell2" style="font-weight: bold; width: 25%;"');
}
$_row = 2;
foreach ($this->getKardexes() as $_kardex) {
// alternate the row color
$_row_class = $_row % 2 == 0 ? 'alterCell' : 'alterCell2';
if ($_can_read and $_can_write) {
// kardex removal links
$_remove_link = '<a href="#" onclick="confirmProcess(' . $this->serial_id . ', ' . $_kardex['kardex_id'] . ')" class="trashLink notAJAX"> </a>';
$_date_exp = simbio_form_element::dateField('dateExpected[' . $_kardex['kardex_id'] . ']', $_kardex['date_expected']);
$_date_rec = simbio_form_element::dateField('dateReceived[' . $_kardex['kardex_id'] . ']', $_kardex['date_received']);
$_seq_num = simbio_form_element::textField('text', 'seqNumber[' . $_kardex['kardex_id'] . ']', $_kardex['seq_number'], 'width: 100%;');
$_notes = simbio_form_element::textField('text', 'notes[' . $_kardex['kardex_id'] . ']', $_kardex['notes'], 'width: 100%;');
} else {
$_remove_link = ' ';
$_date_exp = $_kardex['date_expected'];
$_date_rec = $_kardex['date_received'];
$_seq_num = $_kardex['seq_number'];
$_notes = $_kardex['notes'];
}
$_table->appendTableRow(array($_remove_link, $_date_exp, $_date_rec, $_seq_num, $_notes));
$_table->setCellAttr($_row, null, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: auto;"');
$_table->setCellAttr($_row, 0, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 5%;"');
$_table->setCellAttr($_row, 1, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 25%;"');
$_table->setCellAttr($_row, 2, 'valign="top" class="' . $_row_class . '" style="font-weight: bold; width: 25%;"');
$_row++;
}
// button
$_button_grp = '<div style="padding: 3px; background: #999999;"><input type="submit" class="button" name="saveKardexes" value="' . __('Save') . '" /></div>';
// header
echo '<div style="padding: 5px; background: #CCCCCC;">' . __('Kardex Detail for subscription') . ' <strong>' . $this->serial_period . '</strong></div>';
if ($_can_read and $_can_write) {
echo '<form method="post" name="kardexListForm" id="kardexListForm" action="' . $_SERVER['PHP_SELF'] . '">';
echo $_button_grp;
}
echo $_table->printTable();
if ($_can_read and $_can_write) {
echo $_button_grp;
echo simbio_form_element::hiddenField('serialID', $this->serial_id);
echo '</form>';
// hidden form
echo '<form name="hiddenActionForm" method="post" action="' . $_SERVER['PHP_SELF'] . '"><input type="hidden" name="serialID" value="0" /><input type="hidden" name="remove" value="0" /></form>';
}
/* main content end */
$_content = ob_get_clean();
return $_content;
}