本文整理汇总了PHP中Form_Input::setDisabled方法的典型用法代码示例。如果您正苦于以下问题:PHP Form_Input::setDisabled方法的具体用法?PHP Form_Input::setDisabled怎么用?PHP Form_Input::setDisabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form_Input
的用法示例。
在下文中一共展示了Form_Input::setDisabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strtoupper
$section = new Form_Section('User Properties');
$section->addInput(new Form_StaticText('Defined by', strtoupper($pconfig['utype'])));
$form->addGlobal(new Form_Input('utype', null, 'hidden', $pconfig['utype']));
$section->addInput(new Form_Checkbox('disabled', 'Disabled', 'This user cannot login', $pconfig['disabled']));
$section->addInput($input = new Form_Input('usernamefld', 'Username', 'text', $pconfig['usernamefld']));
if ($ro) {
$input->setReadonly();
}
$form->addGlobal(new Form_Input('oldusername', null, 'hidden', $pconfig['usernamefld']));
$group = new Form_Group('Password');
$group->add(new Form_Input('passwordfld1', 'Password', 'password'));
$group->add(new Form_Input('passwordfld2', 'Confirm Password', 'password'));
$section->add($group);
$section->addInput($input = new Form_Input('descr', 'Full name', 'text', htmlspecialchars($pconfig['descr'])))->setHelp('User\'s full name, for your own information only');
if ($ro) {
$input->setDisabled();
}
$section->addInput(new Form_Input('expires', 'Expiration date', 'date', $pconfig['expires']))->setHelp('Leave blank if the account shouldn\'t expire, otherwise enter ' . 'the expiration date');
// ==== Group membership ==================================================
$group = new Form_Group('Group membership');
// Make a list of all the groups configured on the system, and a list of
// those which this user is a member of
$systemGroups = array();
$usersGroups = array();
$usergid = [$pconfig['usernamefld']];
foreach ($config['system']['group'] as $Ggroup) {
if ($Ggroup['name'] != "all") {
if ($act == 'edit' && $Ggroup['member'] && in_array($pconfig['uid'], $Ggroup['member'])) {
$usersGroups[$Ggroup['name']] = $Ggroup['name'];
// Add it to the user's list
} else {