Ejemplo n.º 1
0
 public static function textArea($attributes)
 {
     $elementHtml = '<textarea ';
     $elementHtml = htmlRender::setAttributes($elementHtml, $attributes);
     $elementHtml = $elementHtml . '>' . htmlRender::setContent($attributes) . '</textarea>';
     echo $elementHtml;
 }
</td>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($product->price, false);
    ?>
</td>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($product->quantity);
    ?>
</td>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($product->category);
    ?>
</td>
            <td><?php 
    htmlRender::radioButton(array("name" => "productId", "value" => $product->id));
    ?>
</td>
        </tr>
    <?php 
}
?>
</table>
<br>
<input type="submit" value="Select Product to Move to new Category" class="btn btn-success"><br>
<?php 
htmlRender::endForm();
?>
<br>

<?php 
include PATH_TO_APP . "views/_footer.php";
<!-- TextArea -->
<br>
<?php 
htmlRender::textArea(array("content" => "Test Content", "rows" => 4, "cols" => 50));
?>
<br>
<br>
<button type="submit">Submit</button>

<!-- EndForm -->
<?php 
htmlRender::endForm();
?>
<br>
<br>

<label>Ajax Form</label>
<br><br>
<!-- Ajax Form -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

<?php 
htmlRender::beginAjaxForm(array("action" => "home/filterProductsByCategory", "method" => "POST"));
htmlRender::textField(array("name" => "username"));
htmlRender::passwordField(array("name" => "password"));
?>
<button type="submit" value="Go" class="btn btn-success">Submit Ajax</button> <br>
<?php 
htmlRender::endAjaxForm();