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


PHP Am_Controller::renderOptions方法代码示例

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


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

示例1: renderConfirmationForm

 public function renderConfirmationForm($btn = "Yes, assign", $addHtml = null)
 {
     $select = sprintf('<select name="%s__group_id">
         %s
         </select><br /><br />' . PHP_EOL, $this->grid->getId(), Am_Controller::renderOptions(Am_Di::getInstance()->resourceCategoryTable->getOptions()));
     return parent::renderConfirmationForm($this->remove ? ___("Yes, remove category") : ___("Yes, assign category"), $select);
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:7,代码来源:AdminContentController.php

示例2: renderInputs

 public function renderInputs()
 {
     $gridId = $this->grid->getId();
     $options = array_merge(array('' => ''), Am_Currency::getSupportedCurrencies());
     array_remove_value($options, Am_Currency::getDefault());
     $filter = $this->getParam('filter');
     return sprintf("<select name='{$gridId}_filter[currency]'>\n%s\n</select>\n", Am_Controller::renderOptions($options, @$filter['currency']));
 }
开发者ID:grlf,项目名称:eyedock,代码行数:8,代码来源:AdminCurrencyExchangeController.php

示例3: renderForm

 function renderForm($addHidden)
 {
     $this->initPossibleConditions();
     $t = new Am_View();
     $renderer = HTML_QuickForm2_Renderer::factory('array');
     if (!$this->form) {
         $this->createForm(array());
     }
     $this->form->render($renderer);
     $t->assign('form', $renderer->toArray());
     $t->assign('description', $this->getDescription(true));
     $t->assign('serialized', $this->serialize());
     $t->assign('hidden', $addHidden);
     $t->assign('loadSearchOptions', Am_Controller::renderOptions($this->getLoadOptions(), $this->saved_search_id));
     return $t->render($this->template);
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:16,代码来源:Renderable.php

示例4: __toString

    public function __toString()
    {
        $output = sprintf('<div style="padding:0.5em"><h1>%s</h1><div class="grid-container"><table id="regional-tax-table" %s><tr><th>%s</th>
	<th>%s</th>
        <th>%s</th>
	<th>%s</th>
	<th>&nbsp;</th></tr>', ___('Configured Tax Values'), 'class="grid"', ___('Country'), ___('State'), ___('Zip'), ___('Tax Value'));
        $label_add = ___('Add');
        $output .= "<tr class='regional-tax-add'>" . "<td width='30%'><select id='regional-tax-country' size='1'><option/>" . Am_Controller::renderOptions(Am_Di::getInstance()->countryTable->getOptions()) . "</select>" . "<td width='30%'><select id='regional-tax-state' size='1'></select></td>" . "<td><input type='text' id='regional-tax-zip' /></td>" . "<td><input type='text' id='regional-tax-rate' size='5' maxlength='5' /></td>" . "<td><input type='button' id='regional-tax-add-button' value='{$label_add}'/></td>" . "</tr>\n";
        $name = $this->getName();
        foreach ($this->regional_taxes as $id => $region) {
            $hidden = Am_Controller::escape(implode('|', array($region['country'], $region['state'], $region['zip'], $region['tax_value'])));
            $output .= '<tr>' . sprintf('<td>%s</td>', Am_Di::getInstance()->countryTable->getTitleByCode($region['country'])) . sprintf('<td>%s</td>', $region['state'] ? Am_Di::getInstance()->stateTable->getTitleByCode($region['country'], $region['state']) : '*') . sprintf('<td>%s</td>', $region['zip'] ? $region['zip'] : '*') . sprintf('<td>%.2f%s</td>', $region['tax_value'], '&nbsp;%') . sprintf('<td><a href="javascript:" class="regional-tax-remove">%s</a>%s</td>', ___('Remove'), "<input type='hidden' name='{$name}[]' value='{$hidden}'>") . '</tr>';
        }
        $output .= '</table></div></div>';
        $id = $this->getId();
        $output .= "\n        <style type='text/css'>\n            #row-{$id} .element-title { display: none;  }\n            #row-{$id} .element { margin-left: 0 } \n        </style>\n        ";
        return sprintf('<tr><td colspan="2" id="tax-regional-regions">%s</td></tr>', $output . $this->getJs());
    }
开发者ID:grlf,项目名称:eyedock,代码行数:19,代码来源:RegionalTaxes.php

示例5: renderInputs

    public function renderInputs()
    {
        $prefix = $this->grid->getId();
        $filter = (array) $this->vars['filter'];
        $filter['datf'] = Am_Controller::escape(@$filter['datf']);
        $filter['dat1'] = Am_Controller::escape(@$filter['dat1']);
        $filter['dat2'] = Am_Controller::escape(@$filter['dat2']);
        $filter['text'] = Am_Controller::escape(@$filter['text']);
        $pOptions = array('' => '-' . ___('Filter by Product') . '-');
        $pOptions = $pOptions + Am_Di::getInstance()->productTable->getOptions();
        $pOptions = Am_Controller::renderOptions($pOptions, @$filter['product_id']);
        $options = Am_Controller::renderOptions(array('' => '***', 'invoice' => ___('Invoice'), 'receipt' => ___('Payment Receipt'), 'coupon' => ___('Coupon Code')), @$filter['type']);
        $dOptions = $this->getDateFieldOptions();
        if (count($dOptions) === 1) {
            $dSelect = sprintf('%s: <input type="hidden" name="%s_filter[datf]" value="%s" />', current($dOptions), $prefix, key($dOptions));
        } else {
            $dSelect = sprintf('<select name="%s_filter[datf]">%s</select>', $prefix, Am_Controller::renderOptions($dOptions, @$filter['datf']));
        }
        $start = ___('Start Date');
        $end = ___('End Date');
        $dsr = $this->renderDontShowRefunded();
        return <<<CUT
<select name="{$prefix}_filter[product_id]" style="width:150px">
{$pOptions}
</select>
{$dSelect}
<input type="text" placeholder="{$start}" name="{$prefix}_filter[dat1]" class='datepicker' style="width:80px" value="{$filter['dat1']}" />
<input type="text" placeholder="{$end}" name="{$prefix}_filter[dat2]" class='datepicker' style="width:80px" value="{$filter['dat2']}" />
<br />
<input type="text" name="{$prefix}_filter[text]" value="{$filter['text']}" style="width:300px" />
<select name="{$prefix}_filter[type]">
{$options}
</select>
<br />
{$dsr}
CUT;
    }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:37,代码来源:AdminUserPaymentsController.php

示例6: renderInputs

    public function renderInputs()
    {
        $filter = (array) $this->vars['filter'];
        $filter['dat1'] = Am_Controller::escape(@$filter['dat1']);
        $filter['dat2'] = Am_Controller::escape(@$filter['dat2']);
        $filter['text'] = Am_Controller::escape(@$filter['text']);
        $options = Am_Controller::renderOptions(array('' => '***', 'invoice' => ___('Invoice'), 'login' => ___('Username')), @$filter['type']);
        //'receipt'    => ___('Receipt'),
        $start = ___("Start Date");
        $end = ___("End Date");
        $tfilter = ___("Filter");
        $prefix = $this->grid->getId();
        return <<<CUT
<b>{$start}</b>        
<input type="text" name="{$prefix}_filter[dat1]" class='datepicker' value="{$filter['dat1']}" />
<b>{$end}</b>        
<input type="text" name="{$prefix}_filter[dat2]" class='datepicker' value="{$filter['dat2']}" />
<b>{$tfilter}</b>        
<input type="text" name="{$prefix}_filter[text]" value="{$filter['text']}" />
<select name="{$prefix}_filter[type]">
{$options}
</select>
CUT;
    }
开发者ID:subashemphasize,项目名称:test_site,代码行数:24,代码来源:AdminPaymentsController.php

示例7: renderConfirmationForm

 public function renderConfirmationForm($btn = "Yes, assign", $addHtml = null)
 {
     $select = sprintf('%s <select name="%s__product_id">
         %s
         </select><br /><br />' . PHP_EOL, ___('Put Chosen Products After'), $this->grid->getId(), Am_Controller::renderOptions(Am_Di::getInstance()->productTable->getOptions()));
     return parent::renderConfirmationForm(___("Change Order"), $select);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:7,代码来源:AdminProductsController.php

示例8: renderInputs

    public function renderInputs()
    {
        $prefix = $this->grid->getId();
        $filter = (array) $this->vars['filter'];
        $filter['dat1'] = Am_Controller::escape(@$filter['dat1']);
        $filter['dat2'] = Am_Controller::escape(@$filter['dat2']);
        $countryOptions = array();
        $countryOptions = $countryOptions + Am_Di::getInstance()->countryTable->getOptions();
        $countryOptions = Am_Controller::renderOptions($countryOptions, @$filter['country']);
        $paysysOptions = array();
        $paysysOptions = $paysysOptions + Am_Di::getInstance()->paysystemList->getOptions();
        $paysysOptions = Am_Controller::renderOptions($paysysOptions, @$filter['paysys_id']);
        $pOptions = array();
        $period = array(Am_Interval::PERIOD_THIS_MONTH, Am_Interval::PERIOD_LAST_MONTH, Am_Interval::PERIOD_THIS_QUARTER, Am_Interval::PERIOD_LAST_QUARTER, Am_Interval::PERIOD_THIS_YEAR, Am_Interval::PERIOD_LAST_YEAR, Am_Interval::PERIOD_ALL);
        $i = $this->grid->getDi()->interval;
        foreach ($period as $k) {
            $pOptions[$k] = $i->getTitle($k);
        }
        $pOptions['exact'] = ___('Exact Period');
        $pOptions = Am_Controller::renderOptions($pOptions, @$filter['period']);
        $start = ___('Start Date');
        $end = ___('End Date');
        $offer_country = '-' . ___('Filter by Country') . '-';
        $offer_paysys = '-' . ___('Filter by Paysystem') . '-';
        $dSelect = ___('Report Dates');
        $pSelect = ___('Report Period');
        $dont_show_empty_checked = @$filter['dont_show_empty'] == 1 ? 'checked' : '';
        $dont_show_empty_label = ___('Do not include records with empty VAT');
        return <<<CUT
   <div style='display:table-cell; padding-bottom:0.4em;'>
        {$pSelect}
        <select name='{$prefix}_filter[period]' id='filter-period'>
            {$pOptions}
        </select>&nbsp;&nbsp;
   </div>
   <div style='display:table-cell; padding-bottom:0.4em;' id='filter-exact'>
        {$dSelect}
        <input type="text" placeholder="{$start}" name="{$prefix}_filter[dat1]" class='datepicker' style="width:80px" value="{$filter['dat1']}" />
        <input type="text" placeholder="{$end}" name="{$prefix}_filter[dat2]" class='datepicker' style="width:80px" value="{$filter['dat2']}" />&nbsp;&nbsp;
    </div>

    <div style='display:table-cell; padding-right:0.4em; padding-bottom:0.4em; width:160px; box-sizing:border-box;'>
        <select name="{$prefix}_filter[country][]" style="width:160px" class="magicselect" multiple="multiple" data-offer='{$offer_country}'>
            {$countryOptions}
        </select>&nbsp;&nbsp;
    </div>

   <div style='display:table-cell; padding-right:0.4em; padding-bottom:0.4em; width:160px; box-sizing:border-box;'>
        <select name="{$prefix}_filter[paysys_id][]" style="width:160px" class="magicselect" multiple="multiple" data-offer='{$offer_paysys}'>
            {$paysysOptions}
        </select>
   </div>

   <br/>

   <div style='display:table-cell; padding-right:0.4em; padding-bottom:0.4em; box-sizing:border-box;'>
        <label>
            <input type="hidden" name="{$prefix}_filter[dont_show_empty]" value="0" />
            <input type="checkbox" name="{$prefix}_filter[dont_show_empty]" value="1" {$dont_show_empty_checked} /> {$dont_show_empty_label}
        </label>
   </div>


   <script>
    jQuery(document).ready(function(){
        jQuery('input[type=checkbox]').change(function(){jQuery('.filter').submit()});
        jQuery('#filter-period').change(function(){
                if(jQuery(this).val() == 'exact')
                    jQuery("#filter-exact").show();
                else
                    jQuery("#filter-exact").hide();

            }).change();

    });
   </script>

CUT;
    }
开发者ID:grlf,项目名称:eyedock,代码行数:79,代码来源:AdminVatReportController.php

示例9: formOptions

 public function formOptions($options, $selected)
 {
     return Am_Controller::renderOptions($options, $selected);
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:4,代码来源:View.php

示例10: __toString

 function __toString()
 {
     return sprintf('<div class="input_period">' . '<input type="text" name="%s[c]" value="%s" size=10 id="%s"> ' . '<select name="%s[u]" size="1" id="%s">' . Am_Controller::renderOptions($this->options, $this->period->getCount() != Am_Period::MAX_SQL_DATE ? $this->period->getUnit() : 'lifetime') . '</select></div>', $this->getName(), $this->period->getCount(), $this->getId() . '-c', $this->getName(), $this->getId() . '-u');
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:4,代码来源:Form.php

示例11: renderInputs

    public function renderInputs()
    {
        $prefix = $this->grid->getId();
        $filter = (array) $this->vars['filter'];
        $filter['datf'] = Am_Controller::escape(@$filter['datf']);
        $filter['dat1'] = Am_Controller::escape(@$filter['dat1']);
        $filter['dat2'] = Am_Controller::escape(@$filter['dat2']);
        $filter['text'] = Am_Controller::escape(@$filter['text']);
        $pOptions = array();
        $pOptions = $pOptions + Am_Di::getInstance()->productTable->getOptions();
        $pOptions = Am_Controller::renderOptions($pOptions, @$filter['product_id']);
        $paysysOptions = array();
        $paysysOptions = $paysysOptions + Am_Di::getInstance()->paysystemList->getOptions();
        $paysysOptions = Am_Controller::renderOptions($paysysOptions, @$filter['paysys_id']);
        $options = Am_Controller::renderOptions(array('invoice' => ___('Invoice Number'), 'receipt' => ___('Payment Receipt'), 'login' => ___('Username'), 'name' => ___('Name'), 'coupon' => ___('Coupon Code')), @$filter['type']);
        $dOptions = $this->getDateFieldOptions();
        if (count($dOptions) === 1) {
            $dSelect = sprintf('%s: <input type="hidden" name="%s_filter[datf]" value="%s" />', current($dOptions), $prefix, key($dOptions));
        } else {
            $dSelect = sprintf('<select name="%s_filter[datf]">%s</select>', $prefix, Am_Controller::renderOptions($dOptions, @$filter['datf']));
        }
        $start = ___('Start Date');
        $end = ___('End Date');
        $offer_product = '-' . ___('Filter by Product') . '-';
        $offer_paysys = '-' . ___('Filter by Paysystem') . '-';
        return <<<CUT
<div style='display:table-cell; padding-right:0.4em; padding-bottom:0.4em; width:160px; box-sizing:border-box;'>
<select name="{$prefix}_filter[product_id][]" style="width:160px" class="magicselect" multiple="multiple" data-offer='{$offer_product}'>
{$pOptions}
</select>
</div>
<div style='display:table-cell; padding-right:0.4em; padding-bottom:0.4em; width:160px; box-sizing:border-box;'>
<select name="{$prefix}_filter[paysys_id][]" style="width:160px" class="magicselect" multiple="multiple" data-offer='{$offer_paysys}'>
{$paysysOptions}
</select>
   </div>
<div style='display:table-cell; padding-bottom:0.4em;'>

{$dSelect}
<input type="text" placeholder="{$start}" name="{$prefix}_filter[dat1]" class='datepicker' style="width:80px" value="{$filter['dat1']}" />
<input type="text" placeholder="{$end}" name="{$prefix}_filter[dat2]" class='datepicker' style="width:80px" value="{$filter['dat2']}" />
</div>
<input type="text" name="{$prefix}_filter[text]" value="{$filter['text']}" style="width:380px" />
<select name="{$prefix}_filter[type]">
{$options}
</select>
CUT;
    }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:48,代码来源:AdminPaymentsController.php

示例12: render

    public function render()
    {
        $options = Am_Controller::renderOptions($this->getSimpleOptions(), $this->options);
        $keep = ___('You can select more than one item - keep "Ctrl" key pressed');
        $apply = ___("Apply Filter");
        return <<<CUT
<div class="popup">
        <div class="popup-top-arrow"></div>
        <div class="popup-content">
<form method="post">
<i>{$keep}</i><br />
<select name="search-simple[]" size="10" multiple="multiple">
{$options}
</select><br />
<input type="hidden" name="search-type" value="simple" />
<input type="submit" value="{$apply}" style="margin-top: 5px"/>
</form>
</div>
<div class="popup-bottom"></div>
</div>
CUT;
    }
开发者ID:subashemphasize,项目名称:test_site,代码行数:22,代码来源:Ui.php


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