Exemple #1
0
        }
    }
    //Set display logic of the Create New Contact
    protected function UpdateContactAccess()
    {
        //checks if the entity  has edit authorization
        $objRoleEntityQtypeBuiltInAuthorization = RoleEntityQtypeBuiltInAuthorization::LoadByRoleIdEntityQtypeIdAuthorizationId(QApplication::$objRoleModule->RoleId, EntityQtype::Contact, 2);
        if ($objRoleEntityQtypeBuiltInAuthorization && $objRoleEntityQtypeBuiltInAuthorization->AuthorizedFlag) {
            $this->btnCreateContact->Visible = true;
        } else {
            $this->btnCreateContact->Visible = false;
        }
    }
    //Set display logic of the Create New Contact
    protected function UpdateAddressAccess()
    {
        //checks if the entity  has edit authorization
        $objRoleEntityQtypeBuiltInAuthorization = RoleEntityQtypeBuiltInAuthorization::LoadByRoleIdEntityQtypeIdAuthorizationId(QApplication::$objRoleModule->RoleId, EntityQtype::Address, 2);
        if ($objRoleEntityQtypeBuiltInAuthorization && $objRoleEntityQtypeBuiltInAuthorization->AuthorizedFlag) {
            $this->btnCreateAddress->Visible = true;
        } else {
            $this->btnCreateAddress->Visible = false;
        }
    }
    protected function getNextTabIndex()
    {
        return $this->intTabIndex++;
    }
}
CompanyEditForm::Run('CompanyEditForm', __DOCROOT__ . __SUBDIRECTORY__ . '/contacts/company_edit.tpl.php');
Exemple #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 CompanyEditFormBase
require __FORMBASE_CLASSES__ . '/CompanyEditFormBase.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 Company class.  It extends from the code-generated
 * abstract CompanyEditFormBase 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 CompanyEditForm extends CompanyEditFormBase
{
}
// Go ahead and run this form object to render the page and its event handlers, using
// generated/company_edit.tpl.php as the included HTML template file
CompanyEditForm::Run('CompanyEditForm', 'generated/company_edit.tpl.php');