当前位置: 首页>>代码示例>>PHP>>正文


PHP Am_Form_Setup::setTitle方法代码示例

本文整理汇总了PHP中Am_Form_Setup::setTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_Form_Setup::setTitle方法的具体用法?PHP Am_Form_Setup::setTitle怎么用?PHP Am_Form_Setup::setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Am_Form_Setup的用法示例。


在下文中一共展示了Am_Form_Setup::setTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

    function _initSetupForm(Am_Form_Setup $form)
    {
        $form->setTitle('Selectel');
        $form->addText('access_key', array('size' => 40))->setLabel('Your account login')->addRule('required');
        $form->addPassword('secret_key', array('size' => 40))->setLabel(array('Password for Cloud Storage', '(separate password then for Control Panel)'))->addRule('required');
        $form->addText('expire', array('size' => 5))->setLabel('Video link life-time, min');
        $form->setDefault('expire', 15);
        if ($this->isConfigured()) {
            try {
                $containers = $this->getDi()->cacheFunction->call(array($this->getConnector(), 'getContainersList'), array(), array(), $this->cacheLifetime);
                $containers = array('' => '== Please select public Container ==') + $containers;
            } catch (Exception $e) {
                $containers = array('' => 'Please create public container');
            }
            $form->addSelect('links_container', '', array('options' => array_combine($containers, $containers)))->setLabel(array('Container for links', 'aMember will create links in the following format: http://yourcloudstorageurl.com/CONTAINERNAME/uniquekey/filename.mp4'))->addRule('required');
        }
        $msg = <<<EOT
    Make sure that you store all your files in private containers.
    In order to provide an access to the files, create one free container, and specify it in plugin configuration.
    aMember will create symlinks to the files and put these symilnks to that public container. Links are one-time and time-limited.
    For example if you name your public container "download", end-user will see these links:
    https://88901.selcdn.ru/download/9365d4a676845f607e46e19038305ba0/filename.mp4

EOT;
        $form->addProlog(<<<CUT
<div class="info"><strong>{$msg}</strong></div>
CUT
);
    }
开发者ID:grlf,项目名称:eyedock,代码行数:29,代码来源:selectel.php

示例2: onSetupForms

 function onSetupForms(Am_Event_SetupForms $forms)
 {
     $form = new Am_Form_Setup('getclicky');
     $form->setTitle("GetClicky");
     $forms->addForm($form);
     $form->addInteger('getclicky_id')->setLabel(array("GetClicky Account Id"));
 }
开发者ID:grlf,项目名称:eyedock,代码行数:7,代码来源:getclicky.php

