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


PHP CHtml::form方法代码示例

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


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

示例1: renderContent

 /**
  * (non-PHPdoc)
  * @see CPortlet::renderContent()
  */
 protected function renderContent()
 {
     $themesList = array_combine(Yii::app()->themeManager->themeNames, Yii::app()->themeManager->themeNames);
     echo CHtml::form('', 'post', array());
     echo CHtml::dropDownList('themeSelector', Yii::app()->theme->name, $themesList, $this->dropDownOptions);
     echo CHtml::endForm();
 }
开发者ID:jackycgq,项目名称:advanced,代码行数:11,代码来源:EThemePicker.php

示例2: renderCheckoutForm

 public function renderCheckoutForm(Payment $payment, Order $order, $return = false)
 {
     $settings = $payment->getPaymentSystemSettings();
     $mrhLogin = $settings['login'];
     $mrhPass1 = $settings['password1'];
     $culture = $settings['language'];
     $invId = $order->id;
     $invDesc = Yii::t('RobokassaModule.robokassa', 'Payment order #{id} on "{site}" website', ['{id}' => $order->id, '{site}' => Yii::app()->getModule('yupe')->siteName]);
     $outSum = Yii::app()->money->convert($order->getTotalPrice(), $payment->currency_id);
     $crc = md5("{$mrhLogin}:{$outSum}:{$invId}:{$mrhPass1}");
     $form = CHtml::form($settings['testmode'] ? "http://test.robokassa.ru/Index.aspx" : "https://merchant.roboxchange.com/Index.aspx");
     $form .= CHtml::hiddenField('MrchLogin', $mrhLogin);
     $form .= CHtml::hiddenField('OutSum', $outSum);
     $form .= CHtml::hiddenField('InvId', $invId);
     $form .= CHtml::hiddenField('Desc', $invDesc);
     $form .= CHtml::hiddenField('SignatureValue', $crc);
     $form .= CHtml::hiddenField('Culture', $culture);
     $form .= CHtml::submitButton(Yii::t('RobokassaModule.robokassa', 'Pay'));
     $form .= CHtml::endForm();
     if ($return) {
         return $form;
     } else {
         echo $form;
     }
 }
开发者ID:RonLab1987,项目名称:43berega,代码行数:25,代码来源:RobokassaPaymentSystem.php

示例3: renderContent

 /**
  * (non-PHPdoc)
  * @see CPortlet::renderContent()
  */
 protected function renderContent()
 {
     $translations = self::getLanguagesList();
     echo CHtml::form('', 'post', array());
     echo CHtml::dropDownList('languageSelector', Yii::app()->getLanguage(), $translations, $this->dropDownOptions);
     echo CHtml::endForm();
 }
开发者ID:rusli-nasir,项目名称:ERP_Accounting_Indonesia,代码行数:11,代码来源:ELanguagePicker.php

示例4: showsaveform

 function showsaveform()
 {
     //Show 'SAVE FORM' only when click the 'Save so far' button the first time, or when duplicate is found on SAVE FORM.
     global $errormsg, $thissurvey, $surveyid, $clang, $clienttoken, $thisstep;
     $redata = compact(array_keys(get_defined_vars()));
     $sTemplatePath = $_SESSION['survey_' . $surveyid]['templatepath'];
     sendCacheHeaders();
     doHeader();
     echo templatereplace(file_get_contents($sTemplatePath . "startpage.pstpl"), array(), $redata);
     echo "\n\n<!-- JAVASCRIPT FOR CONDITIONAL QUESTIONS -->\n" . "\t<script type='text/javascript'>\n" . "\t<!--\n" . "function checkconditions(value, name, type, evt_type)\n" . "\t{\n" . "\t}\n" . "\t//-->\n" . "\t</script>\n\n";
     echo CHtml::form(array("/survey/index"), 'post') . "\n";
     //PRESENT OPTIONS SCREEN
     if (isset($errormsg) && $errormsg != "") {
         $errormsg .= "<p>" . $clang->gT("Please try again.") . "</p>";
     }
     echo templatereplace(file_get_contents($sTemplatePath . "save.pstpl"), array(), $redata);
     //END
     echo "<input type='hidden' name='sid' value='{$surveyid}' />\n";
     echo "<input type='hidden' name='thisstep' value='{$thisstep}' />\n";
     echo CHtml::hiddenField('token', $clienttoken) . "\n";
     echo "<input type='hidden' name='saveprompt' value='Y' />\n";
     echo "</form>";
     echo templatereplace(file_get_contents($sTemplatePath . "endpage.pstpl"), array(), $redata);
     echo "</html>\n";
     exit;
 }
