/**
  * @param array $options
  * @return string
  */
 public function formButton($options = array())
 {
     $form = CHtml::beginForm($this->url(), 'get');
     $form .= CHtml::hiddenField('business', $this->business);
     foreach (CMap::mergeArray($this->defaultOptions, $options) as $k => $v) {
         $form .= CHtml::hiddenField($k, $v);
     }
     $form .= CHtml::imageButton($this->image, array('border' => 0, 'alt' => $this->imageAltText));
     $form .= CHtml::endForm();
     return $form;
 }
Example #2
1
 public function run()
 {
     foreach ($this->botones as $clave => $arreglo) {
         //solo si sin son arrays no  vacios
         if (count($this->botones[$clave]) > 0) {
             if (in_array($this->status, $arreglo["visiblex"])) {
                 $this->iniciamarco();
                 $this->iniciaboton();
                 // $rutaimagenes=Yii::app()->getHomeUrl().'protected/extensions/toolbar/assets/img/'.$clave.$this->size.'.'.strtolower($this->extension);
                 //$rutaimagenes=substr(dirname(__FILE__).'/assets',strpos(dirname(__FILE__).'/assets',Yii::app()->getHomeUrl())).'/img/'.$clave.$this->size.'.'.strtolower($this->extension);
                 // $rutaimagenes=Yii::app()->baseUrl.'/assets/img/'.$clave.'.'.strtolower($this->extension);
                 $rutaimagenes = $this->ruta . '/img/' . $this->size . '/' . $clave . '.' . strtolower($this->extension);
                 $rutaimagenes_bajo = $this->ruta . '/img/' . $this->size . '/' . $clave . '_.' . strtolower($this->extension);
                 $rutaapunta = "";
                 if (count($arreglo["ruta"]) > 0) {
                     //si se han especificado elemtnos en el parametro ruta
                     $rutaapunta = yii::app()->createUrl($arreglo["ruta"][0], $arreglo["ruta"][1]);
                 } else {
                 }
                 $arrayestilolink = array('id' => $clave, 'class' => 'img_swap imagen', 'onMouseOver' => "this.src='" . $rutaimagenes_bajo . "'", 'onMouseOut' => "this.src='" . $rutaimagenes . "'", 'width' => $this->size - 1, 'height' => $this->size - 1);
                 $arrayestiloboton = array('value' => '', 'class' => 'boton_barrita', 'onMouseOver' => "this.src='" . $rutaimagenes_bajo . "'", 'onMouseOut' => "this.src='" . $rutaimagenes . "'", 'width' => $this->size - 1, 'height' => $this->size - 1);
                 switch ($arreglo['type']) {
                     //creamos el link de la ruta
                     case "A":
                         //Se trata de un boton simple POST
                         echo CHtml::imageButton($rutaimagenes, $arrayestiloboton);
                         break;
                     case "B":
                         echo CHtml::link(Chtml::image($rutaimagenes, '', $arrayestilolink), $rutaapunta);
                         break;
                     case "C":
                         echo CHtml::link(Chtml::image($rutaimagenes, '', $arrayestilolink), '#', array('onclick' => " \$('#" . $arreglo["frame"] . "').attr('src','" . $rutaapunta . "');\$('#" . $arreglo["dialog"] . "').dialog('open');"));
                         break;
                     case "D":
                         echo CHtml::AjaxLink(Chtml::image($rutaimagenes, '', $arrayestilolink), $rutaapunta, $arreglo["opajax"]);
                         break;
                 }
                 /*
                 
                                        if (is_array($arreglo)){ //SI ES UN ENLACE
                                            echo CHtml::link(Chtml::image($rutaimagenes,'',array(
                        'id'=>$clave,
                        'class'=>'img_swap imagen',
                     'onMouseOver'=>"this.src='". $rutaimagenes_bajo."'",
                    'onMouseOut'=>"this.src='". $rutaimagenes."'",
                    //'class'=>'imagen',
                    'width'=>$this->size-1,
                    'height'=>$this->size-1
                                                                    )
                                        ),$arreglo
                                );
                    } ELSE {  /// ES UN SUBMIT
                                            echo CHtml::imageButton($rutaimagenes,array('class'=>'boton',
                    'width'=>$this->size-1, 'height'=>$this->size-1,
                    //'onClick'=>'Loading.show();Loading.hide(); ',
                    'onMouseOver'=>"this.src='". $rutaimagenes_bajo."'",
                    'onMouseOut'=>"this.src='". $rutaimagenes."'",
                    'value'=>'Crear'));
                                        }
                 */
                 $this->cierradiv();
                 $this->cierradiv();
             }
         }
     }
 }
 /**
  * Returns this button.
  * @return string the rendering result
  */
 public function render()
 {
     $attributes = $this->attributes;
     if (isset(self::$coreTypes[$this->type])) {
         $method = self::$coreTypes[$this->type];
         if ($method === 'linkButton') {
             if (!isset($attributes['params'][$this->name])) {
                 $attributes['params'][$this->name] = 1;
             }
         } elseif ($method === 'htmlButton') {
             $attributes['type'] = $this->type === 'htmlSubmit' ? 'submit' : ($this->type === 'htmlReset' ? 'reset' : 'button');
             $attributes['name'] = $this->name;
         } else {
             $attributes['name'] = $this->name;
         }
         if ($method === 'imageButton') {
             return CHtml::imageButton(isset($attributes['src']) ? $attributes['src'] : '', $attributes);
         } elseif ($method === 'ajaxSubmitButton') {
             //no work
             return CHtml::ajaxSubmitButton('Submit', '/', array('type' => 'POST', 'update' => '#needForm'), array('type' => 'submit'));
         } else {
             return CHtml::$method($this->label, $attributes);
         }
     } else {
         $attributes['name'] = $this->name;
         ob_start();
         $this->getParent()->getOwner()->widget($this->type, $attributes);
         return ob_get_clean();
     }
 }
