本文整理汇总了PHP中Y::hasFlash方法的典型用法代码示例。如果您正苦于以下问题:PHP Y::hasFlash方法的具体用法?PHP Y::hasFlash怎么用?PHP Y::hasFlash使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Y
的用法示例。
在下文中一共展示了Y::hasFlash方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: if
<?php
$this->pageTitle=Yii::app()->name . ' - '.Users::t("Login");
$this->breadcrumbs=array(
Users::t("Login"),
);
?>
<h1><?php echo Users::t("Login"); ?></h1>
<?php if(Y::hasFlash('loginMessage')) { ?>
<div class="success">
<?php echo Y::flash('loginMessage'); ?>
</div>
<?php } ?>
<!--
<p><?php echo Users::t("Please fill out the following form with your login credentials:"); ?></p>
-->
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'login-form',
'enableAjaxValidation'=>true,
'enableClientValidation'=>false,
'focus'=>array($model,'username'),
'action'=>$this->module->loginUrl)
); ?>
<?php echo CHtml::errorSummary($model); ?>
<div class="row">
<?php echo $form->label($model,'username'); ?>
<?php echo $form->textField($model,'username') ?>
</div>
示例2: if
<?php $this->pageTitle=Yii::app()->name . ' - '.Users::t("Restore");
$this->breadcrumbs=array(
Users::t("Login") => Users::url('login'),
Users::t("Restore"),
);
?>
<h1><?php echo Users::t("Restore"); ?></h1>
<?php if(Y::hasFlash('recoveryMessage')): ?>
<div class="success">
<?php echo Y::flash('recoveryMessage'); ?>
</div>
<?php else: ?>
<div class="form">
<?php echo CHtml::beginForm(); ?>
<?php echo CHtml::errorSummary($form); ?>
<div class="row">
<?php echo CHtml::activeLabel($form,'login_or_email'); ?>
<?php echo CHtml::activeTextField($form,'login_or_email') ?>
<p class="hint"><?php echo Users::t("Please enter your login or email addres."); ?></p>
</div>
<div class="row submit">
<?php echo CHtml::submitButton(Users::t("Restore")); ?>
</div>
<?php echo CHtml::endForm(); ?>
示例3: if
<?php $this->pageTitle=Yii::app()->name . ' - '.Users::t("Registration");
$this->breadcrumbs=array(
Users::t("Registration"),
);
?>
<h1><?php echo Users::t("Registration"); ?></h1>
<?php if(Y::hasFlash('registration')): ?>
<div class="success">
<?php echo Y::flash('registration'); ?>
</div>
<?php else: ?>
<div class="form">
<?php $form=$this->beginWidget('UActiveForm', array(
'id'=>'registration-form',
'enableAjaxValidation'=>true,
'disableAjaxValidationAttributes'=>array('RegistrationForm_verifyCode'),
'htmlOptions' => array('enctype'=>'multipart/form-data'),
)); ?>
<p class="note"><?php echo Users::t('Fields with <span class="required">*</span> are required.'); ?></p>
<?php echo $form->errorSummary(array($model,$profile)); ?>
<div class="row">
<?php echo $form->labelEx($model,'username'); ?>
<?php echo $form->textField($model,'username'); ?>
<?php echo $form->error($model,'username'); ?>
</div>
示例4: if
<?php $this->pageTitle=Yii::app()->name . ' - '.Users::t("Profile");
$this->breadcrumbs=array(
Users::t("Profile")=>Users::url('cabinet'),
Users::t("Edit"),
);
?>
<h2><?php echo Users::t('Edit profile'); ?></h2>
<?php if(Y::isGuest()) {$this->widget('GuestMenu');}
else {$this->widget('UserMenu');}
?>
<?php if(Y::hasFlash('profileMessage')): ?>
<div class="success">
<?php echo Y::flash('profileMessage'); ?>
</div>
<?php endif; ?>
<div class="form">
<?php $form=$this->beginWidget('UActiveForm', array(
'id'=>'profile-form',
'enableAjaxValidation'=>true,
'htmlOptions' => array('enctype'=>'multipart/form-data'),
)); ?>
<?php echo $form->errorSummary(array($model,$profile)); ?>
<?php echo $this->renderPartial('_form', array('profile'=>$profile, 'form'=>$form))?>
<div class="row">
<?php echo $form->labelEx($model,'username'); ?>
<?php echo $form->textField($model,'username',array('size'=>20,'maxlength'=>20)); ?>
<?php echo $form->error($model,'username'); ?>
示例5: array
<div>
<?php echo Yii::t('errors', 'registration close', array('{email}'=>Y::config('email_to_registraiton') ));?>
</div>
<div class="form">
<?php
if(Y::hasFlash('success')) {
echo CHtml::tag('div', array('class'=>'success'), Y::flash('success'));
}?>
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'send-mail',
'enableAjaxValidation'=>true
)); ?>
<?php echo CHtml::errorSummary($model); ?>
<div class="row">
<?php echo $form->labelEx($model,'subject'); ?>
<?php echo $form->textField($model,'subject') ?>
<?php echo $form->error($model,'subject'); ?>
</div>
<div class="row">
<?php echo $form->labelEx($model,'message'); ?>
<?php echo $form->textArea($model,'message') ?>
<?php echo $form->error($model,'message'); ?>
</div>
<div class="row submit">
<?php echo CHtml::submitButton(Yii::t('interface', "send mail")); ?>
</div>