本文整理汇总了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;