This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class YourController extends Controller | |
{ | |
public function your_returnAction(){ | |
$lReturn = array(); | |
//use renderview instead of render, because renderview returns the rendered template | |
$lReturn['html'] = $this->renderView('Bundle:Controller:yourtemplate.html.twig'); | |
return new Response(json_encode($lReturn), 200, array('Content-Type'=>'application/json')); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Karina Mies | |
* @description Mirrors the input of an textfield, identified by id | |
*/ | |
jQuery.fn.mirrorValue = function(){ | |
return this.each(function(){ | |
var lCurrentText, lId, lMirrorClass; | |
jQuery(this).keyup(function(e) { | |
lId = '#'+jQuery(this).attr('id'); | |
lMirrorClass = '.'+jQuery(this).attr('id')+'-mirror'; |