Example #4
0
 public function displayScriptItem($dataitem)
 {
     echo "<li class=\"scriptitem grid_15\" >";
     echo "<div class=\"scripttitle\">";
     $linkurl = 'http://' . Yii::app()->request->getServerName() . $this->baseurl . '/script/' . $dataitem['scriptid'] . '/' . $dataitem['urltitle'];
     echo CHtml::Link($dataitem['title'], $linkurl);
     echo "</div>";
     echo "<div class=\"updownvote\" id=\"updownvote_{$dataitem['scriptid']}\">";
     echo "<div class=\"vote upvoteicon\">" . CHtml::imageButton($this->baseurl . '/images/upvote1616.png', array('id' => 'upvote_' . $dataitem['scriptid'] . "_0", 'href' => 'javascript:void(0)', 'title' => 'Up Vote', 'value' => 'Up Vote')) . "</div>";
     echo "<div class=\"votes unvoted\" id=\"votes-unvoted_{$dataitem['scriptid']}\">" . $dataitem['votes'] . "</div>";
     echo "<div class=\"votes upvoted\" id=\"votes-upvoted_{$dataitem['scriptid']}\">" . ($dataitem['votes'] + 1) . "</div>";
     echo "<div class=\"votes downvoted\" id=\"votes-downvoted_{$dataitem['scriptid']}\" >" . ($dataitem['votes'] - 1) . "</div>";
     echo "<div class=\"vote downvoteicon\">" . CHtml::imageButton($this->baseurl . '/images/downvote1616.png', array('id' => 'downvote_' . $dataitem['scriptid'] . "_0", 'href' => 'javascript:void(0)', 'title' => 'Down Vote', 'value' => 'Down Vote')) . "</div>";
     $imageId = "starimg_" . $dataitem['scriptid'] . "_" . $dataitem['isfav'];
     $favImageSrc = "{$this->baseurl}/images/stariconset/star-black/star-black16.png";
     $notfavImageSrc = "{$this->baseurl}/images/stariconset/star-white/star-white16.png";
     if ($dataitem['isfav'] == 1) {
         $imageSrc = $favImageSrc;
     } else {
         $imageSrc = $notfavImageSrc;
     }
     $img = "<img id=\"{$imageId}\"  src=\"{$imageSrc}\"/>";
     echo "<div class=\"favstardiv\">" . CHtml::Link($img, 'javascript:void(0)', array('title' => 'Add to favorites', "class" => 'favstar')) . "</div>";
     echo "</div>";
     // end updownvote
     echo "<div class=\"scriptitemmiddleline\">";
     echo "<div class=\"scriptperson\">";
     echo "By: " . CHtml::Link($dataitem['membername'], 'http://' . Yii::app()->request->getServerName() . $this->baseurl . '/scripts/' . $dataitem['membername']) . " On " . date('M j, Y', $dataitem['lastmodifieddate']->sec);
     $tagurl = 'http://' . Yii::app()->request->getServerName() . $this->baseurl . '/scripts/tagged/';
     echo "<div class='scripttags'>";
     echo "<ul class='taglist'> ";
     //echo  "<li>".CHtml::Link($dataitem['category'],$tagurl.$dataitem['category'])."</li>";
     if (!empty($dataitem['tags'])) {
         foreach ($dataitem['tags'] as $tag) {
             if (!empty($tag)) {
                 echo "<li>" . CHtml::Link($tag, $tagurl . "{$tag}") . "</li>";
             }
         }
     }
     echo "</ul>";
     echo "</div>";
     echo "</div>";
     echo "<div class=\"scriptdesc\">";
     echo nl2br($dataitem['scriptdesc']);
     echo "&nbsp;<span class=\"smalltext viewscript\"  id=\"viewscript_{$dataitem['scriptid']}\"} >" . CHtml::Link("View Script &#9660;", 'javascript:void(0)') . " </span>";
     echo "</div>";
     echo "<div class=\"script\" id=\"showscript_{$dataitem['scriptid']}\">";
     echo nl2br($dataitem['script']);
     echo "</div>";
     echo "<div class=\"scriptlastline\">";
     echo "</div>";
     echo "</div>";
     // end scriptitemmiddleline
     echo "<hr>";
     echo "</li>";
 }
