本文整理匯總了PHP中CSubmit::addAction方法的典型用法代碼示例。如果您正苦於以下問題:PHP CSubmit::addAction方法的具體用法?PHP CSubmit::addAction怎麽用?PHP CSubmit::addAction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CSubmit
的用法示例。
在下文中一共展示了CSubmit::addAction方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: CPassBox
if (isset($this->data['change_bind_password']) || zbx_empty($this->data['config']['ldap_bind_password'])) {
$authenticationForm->addVar('change_bind_password', 1);
$authenticationFormList->addRow(_('Bind password'), new CPassBox('ldap_bind_password', null, ZBX_TEXTBOX_SMALL_SIZE));
} else {
$authenticationFormList->addRow(_('Bind password'), new CSubmit('change_bind_password', _('Change password'), null, 'formlist'));
}
$authenticationFormList->addRow(_('Test authentication'), ' [' . _('must be a valid LDAP user') . ']');
$authenticationFormList->addRow(_('Login'), $userComboBox);
$authenticationFormList->addRow(_('User password'), new CPassBox('user_password', null, ZBX_TEXTBOX_SMALL_SIZE));
}
// append form list to tab
$authenticationTab = new CTabView();
$authenticationTab->addTab('authenticationTab', $this->data['title'], $authenticationFormList);
// append tab to form
$authenticationForm->addItem($authenticationTab);
// create save button
$saveButton = new CSubmit('save', _('Save'));
if ($this->data['is_authentication_type_changed']) {
$saveButton->addAction('onclick', 'javascript: ' . 'if (Confirm("' . _('Switching authentication method will reset all except this session! Continue?') . '")) {' . 'jQuery("#authenticationForm").submit(); return true; } else { return false; }');
} elseif ($this->data['config']['authentication_type'] != ZBX_AUTH_LDAP) {
$saveButton->setAttribute('disabled', 'true');
}
// append buttons to form
if ($this->data['config']['authentication_type'] == ZBX_AUTH_LDAP) {
$authenticationForm->addItem(makeFormFooter($saveButton, new CSubmit('test', _('Test'))));
} else {
$authenticationForm->addItem(makeFormFooter($saveButton));
}
// append form to widget
$authenticationWidget->addItem($authenticationForm);
return $authenticationWidget;