Exemplo n.º 1
0
        // Enable Pagination, and set to 20 items per page
        $objPaginator = new QPaginator($this->dtgCustomField);
        $this->dtgCustomField->Paginator = $objPaginator;
        $this->dtgCustomField->ItemsPerPage = 20;
        $this->dtgCustomField->AddColumn(new QDataGridColumn('Field Name', '<?= $_ITEM->__toStringWithLink("bluelink") ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomField()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomField()->ShortDescription, false), 'CssClass' => "dtg_column", 'HtmlEntities' => false)));
        $this->dtgCustomField->AddColumn(new QDataGridColumn('Type', '<?= CustomFieldQtype::ToString($_ITEM->CustomFieldQtypeId) ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomField()->CustomFieldQtypeId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomField()->CustomFieldQtypeId, false), 'CssClass' => "dtg_column")));
        $this->dtgCustomField->AddColumn(new QDataGridColumn('Enabled', '<?= $_ITEM->__toStringActiveFlag() ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomField()->ActiveFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomField()->ActiveFlag, false), 'CssClass' => "dtg_column", 'HtmlEntities' => false)));
        $this->dtgCustomField->AddColumn(new QDataGridColumn('Required', '<?= $_ITEM->__toStringRequiredFlag() ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomField()->RequiredFlag), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomField()->RequiredFlag, false), 'CssClass' => "dtg_column", 'HtmlEntities' => false)));
        $this->dtgCustomField->AddColumn(new QDataGridColumn('Created By', '<?= $_ITEM->CreatedByObject->__toStringFullName() ?>', array('OrderByClause' => QQ::OrderBy(QQN::CustomField()->CreatedByObject->LastName, false, QQN::CustomField()->CreatedByObject->FirstName, false), 'ReverseOrderByClause' => QQ::OrderBy(QQN::CustomField()->CreatedByObject->LastName, QQN::CustomField()->CreatedByObject->FirstName), 'CssClass' => "dtg_column")));
        $this->dtgCustomField->SortColumnIndex = 0;
        $this->dtgCustomField->SortDirection = 0;
        $objStyle = $this->dtgCustomField->RowStyle;
        $objStyle->ForeColor = '#000000';
        $objStyle->BackColor = '#FFFFFF';
        $objStyle->FontSize = 12;
        $objStyle = $this->dtgCustomField->AlternateRowStyle;
        $objStyle->BackColor = '#EFEFEF';
        $objStyle = $this->dtgCustomField->HeaderRowStyle;
        $objStyle->ForeColor = '#000000';
        $objStyle->BackColor = '#EFEFEF';
        $objStyle->CssClass = 'dtg_header';
    }
    protected function btnNew_Click()
    {
        QApplication::Redirect('custom_field_edit.php');
    }
}
// Go ahead and run this form object to generate the page and event handlers, using
// generated/custom_field_edit.php.inc as the included HTML template file
CustomFieldListForm::Run('CustomFieldListForm', __DOCROOT__ . __SUBDIRECTORY__ . '/admin/custom_field_list.tpl.php');
Exemplo n.º 2
0
// Include prepend.inc to load Qcodo
require '../includes/prepend.inc.php';
/* if you DO NOT have "includes/" in your include_path */
// require('prepend.inc.php');				/* if you DO have "includes/" in your include_path */
// Include the classfile for CustomFieldListFormBase
require __FORMBASE_CLASSES__ . '/CustomFieldListFormBase.class.php';
// Security check for ALLOW_REMOTE_ADMIN
// To allow access REGARDLESS of ALLOW_REMOTE_ADMIN, simply remove the line below
QApplication::CheckRemoteAdmin();
/**
 * This is a quick-and-dirty draft form object to do the List All functionality
 * of the CustomField class.  It extends from the code-generated
 * abstract CustomFieldListFormBase class.
 *
 * Any display customizations and presentation-tier logic can be implemented
 * here by overriding existing or implementing new methods, properties and variables.
 *
 * Additional qform control objects can also be defined and used here, as well.
 * 
 * @package My Application
 * @subpackage FormDraftObjects
 * 
 */
class CustomFieldListForm extends CustomFieldListFormBase
{
}
// Go ahead and run this form object to generate the page and event handlers, using
// generated/custom_field_list.tpl.php as the included HTML template file
CustomFieldListForm::Run('CustomFieldListForm', 'generated/custom_field_list.tpl.php');