This code:
Code: Select all
<?php echo link_to('Publish', 'job_publish', $job, array('method' => 'put')) ?>Code: Select all
<a href="/frontend_dev.php/job/c55fb50ef1d38aeb1c21b2361e6034b870eee5a5/publish" onclick="var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'post'; f.action = this.href;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', 'sf_method'); m.setAttribute('value', 'put'); f.appendChild(m);var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_csrf_token'); m.setAttribute('value', 'c14237ea8513e519b8d307661bed3a6d'); f.appendChild(m);f.submit();return false;">Publish</a>