blockAlert() public static method

Generates an alert block.
public static blockAlert ( string $color, string $message, array $htmlOptions = [] ) : string
$color string the color of the alert.
$message string the message to display.
$htmlOptions array additional HTML options.
return string the generated alert.
Esempio n. 1
0
 public function testBlockAlert()
 {
     $I = $this->codeGuy;
     $html = TbHtml::blockAlert(TbHtml::ALERT_COLOR_WARNING, 'Alert message');
     $alert = $I->createNode($html, 'div.alert');
     $I->seeNodeCssClass($alert, 'alert-warning alert-block fade in');
     $I->seeNodeText($alert, 'Alert message');
     $I->seeNodeChildren($alert, array('div.alert > a[type=button].close'));
 }
Esempio n. 2
0
    <?php
echo TbHtml::blockAlert(TbHtml::ALERT_COLOR_WARNING, 'No completar los tipos de práctica que no se van a analizar.');
  $i=1; 
          
    foreach ($tiposdepractica as $tp){  

        $valor="";
        $cantidad="";
        
        echo "<div class='control-group'>";
        echo TbHtml::tag("span", array('class' => 'control-label'),$tp->nombre);
        echo "<div class='controls'>";  
        echo TbHtml::textField(get_class($model)."[$i][valor]",array('value'=>$valor),array( 'style' => 'width:50px','prepend' => '$')); 
       // echo TbHtml::labelTb('Cada', array('style' => 'display:inline;margin:0 0 0 10px;'));
        echo TbHtml::textField(get_class($model)."[$i][cadaxprac]",array('value'=>$cantidad),array( 'style' => 'width:50px;','prepend' => 'Cada','append' => 'prácticas', 'span' => 2));
        //echo TbHtml::labelTb('prácticas', array('style' => 'display:inline;'));
        echo "</div></div>"; 
        $i++;
    }

   // Envío el id del tipo de coseguro a descontar
   //echo TbHtml::hiddenField("Descuentocoseguro['iddescuentocoseguro']",$model->iddescuentocoseguro);
    
   
 ?>
Esempio n. 3
0
   <div class="bs-docs-example">
      <?php 
echo TbHtml::alert(TbHtml::ALERT_COLOR_WARNING, '<h4>Warning!</h4> Best check yo self, you\'re not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.');
?>
   </div>

   <pre class="prettyprint linenums">
&lt;?php echo TbHtml::alert(TbHtml::ALERT_COLOR_WARNING, '...'); ?></pre>

   <hr class="bs-docs-separator">

   <h2>Block</h2>

   <div class="bs-docs-example">
      <?php 
echo TbHtml::blockAlert(TbHtml::ALERT_COLOR_WARNING, '<h4>Warning!</h4> Best check yo self, you\'re not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.');
?>
   </div>

   <pre class="prettyprint linenums">
&lt;?php echo TbHtml::blockAlert(TbHtml::ALERT_COLOR_WARNING, '...'); ?></pre>

   <hr class="bs-docs-separator">

   <h2>Contextual alternatives</h2>

   <h3>Error or danger</h3>

   <div class="bs-docs-example">
      <?php 
echo TbHtml::alert(TbHtml::ALERT_COLOR_ERROR, '<strong>Oh snap!</strong> Change a few things up and try submitting again.');