Example #5
0
$parish = Parish::get();
if (isset($parish) and isset($parish->logo_src)) {
    echo CHtml::link(CHtml::image(Yii::app()->request->baseUrl . $parish->logo_src, CHtml::encode(Yii::app()->name), array('width' => $parish->logo_width, 'height' => $parish->logo_height)), Yii::app()->request->baseUrl . '/');
} else {
    echo CHtml::link(CHtml::image(Yii::app()->request->baseUrl . '/images/logo-new.gif', CHtml::encode(Yii::app()->name), array('width' => 200, 'height' => 100)), Yii::app()->request->baseUrl . '/');
}
?>
</div>
		<?php 
if (!Yii::app()->user->isGuest) {
    ?>
		<div id="search">
			<?php 
    $form = $this->beginWidget('CActiveForm', array('id' => 'search_form', 'action' => Yii::app()->createUrl('/parish/search'), 'method' => 'GET'));
    echo CHtml::textField('key', '', array('id' => 'search_key'));
    echo CHtml::imageButton(Yii::app()->request->baseUrl . '/images/search.png');
    $this->endWidget();
    Yii::app()->clientScript->registerScript('global-search', "\n\t\t\tkp = new Object;\n\t\t\t\$('#search_key').keyup(function(e) {\n\t\t\t\tdelete kp[e.which];\n\t\t\t} );\n\t\t\t\$('#search_key').keydown(function(e) {\n\t\t\t\tkp[e.which] = true;\n\t\t\t\tif (kp[17] && (e.which == 74 || e.which == 72)) {\n\t\t\t\t\twindow.location.href = '" . Yii::app()->createUrl('/family/search') . "?id=' + \$('#search_key').val();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} );\n\t\t\t\$('#search_form').submit(function() {\n\t\t\t\t\$.get(\$(this).attr('action'), {\n\t\t\t\t\t'key': \$('#search_key').val()\n\t\t\t\t}, function(data) {\n\t\t\t\t\t\$('#content').html(data);\n\t\t\t\t} );\n\t\t\t\treturn false;\n\t\t\t} );\n\t\t\t\$('#search_key').focus();\n\t\t\t");
    ?>
		</div>
		<?php 
}
?>
	</div><!-- header -->

	<div id="google_translate_element"></div>

	<div id="mainMbMenu">
		<?php 
