uni-form Yii Uni-Form integration

  1. Documentation
  2. Change Log

This extension helps to integrate Uni-Form (http://sprawsm.com/uni-form/) framework that standardizes form markup and styles it with CSS.

Resources

Documentation

Requirements
  • Yii 1.0 or above
Installation
  • Extract the release file under protected/components
Usage

See the following code example:

<?php $this->widget('application.components.UniForm'); ?>
<?php echo CUFHtml::beginForm(); ?>

<?php echo CUFHtml::errorSummary($authitem); ?>

<?php echo CUFHtml::openTag('fieldset', array('class'=>'inlineLabels')); ?>
<?php echo CUFHtml::openActiveCtrlHolder($authitem,'name'); ?>
<?php echo CUFHtml::activeLabelEx($authitem,'name'); ?>
<?php echo CUFHtml::activeTextField($authitem, 'name', array('maxlength'=>64)); ?>
<?php echo CUFHtml::closeCtrlHolder(); ?>

<?php echo CUFHtml::openActiveCtrlHolder($authitem,'type'); ?>
<?php echo CUFHtml::activeLabelEx($authitem,'type'); ?>
<?php echo CUFHtml::activeDropDownList($authitem, 'type', AuthItem::model()->typeOptions); ?>
<?php echo CUFHtml::closeCtrlHolder(); ?>

<?php echo CUFHtml::openActiveCtrlHolder($authitem,'description'); ?>
<?php echo CUFHtml::activeLabelEx($authitem,'description'); ?>
<?php echo CUFHtml::activeTextArea($authitem,'description',array('rows'=>3, 'cols'=>50)); ?>
<?php echo CUFHtml::closeCtrlHolder(); ?>

<?php echo CUFHtml::openActiveCtrlHolder($authitem,'bizrule'); ?>
<?php echo CUFHtml::activeLabelEx($authitem,'bizrule'); ?>
<?php echo CUFHtml::activeTextArea($authitem,'bizrule',array('rows'=>3, 'cols'=>50)); ?>
<?php echo CUFHtml::closeCtrlHolder(); ?>

<?php echo CUFHtml::openActiveCtrlHolder($authitem,'data'); ?>
<?php echo CUFHtml::activeLabelEx($authitem,'data'); ?>
<?php echo CUFHtml::activeTextArea($authitem,'data',array('rows'=>2, 'cols'=>50)); ?>
<?php echo CUFHtml::closeCtrlHolder(); ?>

<?php echo CUFHtml::closeTag('fieldset'); ?>
<div class="buttonHolder">
<?php echo CUFHtml::resetButton(Yii::t('general', 'Reset')); ?>
<?php echo CUFHtml::submitButton($update ? Yii::t('general', 'Save') : Yii::t('general', 'Create')); ?>
</div>

<?php echo CUFHtml::endForm(); ?>

Change Log

September 6, 2009
  • Small fixes
April 21, 2009
  • Initial release.
5 0
5 followers
1 218 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Tags:
Developed by: fduch
Created on: Apr 21, 2009
Last updated: 13 years ago

Downloads

show all