开发者ID:josetorerobueno,项目名称:test_repo,代码行数:26,代码来源:Save.php

示例5: run

 public function run()
 {
     $currencyActvie = Currency::getActiveCurrencyArray(2);
     $currentCharCode = Currency::getCurrentCurrencyModel()->char_code;
     foreach ($currencyActvie as $char_code => $currencyName) {
         echo CHtml::hiddenField($char_code, $this->getOwner()->createLangUrl(Yii::app()->language, array('currency' => $char_code)), array('id' => 'currency_' . $char_code));
     }
     echo CHtml::form();
     $class = Yii::app()->theme->name != 'classic' ? 'currency' : 'currency-drop';
     echo CHtml::dropDownList('currency', $currentCharCode, $currencyActvie, array('onchange' => 'this.form.action=$("#currency_"+this.value).val(); this.form.submit(); return false;', 'class' => $class));
     echo CHtml::endForm();
 }
开发者ID:barricade86,项目名称:raui,代码行数:12,代码来源:currencySelectorWidget.php

示例6: getHTML

 public static function getHTML()
 {
     $profilsList = array();
     foreach (Yii::app()->user->getState('profil') as $profil) {
         $profilsList[$profil] = Yii::t('common', $profil);
         asort($profilsList);
     }
     if (!Yii::app()->user->isAdmin() && array_merge($profilsList, array("administrator" => Yii::t('common', 'administrator'))) != User::model()->getArrayProfil()) {
         $profilsList['newProfil'] = "Demander un nouveau profil";
     }
     $controler = Yii::app()->getController()->getId();
     $action = Yii::app()->getController()->getAction()->getId();
     $html = CHtml::form(Yii::app()->createUrl("{$controler}/{$action}"), "POST", array('class' => "navbar-form pull-left"));
     $html .= CHtml::dropDownList("activeProfil", Yii::app()->user->getState('activeProfil'), $profilsList, array('id' => "profil", "style" => "width:150px; margin-top: -3px; margin-left: -25px;", "onchange" => "this.form.submit()"));
     $html .= CHtml::endForm();
     return $html;
 }
开发者ID:Biobanques,项目名称:cbsd_platform,代码行数:17,代码来源:GetProfil.php

示例7: renderPaymentForm

 /**
  * Generate qiwi payment form.
  * @param StorePaymentMethod $method
  * @param Order $order
  * @return string
  */
 public function renderPaymentForm(StorePaymentMethod $method, Order $order)
 {
     $settings = $this->getSettings($method->id);
     $summ = Yii::app()->currency->convert($order->full_price, $method->currency_id);
     $html = '<div class="form">';
     $html .= CHtml::form('http://w.qiwi.ru/setInetBill_utf.do', 'get');
     $html .= CHtml::hiddenField('from', $settings['shop_id']);
     $html .= CHtml::hiddenField('summ', $summ);
     $html .= CHtml::hiddenField('com', $this->getPaymentComment($order));
     $html .= CHtml::hiddenField('txn_id', $order->id);
     $html .= '<div id="qiwi_phone_number">Номер телефона:<br/>';
     $html .= CHtml::textField('to', $order->user_phone);
     $html .= '</div>';
     $html .= $this->renderSubmit();
     $html .= CHtml::endForm();
     $html .= '</div>';
     return $html;
 }
开发者ID:kolbensky,项目名称:rybolove,代码行数:24,代码来源:QiwiPaymentSystem.php

示例8: run

 function run($args)
 {
     extract($args);
     $redata = compact(array_keys(get_defined_vars()));
     $sTemplatePath = $_SESSION['survey_' . $surveyid]['templatepath'];
     sendCacheHeaders();
     doHeader();
     echo templatereplace(file_get_contents($sTemplatePath . "startpage.pstpl"), array(), $redata);
     echo "\n\n<!-- JAVASCRIPT FOR CONDITIONAL QUESTIONS -->\n" . "\t<script type='text/javascript'>\n" . "function checkconditions(value, name, type, evt_type)\n" . "\t{\n" . "\t}\n" . "\t</script>\n\n";
     echo CHtml::form(array("/survey/index", "sid" => $surveyid), 'post') . "\n";
     echo templatereplace(file_get_contents($sTemplatePath . "load.pstpl"), array(), $redata);
     //PRESENT OPTIONS SCREEN (Replace with Template Later)
     //END
     echo "<input type='hidden' name='loadall' value='reload' />\n";
     if (isset($clienttoken) && $clienttoken != "") {
         echo "<input type='hidden' name='token' value='{$clienttoken}' />\n";
     }
     echo "</form>";
     echo templatereplace(file_get_contents($sTemplatePath . "endpage.pstpl"), array(), $redata);
     doFooter();
     exit;
 }