$userMenu = array('label' => 'Users', 'url' => array('/user/admin'));
if (Yii::app()->user->checkAccess('Admin')) {
Example #6
0
"> 
<?php 
echo $scriptdata['votes'] + 1;
?>
</div>
<div class="votes downvoted" id="votes-downvoted_<?php 
echo $scriptdata['scriptid'];
?>
" > 
<?php 
echo $scriptdata['votes'] - 1;
?>
</div>
<div class="vote downvoteicon">
<?php 
echo CHtml::imageButton($this->baseurl . '/images/downvote1616.png', array('id' => 'downvote_' . $scriptdata['scriptid'] . "_0", 'href' => '#', 'title' => 'Down Vote', 'value' => 'Down Vote'));
?>
</div>	
<?php 
$imageId = "starimg_" . $scriptdata['scriptid'] . "_" . $scriptdata['isfav'];
$favImageSrc = $this->baseurl . '/images/stariconset/star-black/star-black16.png';
$notfavImageSrc = $this->baseurl . '/images/stariconset/star-white/star-white16.png';
if ($scriptdata['isfav'] == 1) {
    $imageSrc = $favImageSrc;
} else {
    $imageSrc = $notfavImageSrc;
}
$img = "<img id=\"{$imageId}\"  src=\"{$imageSrc}\"/>";
?>
<div class="favstardiv"> <?php 
echo CHtml::Link($img, '#', array('title' => 'Add to favorites', "class" => 'favstar'));
Example #7
0
        <i class="icon-user"></i> </div>
      <div class="field">
        <?php 
echo $form->passwordField($model, 'password', array('placeholder' => '****************', 'class' => 'field'));
?>
  
           <?php 
echo $form->error($model, 'password');
?>
        <i class="icon-unlock-alt"></i> </div>
      <div class="submit">
        <?php 
// echo CHtml::submitButton('Continue',array('class'=>'continue'));
?>
    <?php 
echo CHtml::imageButton(Yii::app()->theme->baseUrl . '/images/login_btn.png', array('id' => 'search-button'));
?>
      </div>
      <div class="terms">
          <p>I Agree to the <?php 
echo CHtml::link("terms of service:", array('/site/page', 'view' => 'terms-and-conditions'), array('target' => '_blank'));
?>
<br />
          <?php 
echo CHtml::link('Create an account', Yii::app()->createUrl('site/register'));
?>
</p> 
      </div>
      <?php 
$this->endWidget();
?>
Example #8
0
<div class="operaciones">
	<div class="left">
		<?php 
//echo CHtml::button('Atras', array('submit' => array('agregar', 'id'=>$id))).' ';
$imghtml = CHtml::image('images/Back.png', 'Atras', array('title' => 'Atras'));
echo CHtml::link($imghtml, array('create')) . '&nbsp;&nbsp;&nbsp;';
//echo CHtml::button('Modificar Destinatario y Fecha', array('submit' => array('update','id'=>$id, 'generando'=>1))).'<br/>';
//$imghtml2=CHtml::image('images/Modify.png','Modificar', array('title'=>'Modificar Destinatario y Fecha'));
//echo CHtml::link($imghtml2, array('update','id'=>$model->id, 'generando'=>1)).'&nbsp;';
?>
	</div>
	<div class="right">
	<?php 
//echo CHtml::button('Cancelar', array('submit' => array('delete', 'id'=>$id))).' ';
$imghtml2 = CHtml::image('images/no_mini.png', 'Cancelar', array('title' => 'Cancelar'));
echo CHtml::link($imghtml2, array('delete', 'id' => $model->id)) . '&nbsp;&nbsp;&nbsp;';
//echo CHtml::button('Guardar', array('submit' => array('enviar', 'id'=>$id),
//	'confirm'=>'¿Está seguro que desea crear y enviar el acta?'));
$form = $this->beginWidget('CActiveForm', array('id' => 'bm-traspaso-form', 'enableAjaxValidation' => false));
echo $form->hiddenField($model, 'id', array('tid' => $model->id));
echo CHtml::imageButton('images/Apply.png', array('title' => 'Guardar'), array('confirm' => '¿Está seguro que desea crear y enviar el acta?'));
$this->endWidget();
?>
	</div>
</div>





Example #9
0
echo CHtml::image(Yii::app()->getTheme()->baseUrl . '/img/pallet.png');
?>
        <h1>Crear movimiento</h1>

</div>
    </div>
<div class="division">
  <div class="wide form">

<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'escoje-form', 'action' => Yii::app()->createUrl('/Almacendocs/create'), 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>

        <?php 
echo "<div class='botones'>";
echo CHtml::imageButton(Yii::app()->getTheme()->baseUrl . '/img/siga.png', array('value' => 'Crear'));
echo "</div>";
?>

	<div class="row">
		
		<?php 
$datos1 = CHtml::listData(Almacenmovimientos::model()->findAll(array('order' => 'movimiento')), 'codmov', 'movimiento');
echo CHtml::DropDownList('opciondocu', '', $datos1, array('empty' => '--Seleccione un movimiento--'));
?>
		
	</div>

	

	
Example #10
0
	<b><?php 
echo CHtml::encode($data->nome);
?>
</b>
	<?php 
echo CHtml::imageButton(Yii::app()->request->baseUrl . "/images/update.png", array('submit' => array('update', 'id' => $data->cod_categoria)));
?>
	<?php 
echo CHtml::imageButton(Yii::app()->request->baseUrl . "/images/delete.png", array('submit' => array('delete', 'id' => $data->cod_categoria, 'returnUrl' => array($this->route)), 'confirm' => 'Deseja remover a categoria ' . $data->nome . '?'));
?>
	<br /> <br />

Example #11
0
 /**
  * @dataProvider providerImageButton
  *
  * @param string $src
  * @param array $htmlOptions
  * @param string $assertion
  */
 public function testImageButton($label, $htmlOptions, $assertion)
 {
     $this->assertEquals($assertion, CHtml::imageButton($label, $htmlOptions));
 }
Example #12
0
function printmemberresumefirstline($script, $controller, $i)
{
    $root = $_SERVER['HTTP_HOST'] . "/adminscript";
    echo "<tr>";
    echo "<td class='colrow count'> {$i})";
    $baseUrl = Yii::app()->request->baseUrl;
    //echo $baseUrl;
    $imageId = "starimg_" . $script['scriptid'] . "_" . $script['isfav'];
    $favImageSrc = "{$baseUrl}/images/stariconset/star-black/star-black16.png";
    $notfavImageSrc = "{$baseUrl}/images/stariconset/star-white/star-white16.png";
    if ($script['isfav'] == 1) {
        $imageSrc = $favImageSrc;
    } else {
        $imageSrc = $notfavImageSrc;
    }
    $img = "<img id=\"{$imageId}\"  src=\"{$imageSrc}\"/>";
    $url = Yii::app()->createUrl('ajax/makeFav');
    echo CHtml::Link($img, '', array('href' => '#', 'class' => "favstar"));
    echo "</td>";
    echo "<td class='colrow title grid_12'>";
    echo CHtml::Link(CHtml::encode($script['title']), array('script/upload', 'scriptid' => $script['scriptid']));
    echo "</td>";
    echo "<td class='colrow'>" . date('m/d/Y', $script['lastmodifieddate']->sec) . "</td>";
    if ($script["isprivate"] == 1) {
        $private = 'private';
    } else {
        $private = 'public';
    }
    echo "<td class='colrow'> <input id='isprivate_" . $script['scriptid'] . "_" . $script["isprivate"] . "' type='button' class='{$private}' value=' {$private} &#9660;'></td>";
    echo "<td class='colrow delicon'>";
    echo CHtml::imageButton(Yii::app()->request->baseUrl . '/images/Black_Trash.png', array('id' => 'del_' . $script['scriptid'], 'href' => '#', 'title' => 'delete'));
    echo "</td>";
    echo "</tr>";
}
Example #13
0
# License, or (at your option) any later version.
#
# Alive Parish Software is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
?>

<div class="form">

<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'findMatchForm', 'method' => 'GET'));
echo CHtml::label('', 'key');
echo CHtml::textField('key', '', array('id' => 'key'));
echo CHtml::link(CHtml::imageButton(Yii::app()->request->baseUrl . '/images/search.png'), '#', array('id' => 'find_match'));
$this->endWidget();
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $members, 'columns' => array(array('class' => 'CCheckBoxColumn', 'selectableRows' => 1, 'checkBoxHtmlOptions' => array('name' => 'person')), 'mid', 'fname', 'lname', 'dob', 'baptism_dt', 'profession', 'fathers_name', 'mothers_name')));
?>

    <div class="row buttons">
        <?php 
