Yii Framework Forum: Chtml::submitbutton Visibility - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chtml::submitbutton Visibility Rate Topic: -----

#1 User is offline   nkhanna 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 27-January 13

Posted 31 January 2013 - 02:54 AM

hi all
I am having this difficulty with this button
<div class="row buttons">
<?= CHtml::submitButton('Submit to all', array('class' => 'button-send-v2', 'value' => '','name'=>'all')); ?>
<span class="go-back">
<span class="gray-text"> or </span>
<?= CHtml::link('Cancel', $this->createAbsoluteUrl('forum/index'), array('class' => 'go-back')); ?>
</span>
</div>

how do i hide this button depending on the user id(Yii::app()->user->id) or at admin login??
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,353
  • Joined: 12-October 09
  • Location:Croatia

Posted 31 January 2013 - 05:13 AM

Not sure what you need... but you can enclose this in an if(Yii::app()->user->id != ...)
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   nkhanna 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 27-January 13

Posted 31 January 2013 - 08:46 AM

thankss....got it what i was looking for
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users