Example #1
0
        }
    }
    protected function chkPortableAccessFlag_Click($strFormId, $strControlId, $strParameter)
    {
        if ($this->chkPortableAccessFlag->Checked) {
            $this->txtPortableUserPin->Required = true;
        } else {
            $this->txtPortableUserPin->Required = false;
        }
    }
    // Protected Update Methods
    protected function UpdateUserAccountFields()
    {
        $this->objUserAccount->FirstName = $this->txtFirstName->Text;
        $this->objUserAccount->LastName = $this->txtLastName->Text;
        $this->objUserAccount->Username = $this->txtUsername->Text;
        if ($this->txtPassword->Text) {
            $this->objUserAccount->PasswordHash = sha1($this->txtPassword->Text);
        }
        $this->objUserAccount->EmailAddress = $this->txtEmailAddress->Text;
        $this->objUserAccount->ActiveFlag = $this->chkActiveFlag->Checked;
        $this->objUserAccount->AdminFlag = $this->chkAdminFlag->Checked;
        $this->objUserAccount->PortableAccessFlag = $this->chkPortableAccessFlag->Checked;
        $this->objUserAccount->PortableUserPin = $this->txtPortableUserPin->Text;
        $this->objUserAccount->RoleId = $this->lstRole->SelectedValue;
    }
}
// Go ahead and run this form object to render the page and its event handlers, using
// generated/user_account_edit.php.inc as the included HTML template file
UserAccountEditForm::Run('UserAccountEditForm', __DOCROOT__ . __SUBDIRECTORY__ . '/admin/user_account_edit.tpl.php');
Example #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 UserAccountEditFormBase
require __FORMBASE_CLASSES__ . '/UserAccountEditFormBase.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 UserAccount class.  It extends from the code-generated
 * abstract UserAccountEditFormBase 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 UserAccountEditForm extends UserAccountEditFormBase
{
}
// Go ahead and run this form object to render the page and its event handlers, using
// generated/user_account_edit.tpl.php as the included HTML template file
UserAccountEditForm::Run('UserAccountEditForm', 'generated/user_account_edit.tpl.php');