echo CHtml::submitButton('Select', array('id' => 'submitMatch'));
?>
    </div>                 

</div>
//$action = Yii::app()->createUrl('member/linkedin?action=new');
echo CHtml::beginForm('', 'post', array('id' => 'linkedinsubmitform'));
$imgsrc = Yii::app()->request->baseUrl . "/images/linkedin.png";
echo CHtml::imageButton($imgsrc, array('ajax' => array('type' => 'post', 'url' => Yii::app()->createUrl('ajax/islinkedinpresent'), 'dataType' => 'json', 'success' => 'js:function(j)
		{	
		 	if(j.ok)
			{
			$( "#linkedindialog").dialog({
			resizable: false,
			modal: true,
			buttons: {
				"Yes": function() {
					$(this).dialog( "close" );
					$("#linkedinsubmitform").attr("action","' . Yii::app()->createUrl('member/linkedin', array('action' => 'update')) . '");
					$("#linkedinsubmitform").submit();
				},
				"No": function() {
					$( this ).dialog( "close" );
				}
			}
		});
		$("#linkedindialog").dialog("open");
		}
			else
			 {  $("#linkedinsubmitform").attr("action","' . Yii::app()->createUrl('member/linkedin', array('action' => 'new')) . '");
			 	$("#linkedinsubmitform").submit();
			 }
		}')));
?>
</p>
<div id='linkedindialog' style='display:none' title='Loaded'> You already loaded your linked in profile.Do you want to update it. </div>
Example #15
0
		<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'guia-form', 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => true), 'enableAjaxValidation' => false));