开发者ID:wrenchpilot,项目名称:LimeSurvey,代码行数:22,代码来源:Load_answers.php

示例9: renderPaymentForm

 /**
  * Generate robokassa payment form.
  * @param StorePaymentMethod $method
  * @param Order $order
  * @return string
  */
 public function renderPaymentForm(StorePaymentMethod $method, Order $order)
 {
     $settings = $this->getSettings($method->id);
     // Registration data
     $mrh_login = $settings['login'];
     $mrh_pass1 = $settings['password1'];
     $shp_order_key = $order->secret_key;
     $shp_payment_id = $method->id;
     // Order number
     $inv_id = $order->id;
     // Order description
     $inv_desc = Yii::t('core', "Оплата заказа #") . $order->id;
     // Order sum
     $out_sum = Yii::app()->currency->convert($order->full_price, $method->currency_id);
     // currency
     $in_curr = "PCR";
     // Language
     $culture = "ru";
     // Signature
     $crc = md5("{$mrh_login}:{$out_sum}:{$inv_id}:{$mrh_pass1}:Shp_orderKey={$shp_order_key}:Shp_pmId={$shp_payment_id}");
     if ($this->testingMode) {
         $html = CHtml::form('http://test.robokassa.ru/Index.aspx');
     } else {
         $html = CHtml::form('https://merchant.roboxchange.com/Index.aspx');
     }
     $html .= CHtml::hiddenField('MrchLogin', $mrh_login);
     $html .= CHtml::hiddenField('OutSum', $out_sum);
     $html .= CHtml::hiddenField('InvId', $inv_id);
     $html .= CHtml::hiddenField('Desc', $inv_desc);
     $html .= CHtml::hiddenField('SignatureValue', $crc);
     $html .= CHtml::hiddenField('Shp_orderKey', $shp_order_key);
     $html .= CHtml::hiddenField('Shp_pmId', $shp_payment_id);
     $html .= CHtml::hiddenField('IncCurrLabel', $in_curr);
     $html .= CHtml::hiddenField('Culture', $culture);
     $html .= $this->renderSubmit();
     $html .= CHtml::endForm();
     return $html;
 }
开发者ID:kolbensky,项目名称:rybolove,代码行数:44,代码来源:RobokassaPaymentSystem.php

示例10: renderFilter

	public function renderFilter() 
	{
		$filter = isset($_GET['filter']) ? $_GET['filter'] : null;
		$details = isset($_GET['filterDetails']) ? $_GET['filterDetails'] : ''; 
		
		if(isset($_GET['filterButton'])) 
			unset($_GET['filterButton']);
			
		$tmpGet = $_GET;
		if (isset($tmpGet['filter'])) {
			if (isset($tmpGet['filterDetails']))
				unset($tmpGet['filterDetails']);
			unset($tmpGet['filter']);
		}
		
		echo CHtml::form( Y::url('site', $tmpGet), 'get');
		echo CHtml::dropDownList('filter',$filter,array(
			'inYear'=>'по годам', 'inWorkType'=>'по видам деятельности','inCity'=>'по городам'
		));
		
		if ($filter) { 
			
			if ($filter == 'inYear')
				$items = Y::years();
			if ($filter == 'inCity') 
				$items = City::model()->allWithHeader;
			if ($filter == 'inWorkType') 
				$items = PortfolioWorkType::model()->allWithHeader;
				
			if (isset($items))
				echo CHtml::dropDownList('filterDetails', $details, $items);
		}
		
		echo CHtml::submitButton('Отфильтровать', array('name'=>'filterButton'));
		echo CHtml::endForm();
	}
开发者ID:nizsheanez,项目名称:PolymorphCMS,代码行数:36,代码来源:ListView.php

示例11: renderCheckoutForm

 public function renderCheckoutForm($subscription, $return = false)
 {
     $settings = $this->_getSettings();
     $mrhLogin = $settings['login'];
     $mrhPass1 = $settings['password1'];
     $culture = $settings['language'];
     $invId = $subscription->id;
     $invDesc = Yii::t('site', 'Оплата заказа №{id} на сайте "{site}"', ['{id}' => $subscription->order_num, '{site}' => Yii::app()->getModule('yupe')->siteName]);
     $outSum = $subscription->getTotalCost();
     $crc = md5("{$mrhLogin}:{$outSum}:{$invId}:{$mrhPass1}");
     $form = CHtml::form($settings['testmode'] ? "http://test.robokassa.ru/Index.aspx" : "https://merchant.roboxchange.com/Index.aspx", 'POST', array('id' => 'payment-form'));
     $form .= CHtml::hiddenField('MrchLogin', $mrhLogin);
     $form .= CHtml::hiddenField('OutSum', $outSum);
     $form .= CHtml::hiddenField('InvId', $invId);
     $form .= CHtml::hiddenField('Desc', $invDesc);
     $form .= CHtml::hiddenField('SignatureValue', $crc);
     $form .= CHtml::hiddenField('Culture', $culture);
     $form .= CHtml::endForm();
     if ($return) {
         return $form;
     } else {
         echo $form;
     }
 }