示例3: onSetupForms

    function onSetupForms(Am_Event_SetupForms $event)
    {
        $form = new Am_Form_Setup($this->getId());
        $form->setTitle('REST API');
        $event->addForm($form);
        $form->addAdvCheckbox('api_debug_mode')->setLabel(___('Enable Debug Mode') . "\n" . ___('all requests will be added to %sLogs%s,
useful if something is going wrong', '<a href="' . ROOT_URL . '/admin-logs">', '</a>'));
    }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:8,代码来源:Bootstrap.php

示例4: _initSetupForm

 public function _initSetupForm(Am_Form_Setup $form)
 {
     $form->setTitle('Dalpay (Checkout)');
     $form->addText('mer_id', array('size' => 20))->setLabel('Your Merchant ID#');
     $form->addText('pageid')->setLabel('The order page sub-account');
     $form->addPassword('password')->setLabel('Silent Post Password');
     $form->addPassword('notify_password')->setLabel('Server Notification Password');
 }
开发者ID:grlf,项目名称:eyedock,代码行数:8,代码来源:dalpay-checkout.php

示例5: onSetupForms

 function onSetupForms(Am_Event_SetupForms $forms)
 {
     $form = new Am_Form_Setup('google_analytics');
     $form->setTitle("Google Analytics");
     $forms->addForm($form);
     $form->addElement('text', 'google_analytics')->setLabel(array('Google Analytics Account ID', 'To enable automatic sales and hits tracking with GA,
          enter Google Analytics cAccount ID into this field.
          <a href=\'http://www.google.com/support/googleanalytics/bin/answer.py?answer=55603\' target=_blank>Where can I find my tracking ID?</a>
          The tracking ID will look like <i>UA-1231231-1</i>.
          Please note - this tracking is only for pages displayed by aMember,
          pages that are just protected by aMember, cannot be tracked. 
          Use ' . '<a href="http://www.google.com/support/googleanalytics/bin/search.py?query=how+to+add+tracking&ctx=en%3Asearchbox" target=_blank>GA instructions</a>
          how to add tracking code to your own pages.
          '));
     $form->addAdvCheckbox("google_analytics_only_sales_code")->setLabel(array("Include only sales code", "Enable this if you already have tracking code in template"));
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:16,代码来源:google-analytics.php

示例6: onSetupForms

 function onSetupForms(Am_Event_SetupForms $event)
 {
     $form = new Am_Form_Setup('facebook');
     $form->setTitle('Facebook');
     $fs = $form->addFieldset()->setLabel(___('FaceBook Application'));
     $fs->addText('app_id')->setLabel(___('FaceBook App ID'));
     $fs->addText('app_secret', array('size' => 40))->setLabel(___('Facebook App Secret'));
     $fs = $form->addFieldset()->setLabel(___('Features'));
     $gr = $fs->addCheckboxedGroup('like')->setLabel(___('Add "Like" button'));
     $gr->addStatic()->setContent(___('Like Url'));
     $gr->addText('likeurl', array('size' => 40));
     $form->setDefault('likeurl', ROOT_URL);
     $fs->addAdvCheckbox('no_signup')->setLabel(___('Do not add to Signup Form'));
     $fs->addAdvCheckbox('no_login')->setLabel(___('Do not add to Login Form'));
     $form->addFieldsPrefix('misc.facebook.');
     $event->addForm($form);
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:17,代码来源:facebook.php

示例7: 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'));
    }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:17,代码来源:single-login-session.php

示例8: _initSetupForm

 protected function _initSetupForm(Am_Form_Setup $form)
 {
     $form->setTitle(___(self::TITLE));
     $form->addText('api_key', array('size' => 40))->setLabel(array("API Key", ""))->addRule('required');
     $form->addText('api_url', array('size' => 60))->setLabel(array("Full API URL", "eg., http://{your_domain}/{your_install_swm_directory}/api/api.php"))->addRule('required');
     if ($this->isConfigured()) {
         $form->addSortableMagicSelect('amember_fields')->setLabel("Pass additional fields from aMember")->loadOptions($this->getAmemberOptions());
         $form->addSortableMagicSelect('swm_fields')->setLabel("to SWM")->loadOptions($this->getSWMOptions());
         $opt = array();
         foreach ($this->getLists() as $k => $l) {
             $opt[$k] = '#' . $k . ' - ' . $l['title'];
         }
         $form->addMagicSelect('double_optin')->setLabel("Enabled Double Optin for these lists")->loadOptions($opt);
     }
     $form->addAdvCheckbox('check_blocklists')->setLabel(array('Check All Emails at Blocklists', "before subscribing"));
     $form->addAdvCheckbox('send_pass')->setLabel(array('Send Password to SWM', "it's not safe\npasswords are not stored encrypted at SWM"));
     $form->addAdvCheckbox('debud_mode')->setLabel(array('Debug Mode Enabled', "write debug info to logs\nit's recommended enable it at the first time"));
 }
开发者ID:grlf,项目名称:eyedock,代码行数:18,代码来源:superwebmailer.php

示例9: array

    function _initSetupForm(Am_Form_Setup $form)
    {
        $form->setTitle('Amazon S3');
        $form->addText('access_key', array('size' => 40))->setLabel('AWS Access Key')->addRule('required')->addRule('regex', 'must be alphanumeric', '/^[A-Z0-9]+$/');
        $form->addPassword('secret_key', array('size' => 40))->setLabel('AWS Secret Key')->addRule('required');
        $form->addSelect('region')->loadOptions($this->_regions)->setLabel('Amazon S3 Region');
        $form->addText('expire', array('size' => 5))->setLabel('Video link lifetime, min');
        $form->setDefault('expire', 15);
        $msg = ___('Your content on Amazon S3 should not be public.
            Please restrict public access to your files on Amazon S3 side
            and ensure you can not access it directly from Amazon S3.
            aMember use Access Key and Secret Key to generate links with
            authentication token for users to provide access them to your
            content on Amazon S3.');
        $form->addProlog(<<<CUT
<div class="info"><strong>{$msg}</strong></div>
CUT
);
    }
开发者ID:grlf,项目名称:eyedock,代码行数:19,代码来源:s3.php

示例10: onSetupForms

 function onSetupForms(Am_Event_SetupForms $event)
 {
     $form = new Am_Form_Setup('facebook');
     $form->setTitle('Facebook');
     $fs = $form->addFieldset()->setLabel(___('FaceBook Application'));
     $fs->addText(self::FB_APP_ID)->setLabel(___('FaceBook App ID'));
     $fs->addText(self::FB_APP_SECRET, array('size' => 40))->setLabel(___('Facebook App Secret'));
     $fs = $form->addFieldset()->setLabel(___('Features'));
     $gr = $fs->addCheckboxedGroup('like')->setLabel(___('Add "Like" button'));
     $gr->addStatic()->setContent(___('Like Url'));
     $gr->addText('likeurl', array('size' => 40));
     $form->setDefault('likeurl', ROOT_URL);
     $fs->addAdvCheckbox('no_signup')->setLabel(___('Do not add to Signup Form'));
     $fs->addAdvCheckbox('no_login')->setLabel(___('Do not add to Login Form'));
     $fs->addSelect('add_access', null, array('options' => array('' => '-- Do not add access --') + Am_Di::getInstance()->productTable->getOptions()))->setLabel(___('Add free access to a product if user signup from Facebook'));
     $form->addFieldsPrefix('misc.facebook.');
     $this->_afterInitSetupForm($form);
     $event->addForm($form);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:19,代码来源:facebook.php

示例11: getFormByTitle

 /** @return Am_Form_Setup */
 function getFormByTitle($title)
 {
     foreach ($this->forms as $f) {
         if ($f->getTitle() == $title) {
             return $f;
         }
     }
     $form = new Am_Form_Setup(strtolower(filterId($title)));
     $form->setTitle($title);
     $this->addForm($form);
     return $form;
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:13,代码来源:AdminSetupController.php

示例12: _afterInitSetupForm

    protected function _afterInitSetupForm(Am_Form_Setup $form)
    {
        // insert title, description fields
        $form->setTitle(ucfirst(toCamelCase($this->getId())));
        $el = $form->addMagicSelect('reattempt', array('multiple' => 'multiple'));
        $options = array();
        for ($i = 1; $i < 60; $i++) {
            $options[$i] = ___("on %d-th day", $i);
        }
        $el->loadOptions($options);
        $el->setLabel(___("Retry On Failure\n" . "if the recurring billing has failed,\n" . "aMember can repeat it after several days,\n" . "and extend customer subscription for that period\n" . "enter number of days to repeat billing attempt"));
        if ($this->storesCcInfo() && !$this->_pciDssNotRequired) {
            $text = "<p><font color='red'>WARNING!</font> Every application processing e-check information, must be certified\n" . "as PA-DSS compliant, and every website processing credit cards must\n" . "be certified as PCI-DSS compliant.</p>";
            $text .= "<p>aMember Pro is not yet certified as PA-DSS compliant. We will start certification process\n" . "once we get 4.2.0 branch released and stable. This plugins is provided solely for TESTING purproses\n" . "Use it for anything else but testing at your own risk.</p>";
            $form->addProlog(<<<CUT
<div class="warning_box">
    {$text}
</div>   
CUT
);
        }
        $keyFile = defined('AM_KEYFILE') ? AM_KEYFILE : APPLICATION_PATH . '/configs/key.php';
        if (!is_readable($keyFile)) {
            $random = $this->getDi()->app->generateRandomString(78);
            $text = "<p>To use credit card plugins, you need to create a key file that contains unique\n";
            $text .= "encryption key for your website. It is necessary even if the plugin does not\n";
            $text .= "store sensitive information.</p>";
            $text .= "<p>In a text editor, create file with the following content (one-line, no spaces before opening &lt;?php):\n";
            $text .= "<br /><br /><pre style='background-color: #e0e0e0;'>&lt;?php return '{$random}';</pre>\n";
            $text .= "<br />save the file as <b>key.php</b>, and upload to <i>amember/application/configs/</i> folder.\n";
            $text .= "This warning will disappear once you do it correctly.</p>";
            $text .= "<p>KEEP A BACKUP COPY OF THE key.php FILE (!)</p>";
            $form->addProlog(<<<CUT
<div class="warning_box">
    {$text}
</div>
CUT
);
        }
        return parent::_afterInitSetupForm($form);
    }
开发者ID:grlf,项目名称:eyedock,代码行数:41,代码来源:Echeck.php

示例13: _initSetupForm

 public function _initSetupForm(Am_Form_Setup $form)
 {
     $form->setTitle('JunglePay');
     $form->addText('company_code')->setLabel('Your company code from txtNation')->addRule('required');
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:5,代码来源:junglepay.php

示例14: onSetupForms

 /**
  * Initialize setup form
  * You have to override this function and add elements
  * to returned (from parent::initSetupForm) form.
  * @return Am_Form_Setup
  */
 function onSetupForms(Am_Event_SetupForms $event)
 {
     $form = new Am_Form_Setup($this->getId());
     $form->setTitle($this->getConfigPageId());
     $plugin = $this->getId();
     $form->addText("title", array('size' => 40))->setLabel(___("Payment System Title"));
     $form->setDefault("payment.{$plugin}.title", @$this->defaultTitle);
     $form->addText("description", array('size' => 40))->setLabel(___("Payment System Description"));
     $form->setDefault("payment.{$plugin}.description", @$this->defaultDescription);
     /*
     $form->addAdvCheckbox("disable_postback_log")
          ->setLabel(___("Disable PostBack messages Logging (not recommended)\n". 
         "By default aMember logs all payment system postback messages\n".
         "you can disable it by changing this configuration value"
          ));
     */
     if ($this->canResendPostback()) {
         $gr = $form->addElement(new Am_Form_Element_CheckboxedGroup('resend_postback'));
         $gr->setLabel(___("Resend Postback\nenter list of URLs to resend incoming postback\none URL per line"));
         $gr->addTextarea('resend_postback_urls', array('rows' => 3, 'cols' => 70));
     }
     $event->addForm($form);
     $this->_initSetupForm($form);
     if ($this->canAutoCreate()) {
         $form->addAdvCheckbox('auto_create')->setLabel(___("Accept Direct Payments\n" . "handle payments made on payment system side\n" . "(without signup to aMember first)"));
     }
     $form->addFieldsPrefix("payment.{$plugin}.");
     if ($plugin_readme = $this->getReadme()) {
         $plugin_readme = str_replace(array('%root_url%', '%root_surl%', '%root_dir%'), array(ROOT_URL, ROOT_SURL, ROOT_DIR), $plugin_readme);
         $form->addEpilog('<div class="info"><pre>' . $plugin_readme . '</pre></div>');
     }
     if (defined($const = get_class($this) . "::PLUGIN_STATUS") && (constant($const) == self::STATUS_BETA || constant($const) == self::STATUS_DEV)) {
         $beta = constant($const) == self::STATUS_DEV ? 'ALPHA' : 'BETA';
         $form->addProlog("<div class='warning_box'>This plugin is currently in {$beta} testing stage, some functions may work unstable." . "Please test it carefully before use.</div>");
     }
     return $form;
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:43,代码来源:Abstract.php

示例15: _beforeInitSetupForm

 /** @return Am_Form_Setup */
 protected function _beforeInitSetupForm()
 {
     $form = new Am_Form_Setup($this->getId());
     $form->setTitle($this->getTitle());
     return $form;
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:7,代码来源:App.php


注:本文中的Am_Form_Setup::setTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。