コード例 #1
0
ファイル: address_edit.php プロジェクト: proxymoron/tracmor
        }
    }
    //Set display logic for the CustomFields
    protected function UpdateCustomFields()
    {
        if ($this->arrCustomFields) {
            foreach ($this->arrCustomFields as $objCustomField) {
                //Set NextTabIndex only if the custom field is show
                if ($objCustomField['input']->TabIndex == 0 && $objCustomField['ViewAuth'] && $objCustomField['ViewAuth']->AuthorizedFlag) {
                    $objCustomField['input']->TabIndex = $this->GetNextTabIndex();
                }
                //In Create Mode, if the role doesn't have edit access for the custom field and the custom field is required, the field shows as a label with the default value
                if (!$this->blnEditMode && !$objCustomField['blnEdit']) {
                    $objCustomField['lbl']->Display = true;
                    $objCustomField['input']->Display = false;
                    if ($objCustomField['blnRequired']) {
                        if ($objCustomField['EditAuth']->EntityQtypeCustomField->CustomField->DefaultCustomFieldValue) {
                            $objCustomField['lbl']->Text = $objCustomField['EditAuth']->EntityQtypeCustomField->CustomField->DefaultCustomFieldValue->__toString();
                        }
                    }
                }
            }
        }
    }
    protected function getNextTabIndex()
    {
        return $this->intTabIndex++;
    }
}
AddressEditForm::Run('AddressEditForm', __DOCROOT__ . __SUBDIRECTORY__ . '/contacts/address_edit.tpl.php');
コード例 #2
0
ファイル: address_edit.php プロジェクト: heshuai64/einv2
// 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 AddressEditFormBase
require __FORMBASE_CLASSES__ . '/AddressEditFormBase.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 Create, Edit, and Delete functionality
 * of the Address class.  It extends from the code-generated
 * abstract AddressEditFormBase 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 AddressEditForm extends AddressEditFormBase
{
}
// Go ahead and run this form object to render the page and its event handlers, using
// generated/address_edit.tpl.php as the included HTML template file
AddressEditForm::Run('AddressEditForm', 'generated/address_edit.tpl.php');