开发者ID:kuzmina-mariya,项目名称:happy-end,代码行数:24,代码来源:RobokassaPaymentSystem.php

示例12: array

<?php

echo CHtml::form(Yii::app()->request->url, 'post', array('onsubmit' => 'return submitForm(this);'));
?>

<div>
	移动至
	<strong>编号</strong> 
	<?php 
echo CHtml::textField('target_id', '', array('size' => '6'));
?>
			<?php 
echo CHtml::radioButtonList('pos', '2', array('1' => '之前', '2' => '之后'), array('separator' => '&nbsp;'));
?>
			
	<?php 
echo CHtml::submitButton('修改排序');
?>
			
</div>
<?php 
echo CHtml::endForm();
?>

<script type="text/javascript">
function submitForm(f) {
	targetId = $('#target_id').val();
	if (targetId.length == 0) {
		alert('请输入编号');
		$('#target_id').focus();
		return false;
开发者ID:kinghinds,项目名称:kingtest2,代码行数:31,代码来源:sortSpecify.php

示例13: eT

    <td><strong><?php 
eT("Questions");
?>
</strong></td>
    <td><strong><?php 
eT("Answers");
?>
</strong></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td style="padding: 3px;">
        <?php 
if (Permission::model()->hasSurveyPermission($iSurveyId, 'quotas', 'update')) {
    ?>
            <?php 
    echo CHtml::form(array("admin/quotas/sa/new_answer/surveyid/{$iSurveyId}"), 'post');
    ?>
                <input name="submit" type="submit" class="quota_new btn btn-default"  value="<?php 
    eT("Add answer");
    ?>
" />
                <input type="hidden" name="sid" value="<?php 
    echo $iSurveyId;
    ?>
" />
                <input type="hidden" name="action" value="quotas" />
                <input type="hidden" name="quota_id" value="<?php 
    echo $quotalisting['id'];
    ?>
" />
                <input type="hidden" name="subaction" value="new_answer" />
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:31,代码来源:viewquotasrow_view.php

示例14:

<div class="authPage">
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <h2>Напоминание имени и пароля</h2>

            <p style="text-align: center; padding: 10px 0;">
                Введи в поле ниже email на который был зарегистрирован твой профиль и мы вышлем тебе информацию для
                восстановления пароля.
            </p>
            <?php 
ErrInfo::alerts(null);
?>
            <?php 
echo CHtml::form("", "post", ["class" => "form-horizontal"]);
?>
            <div class="form-group">
                <label for="email" class="col-sm-3 col-md-offset-1 control-label">Email:</label>

                <div class="col-sm-5">
                    <input type="email" class="form-control" id="email" name="passReset">
                </div>
            </div>
            <div class="row">
                <div class="col-md-12" style="text-align: center; padding: 10px 0;">
                    <input type="submit" class="btn btn-success" value="Напоминить"/>
                </div>
            </div>
            </form>
        </div>
    </div>
</div>
开发者ID:CrystReal,项目名称:Site_frontend,代码行数:31,代码来源:passwordReset.php

示例15: eT

				                </ul>
				            </td>
				        </tr><tr>
				            <td>
				                <?php 
    echo CHtml::form(array("admin/survey/sa/expire/surveyid/{$surveyid}/"), 'post');
    ?>
				                    <p><input class="btn btn-default"  type='submit' value='<?php 
    eT("Expire survey");
    ?>
'/></p>
				                </form>
				            </td>
				            <td>
				                <?php 
    echo CHtml::form(array("admin/survey/sa/deactivate/surveyid/{$surveyid}/"), 'post');
    ?>
				                    <p><input  class="btn btn-default" type='submit' value='<?php 
    eT("Deactivate survey");
    ?>
'/></p>
				                    <input type='hidden' value='Y' name='ok' />
				                </form>
				            </td>
				        </tr>
				    </table>
				</div><br />
				<?php 
} else {
    ?>
	<div class="row">                             
开发者ID:GuillaumeSmaha,项目名称:LimeSurvey,代码行数:31,代码来源:deactivateSurvey_view.php


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