<?php

class ModalCamposTexto extends CHtml {

	public static function createModal($model_name) {
		Yii::app()->controller->renderPartial('//layouts/partial/modal_campos_texto', array('model_name' => $model_name));
	}
	public static function openModalButton($field) {
		$ajuda = Campos::model()->find('FLD_NOME = "'.$field.'"');
		if($ajuda) {
			$ajuda = $ajuda->FLD_AJUDA;
		} 
		return '<button type="button" class="open-modal" data-toggle="modal" data-target="#CamposTextoModal" data-field="'.$field.'" tabindex="-1"><i class="fa fa-expand" data-toggle="tooltip" title="Expandir campo"></i><input type="hidden" value="'.$ajuda.'" class="ajuda" /></button>';
	}
}