本文整理汇总了PHP中Am_Form_Setup::addTextarea方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_Form_Setup::addTextarea方法的具体用法?PHP Am_Form_Setup::addTextarea怎么用?PHP Am_Form_Setup::addTextarea使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Am_Form_Setup
的用法示例。
在下文中一共展示了Am_Form_Setup::addTextarea方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initSetupForm
protected function _initSetupForm(Am_Form_Setup $form)
{
$form->addText('login')->setLabel('API Login')->addRule('required');
$form->addPassword('passwd')->setLabel('API Password')->addRule('required');
$form->addText('pslid')->setLabel('PSLID (Service User)')->addRule('required');
$form->addText('sun')->setLabel('Service User Number (SUN)')->addRule('required');
$form->addText('lead_time')->setLabel('Lead time, days')->default = 12;
for ($i = 1; $i <= 28; $i++) {
$options[$i] = ___("%d-th day", $i);
}
$payment_day = $form->addMagicSelect('payment_day')->setLabel(___("Process Payment Day"))->loadOptions($options);
$payment_day->default = 8;
$payment_day->addRule('required');
$form->addText('legal_name', array('class' => 'el-wide'))->setLabel(___("Legal Name\n" . "Please enter the legal name of your organisation " . "which will be included in the Direct Debit Guarantee statement"))->addRule('required');
$form->addTextarea('legal_address', array('class' => 'el-wide', 'rows' => 5))->setLabel(___("Legal Address\n" . "Please enter the legal address of your organisation " . "which will be included in the Direct Debit Guarantee statement"))->addRule('required');
$form->addAdvCheckbox('auddis', array('id' => 'auddis'))->setLabel("Log AUDDIS reports as Tickets in helpdesk\n" . "helpdesk module should be enabled");
$form->addText('auddis_login', array('id' => 'auddis-login'))->setLabel('Username of user for AUDDIS reports');
$form->addScript()->setScript(<<<CUT
(function(){
\$('#auddis').change(function(){
\$('#auddis-login').closest('.row').toggle(this.checked);
}).change();
\$('#auddis-login').autocomplete({
minLength: 2,
source: window.rootUrl + "/admin-users/autocomplete/"
});
})()
CUT
);
}
示例2: _initSetupForm
protected function _initSetupForm(Am_Form_Setup $form)
{
$url = 'https://auth.aweber.com/1.0/oauth/authorize_app/' . self::APP_ID;
$el = $form->addTextarea('auth', array('cols' => 80, 'rows' => 4))->setLabel("aWeber App Authorization Code\n" . "get it on <a target='_blank' href='{$url}'>aWeber Website</a>");
$el->addRule('regex', 'Invalid value', '/^[a-zA-Z0-9]+\\|[a-zA-Z0-9]+\\|[a-zA-Z0-9]+\\|[a-zA-Z0-9]+\\|[a-zA-Z0-9]+\\|\\s*$/');
if ($this->getConfig('auth') && !$this->getConfig('access.access_token')) {
if (!empty($_GET['oauth_token'])) {
$api = $this->getApi();
$api->user->tokenSecret = $_COOKIE['requestTokenSecret'];
$api->user->requestToken = $_GET['oauth_token'];
$api->user->verifier = $_GET['oauth_verifier'];
list($accessToken, $accessTokenSecret) = $api->getAccessToken();
$this->getDi()->config->saveValue('newsletter.aweber.access', array('access_token' => $accessToken, 'access_secret' => $accessTokenSecret));
Am_Controller::redirectLocation(REL_ROOT_URL . "/admin-setup/aweber");
return;
} else {
$api = $this->getApi();
$callbackUrl = Am_Controller::getFullUrl();
try {
list($requestToken, $requestTokenSecret) = $api->getRequestToken($callbackUrl);
Am_Controller::setCookie('requestTokenSecret', $requestTokenSecret);
$form->addStatic()->setLabel('Access Tokens')->setContent(sprintf('Access tokens are empty or expired, %sclick this link%s to update', '<a href="' . Am_Controller::escape($api->getAuthorizeUrl()) . '">', '</a>'));
} catch (Exception $e) {
$this->getDi()->errorLogTable->logException($e);
$form->addStatic()->setLabel('Access Tokens')->setContent('Plugin configuration error. Got an error from API: ' . $e->getMessage());
}
}
}
$fields = $this->getDi()->userTable->getFields(true);
unset($fields['email']);
unset($fields['name_f']);
unset($fields['name_l']);
$ff = $form->addMagicSelect('fields')->setLabel("Pass additional fields to AWeber\nfields must be configured in AWeber with exactly same titles\nelse API calls will fail and users will not be added\n\nBy default the plugin passes \"email\" and \"name\"\nfields to Aweber, so usually you do not need to select \nthat fields to send as additional fields.\n");
$ff->loadOptions(array_combine($fields, $fields));
}
示例3: _initSetupForm
public function _initSetupForm(Am_Form_Setup $form)
{
$plugin = $this->getId();
$form->addText("business", array('size' => 40))->setLabel("Your PayPal Email Address");
$form->addTextarea("alt_business", array('cols' => 40, 'rows' => 3))->setLabel("Other Paypal Email addresses that you have registered in WSO PRO");
$form->addAdvCheckbox("dont_verify")->setLabel("Disable IPN verification\n" . "<b>Usually you DO NOT NEED to enable this option.</b>\n However, on some webhostings PHP scripts are not allowed to contact external\n web sites. It breaks functionality of the PayPal payment integration plugin,\n and aMember Pro then is unable to contact PayPal to verify that incoming\n IPN post is genuine. In this case, AS TEMPORARY SOLUTION, you can enable\n this option to don't contact PayPal server for verification. However,\n in this case \"hackers\" can signup on your site without actual payment.\n So if you have enabled this option, contact your webhost and ask them to\n open outgoing connections to www.paypal.com port 80 ASAP, then disable\n this option to make your site secure again.");
}
示例4: _initSetupForm
public function _initSetupForm(Am_Form_Setup $form)
{
$plugin = $this->getId();
$form->addText("business", array('size' => 40))->setLabel("Primary Paypal E-Mail Address");
$form->addAdvCheckbox("testing")->setLabel("Is it a Sandbox(Testing) Account?");
$form->addTextarea("alt_business", array('cols' => 40, 'rows' => 3))->setLabel("Alternate PayPal account emails (one per line)");
$form->addAdvCheckbox("dont_verify")->setLabel("Disable IPN verification\n" . "<b>Usually you DO NOT NEED to enable this option.</b>\n However, on some webhostings PHP scripts are not allowed to contact external\n web sites. It breaks functionality of the PayPal payment integration plugin,\n and aMember Pro then is unable to contact PayPal to verify that incoming\n IPN post is genuine. In this case, AS TEMPORARY SOLUTION, you can enable\n this option to don't contact PayPal server for verification. However,\n in this case \"hackers\" can signup on your site without actual payment.\n So if you have enabled this option, contact your webhost and ask them to\n open outgoing connections to www.paypal.com port 80 ASAP, then disable\n this option to make your site secure again.");
$form->addText("lc", array('size' => 4))->setLabel("PayPal Language Code\n" . "This field allows you to configure PayPal page language\n that will be displayed when customer is redirected from your website\n to PayPal for payment. By default, this value is empty, then PayPal\n will automatically choose which language to use. Or, alternatively,\n you can specify for example: en (for english language), or fr\n (for french Language) and so on. In this case, PayPal will not choose\n language automatically. <br />\n Default value for this field is empty string");
}
示例5: _initSetupForm
protected function _initSetupForm(Am_Form_Setup $form)
{
$form->addText('login')->setLabel('API Login')->addRule('required');
$form->addPassword('passwd')->setLabel('API Password')->addRule('required');
$form->addText('pslid')->setLabel('PSLID (Service User)')->addRule('required');
$form->addText('sun')->setLabel('Service User Number (SUN)')->addRule('required');
$form->addText('lead_time')->setLabel('Lead time, days')->default = 12;
for ($i = 1; $i <= 28; $i++) {
$options[$i] = ___("%d-th day", $i);
}
$payment_day = $form->addMagicSelect('payment_day')->setLabel(___("Process Payment Day"))->loadOptions($options);
$payment_day->default = 8;
$payment_day->addRule('required');
$form->addText('legal_name', array('class' => 'el-wide'))->setLabel(___("Legal Name\n" . "Please enter the legal name of your organisation " . "which will be included in the Direct Debit Guarantee statement"))->addRule('required');
$form->addTextarea('legal_address', array('class' => 'el-wide', 'rows' => 5))->setLabel(___("Legal Address\n" . "Please enter the legal address of your organisation " . "which will be included in the Direct Debit Guarantee statement"))->addRule('required');
}
示例6: array
function _initSetupForm(Am_Form_Setup $form)
{
$form->setTitle(___('Single Login Session'));
$form->addText('timeout', array('size' => 4))->setLabel(___('Session Timeout, min'));
$form->setDefault('timeout', 5);
$form->addSelect('action')->setId('form-action')->setLabel(___('Action on Simultaneous Login Attempt'))->loadOptions(array(self::ACTION_LOGIN_REJECT => ___('Show error and do not allow to login until session timeout'), self::ACTION_LOGOUT_OTHER => ___('Delete other session when user try to login from new one'), self::ACTION_NOTHING => ___('Nothing, allow simultaneous login for same user from different computers')));
$form->addTextarea('error', array('class' => 'el-wide'))->setId('form-error')->setLabel(___('Error Message'));
$form->setDefault('error', 'There is already exits active login session for your account. Simultaneous login from different computers is not allowed.');
$error = self::ACTION_LOGIN_REJECT;
$form->addScript()->setScript(<<<CUT
\$('#form-action').change(function(){
\$('#form-error').closest('.row').toggle(\$(this).val() == '{$error}')
}).change();
CUT
);
$form->addElement('email_checkbox', 'notify_admin')->setLabel(___('Notify Admin on Simultaneous Login'));
}
示例7: _initSetupForm
public function _initSetupForm(Am_Form_Setup $form)
{
$form->addText('api_key', array('size' => 40))->setLabel(array('Campaignmonitor API Key', 'from your campaignmonitor account -> Account Settings -> API Key'))->addRule('required');
if ($this->getConfig('api_key')) {
$options = $this->getClientApiId();
$el = $form->addSelect('client_api_id')->setLabel(array('Client API Id', 'select your client which you will use with aMember'))->loadOptions($options);
if ($options) {
$el->addRule('required');
}
}
$form->addTextarea('custom_fields', array('rows' => 5, 'cols' => 20))->setLabel(array('Additional Fields', "campaignmonitor_field|amember_field\n" . "eg: FNAME|name_f\n" . "USERIP|remote_addr\n" . "ADDED|added\n" . "one link - one string\n" . "EmailAddress/Name - always present\n"));
if ($this->getConfig('api_key') && $this->getConfig('client_api_id') && $this->getDi()->plugins_misc->isEnabled('misc-campaignmonitor')) {
$group = $form->addGroup()->setLabel(array('Activate Webhooks'));
$group->addRule('callback2', '-error-', array($this, 'updateWebhooks'));
foreach ($this->getLists() as $lId => $l) {
$group->addAdvCheckbox("webhook_" . $lId)->setContent('for ' . $l['title'] . '<br>');
}
}
$form->addAdvCheckbox('debug_mode')->setLabel(array('Debug Mode Enabled', "write debug info to logs\nit's recommended enable it at the first time"));
}
示例8: _initSetupForm
public function _initSetupForm(Am_Form_Setup $form)
{
$form->addTextarea("html", array('class' => 'el-wide', "rows" => 20))->setLabel(___("Payment Instructions for customer\n" . "you can enter any HTML here, it will be displayed to\n" . "customer when he chooses to pay using this payment system\n" . "you can use the following tags:\n" . "%s - Receipt HTML\n" . "%s - Invoice Title\n" . "%s - Invoice Id\n" . "%s - Invoice Total", '%receipt_html%', '%invoice_title%', '%invoice.public_id%', '%invoice.first_total%'));
}
示例9: initSetupForm
static function initSetupForm(Am_Form_Setup $form)
{
$form->addText("business", array('size' => 40))->setLabel("Primary Paypal E-Mail Address");
$form->addTextarea("alt_business", array('cols' => 40, 'rows' => 3))->setLabel("Alternate PayPal account emails (one per line)");
$form->addText("api_username", array('size' => 40))->setLabeL("API Username");
$form->addPassword("api_password")->setLabel("API Password");
$form->addText("api_signature", array('size' => 60))->setLabel("API Signature");
$form->addAdvCheckbox("testing")->setLabel("Sandbox", "is test or live transaction");
$form->addText("brandname", array('class' => 'el-wide'))->setLabel("Brand Name\nshown on Paypal checkout page as 'Return to {NAME}'.\nDefault is Paypal account name.");
$form->addAdvCheckbox("landingpage_login")->setLabel("Expand 'Login to Paypal' first on Paypal\nby default Paypal expands the long non-account (guest) form");
}