?>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'hidvale');
?>
		<?php 
$datos1 = CHtml::listData(VwDespachogeneral::model()->findAll(), 'hidvale', 'numvale');
//echo $form->DropDownList($model,'hidvale',$datos1, array('empty'=>'--Seleccione un despacho--'))  ;
echo $form->DropDownList($model, 'hidvale', $datos1, array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('guia/cargadespacho'), 'update' => '#zona'), 'empty' => '--Seleccione un despacho--'));
?>

	</div>
		<div class='botones'>
			<?php 
echo CHtml::imageButton(Yii::app()->getTheme()->baseUrl . '/img/siga.png', array('onClick' => 'Loading.show();Loading.hide(); ', 'value' => !$model->isNewRecord ? 'Crear' : 'Grabar'));
?>
		</div>

		<?php 
$this->endWidget();
?>
	</div>
</div>


<div id="zona"></div>
Example #16
0
                        $("#LoginForm_username").val("");
                        $("#LoginForm_password").val("");     
                        window.location="'.$this->createUrl("//utilizador/create").'"')
                            );
                ?>
        </span>                                        
        <?php $this->endWidget(); ?>                                       
</div>  
<?php } else { ?>
<div style="float:right;"><b> Bem vindo <?php echo Yii::app()->user->name; ?>! </b> 
 <?php 
        echo '<br />';
        echo CHtml::imageButton(
                                Utilizador::getFotoUrlByUsername(Yii::app()->user->name),
                                                                array(
                                                                        'width'=>65,
                                                                        'height'=>65
                                                                )
              );
        echo '<br/>';
        echo CHtml::link('Logout',array('//site/logout'));
?>     
</div>
<?php } ?>
<script type="text/javascript">
        function focus(){
                if( $("#LoginForm_username").val() == "Username" )
                {
                        $("#LoginForm_username").val("");
                        $('#LoginForm_password').val("");
                }
Example #17
0
<?php

/* @var $this SolpeController */
/* @var $model Solpe */
/* @var $form CActiveForm */
?>
<div class="division">
<div class="wide form">

<?php 
$form = $this->beginWidget('CActiveForm', array('action' => Yii::app()->createUrl($this->route), 'method' => 'get'));
?>
	<div class="row">
	   <div class='botones'>
		   <?php 
echo CHtml::imageButton(Yii::app()->getTheme()->baseUrl . '/img/bino.png', array('value' => 'Buscar', 'onClick' => 'Loading.show();Loading.hide();'));
?>
	   </div>
	</div>
	<DIV class="panelizquierdo">


	<div class="row">
		<?php 
echo $form->label($model, 'numsolpe');
?>
		<?php 
echo $form->textField($model, 'numsolpe', array('size' => 10, 'maxlength' => 10));
?>
	</div>
		<div class="row">
Example #18
0
<h1><?php 
echo CHtml::encode($model->name . ': ');
?>
 #<?php 
echo $model->id;
?>
</h1>

<?php 
$this->renderPartial('_view_main', array('data' => $model));
$cert = new BaptismCertificate();
$form = $this->beginWidget('CActiveForm', array('id' => 'baptism-certificate-form', 'action' => array('/baptismCertificate/create'), 'enableAjaxValidation' => false));
echo $form->hiddenField($cert, 'baptism_id', array('value' => $model->id));
echo $form->hiddenField($cert, 'cert_dt', array('value' => date('d/m/Y')));
echo CHtml::imageButton(Yii::app()->createUrl("/images/create-cert.jpg"), array('value' => 'Create Certificate'));
$this->endWidget();
/*$this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'dob',
		'baptism_dt',
		'name',
		'sex',
		'fathers_name',
		'mothers_name',
		'residence',
		'godfathers_name',
		'godmothers_name',
		'minister',
Example #19
0
</p>

<?php 
echo '<p>Responsable: ' . $model->responsable->persona->pdata->nombre . '</p>';
//echo '<p>'.$model->observador->pdata->nombre.'</p>';
echo $this->renderPartial('_table_bma', array('bienes' => $bienes));
?>
<br/>

<div class="operaciones">
	<div class="left">
	<?php 
$imghtml = CHtml::image('images/Back.png', 'Atras', array('title' => 'Atras'));
echo CHtml::link($imghtml, array('adscribir', 'id' => $id)) . '&nbsp;&nbsp;&nbsp;';
?>
	</div>
	<div class="right">
	<?php 
$imghtml2 = CHtml::image('images/no_mini.png', 'Cancelar', array('title' => 'Cancelar'));
echo CHtml::link($imghtml2, array('delete', 'id' => $model->id)) . '&nbsp;&nbsp;&nbsp;';
//$imghtml3=CHtml::image('images/Apply.png','Guardar', array('title'=>'Guardar'));
//echo CHtml::link($imghtml3, array('confirmar', 'id'=>$model->id), array('confirm'=>'¿Está seguro que desea crear este formulario B.M.3?' )).'&nbsp;';
$form = $this->beginWidget('CActiveForm', array('id' => 'fbm3-form', 'enableAjaxValidation' => false));
echo $form->hiddenField($model, 'id', array('fmbid' => $model->id));
echo CHtml::imageButton('images/Apply.png', array('title' => 'Guardar'), array('confirm' => '¿Está seguro que desea crear este formulario B.M.3?', 'class' => 'button green'));
$this->endWidget();
?>
	</div>
</div>

Example #20
0
<div>

	<?php 
$form = $this->beginWidget('CActiveForm', array('enableAjaxValidation' => true, 'method' => 'POST'));
?>
<div class="row">
		<?php 
echo $form->hiddenField($modelocabeza, 'idguia');
?>
</div>
	<div class="row">
		<div class='botones'>
			<?php 
echo CHtml::imageButton(Yii::app()->getTheme()->baseUrl . '/img/pin.png', array('width' => 25, 'height' => 25, 'value' => '', 'onClick' => 'Loading.show();Loading.hide();'));
?>
		</div>
	</div>


<div class="row">

</div>
<?php 
$this->widget('zii.widgets.grid.CGridView', array('cssFile' => Yii::app()->getTheme()->baseUrl . '/css/grilla_naranja.css', 'id' => 'ocompra-grid', 'filter' => $model, 'dataProvider' => $model->search(), 'summaryText' => '', 'columns' => array(array('class' => 'CCheckBoxColumn', 'selectableRows' => 20, 'value' => '$data->id', 'checkBoxHtmlOptions' => array('name' => 'cajita[]')), array('name' => 'numero', 'header' => 'Num Solic', 'htmlOptions' => array('width' => '100')), 'desum', 'codart', array('name' => 'cant_pendiente', 'header' => 'Cant Pend', 'value' => '(is_null($data->cant_pendiente))?$data->cant:$data->cant_pendiente', 'htmlOptions' => array('width' => '50')), array('name' => 'txtmaterial', 'header' => 'Descripcion', 'htmlOptions' => array('width' => '400')))));
?>

	<?php 
$this->endWidget();
?>

Example #21
0
 /**
  * Creates a button the of given type.
  * @param string $type the button type.
  * @param string $label the button label.
  * @param array $htmlOptions additional HTML attributes.
  * @return string the button.
  * @throws CException if the button type is valid.
  */
 protected static function createButton($type, $label, $htmlOptions)
 {
     $url = TbArray::popValue('url', $htmlOptions, '#');
     $ajaxOptions = TbArray::popValue('ajaxOptions', $htmlOptions, array());
     switch ($type) {
         case self::BUTTON_TYPE_HTML:
             return parent::htmlButton($label, $htmlOptions);
         case self::BUTTON_TYPE_SUBMIT:
             $htmlOptions['type'] = 'submit';
             return parent::htmlButton($label, $htmlOptions);
         case self::BUTTON_TYPE_RESET:
             $htmlOptions['type'] = 'reset';
             return parent::htmlButton($label, $htmlOptions);
         case self::BUTTON_TYPE_IMAGE:
             return parent::imageButton($label, $htmlOptions);
         case self::BUTTON_TYPE_LINKBUTTON:
             return parent::linkButton($label, $htmlOptions);
         case self::BUTTON_TYPE_AJAXLINK:
             return parent::ajaxLink($label, $url, $ajaxOptions, $htmlOptions);
         case self::BUTTON_TYPE_AJAXBUTTON:
             $htmlOptions['ajax'] = $ajaxOptions;
             return parent::htmlButton($label, $htmlOptions);
         case self::BUTTON_TYPE_INPUTBUTTON:
             return parent::button($label, $htmlOptions);
         case self::BUTTON_TYPE_INPUTSUBMIT:
             $htmlOptions['type'] = 'submit';
             return parent::button($label, $htmlOptions);
         case self::BUTTON_TYPE_LINK:
             return self::link($label, $url, $htmlOptions);
         default:
             throw new CException('Invalid button type "' . $type . '".');
     }
 }
Example #22
0
		<?php 
echo $form->passwordField($model, 'password');
?>
		<?php 
echo $form->error($model, 'password');
?>
	</div>
	
	<div class="row rememberMe">
		<?php 
echo $form->checkBox($model, 'rememberMe');
?>
		<?php 
echo $form->label($model, 'rememberMe');
?>
		<?php 
echo $form->error($model, 'rememberMe');
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::imageButton('./images/button-login.gif');
?>
	</div>

<?php 
$this->endWidget();
?>
</div><!-- form -->
 /**
  * Returns this button.
  * @return string the rendering result
  */
 public function render()
 {
     $attributes = $this->attributes;
     if (isset(self::$coreTypes[$this->type])) {
         $method = self::$coreTypes[$this->type];
         if ($method === 'linkButton') {
             if (!isset($attributes['params'][$this->name])) {
                 $attributes['params'][$this->name] = 1;
             }
         } else {
             if ($method === 'htmlButton') {
                 $attributes['type'] = $this->type === 'htmlSubmit' ? 'submit' : ($this->type === 'htmlReset' ? 'reset' : 'button');
                 $attributes['name'] = $this->name;
             } else {
                 $attributes['name'] = $this->name;
             }
         }
         if ($method === 'imageButton') {
             return CHtml::imageButton(isset($attributes['src']) ? $attributes['src'] : '', $attributes);
         } else {
             return CHtml::$method($this->label, $attributes);
         }
     } else {
         $attributes['name'] = $this->name;
         ob_start();
         $this->getParent()->getOwner()->widget($this->type, $attributes);
         return ob_get_clean();
     }
 }
Example #24
0
<div class="view">
        <table>
                <tr>
                        <td width="50">
                                <?php 
                                        $user = Utilizador::getUserById($data->utilizador_oid);
                                        echo CHtml::imageButton('.\\'.$user->teste,array(
                                                                                'width'=>50,
                                                                                'height'=>50
                                                                            )
                                        );
                                ?>
                        </td>
                        <td style="float:left;">
                                <?php echo $user->username; ?> diz,
                                <br/>
                                <b><?php echo CHtml::encode($data->texto); ?></b>
                        </td>
                </tr>
        </table>
</div>
Example #25
0
<div class="row">
		<?php 
if ($model->cestadovale == '99' or $model->cestadovale == '01') {
    echo "<div class='botones'>";
    echo CHtml::imageButton(Yii::app()->getTheme()->baseUrl . '/img/save.png', array('value' => !$model->isNewRecord ? 'Crear' : 'Grabar'));
    echo "</div>";
    echo "<div class='botones'>";
    echo CHtml::link(Chtml::image(Yii::app()->getTheme()->baseUrl . '/img/contar.png'), array('/solpe/imprimir2', 'id' => $model->id));
    echo "</div>";
}
?>

		<?php 
if ($model->cestadovale == null) {
    echo "<div class='botones'>";
    echo CHtml::imageButton(Yii::app()->getTheme()->baseUrl . '/img/siga.png', array('value' => !$model->isNewRecord ? 'Crear' : 'Grabar'));
    echo "</div>";
}
?>
		<?php 
if ($model->cestadovale == '02') {
    echo "<div class='botones'>";
    echo CHtml::link(Chtml::image(Yii::app()->getTheme()->baseUrl . '/img/imprimir.png'), array('/solpe/imprimir2', 'id' => $model->id));
    echo "</div>";
}
?>
          <?php 
if ($model->cestadovale == '01') {
    echo "<div class='botones'>";
    echo CHtml::link(Chtml::image(Yii::app()->getTheme()->baseUrl . '/img/ok.png'), array('/solpe/procesarsolpe', 'id' => $model->id, 'ev' => 60));
    echo "</div>";
Example #26
0
<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'comment-form', 'enableAjaxValidation' => true));
?>
  <?php 
echo $form->hiddenField($model, 'type', array('size' => 60, 'maxlength' => 128));
?>
  <?php 
echo $form->hiddenField($model, 'type_id', array('size' => 60, 'maxlength' => 128));
?>

  <div class="row">
    <?php 
echo $form->errorSummary($model);
?>
    <?php 
echo $form->textArea($model, 'comment', array('rows' => 2, 'cols' => 23));
?>
  </div>

  <div class="row buttons">
    <?php 
echo CHtml::imageButton('/images/comment.png');
?>
  </div>
  <br class="clear" />
<?php 
$this->endWidget();
?>

</div><!-- form -->