| 1 |
<?php |
| 2 |
/** |
| 3 |
* |
| 4 |
*/ |
| 5 |
|
| 6 |
// Disallow direct access. |
| 7 |
defined('ABSPATH') or die("Access denied"); |
| 8 |
?> |
| 9 |
<?php |
| 10 |
// Add activeFileId into codeFile object. |
| 11 |
$this->block->file->activeFileId = $this->block->activeFileId; |
| 12 |
// Hidden fields. |
| 13 |
$fields = array('name', 'type', 'activeFileId'); |
| 14 |
foreach ($fields as $field) : |
| 15 |
// Don't output until it has a value |
| 16 |
// It better for traffic, client side |
| 17 |
// should take care of this. |
| 18 |
if (!$fieldValue = $this->block->file->$field) { |
| 19 |
continue; |
| 20 |
} |
| 21 |
?> |
| 22 |
<input type="hidden" name="cjtoolbox[<?php echo $this->block->id; ?>][file][<?php echo $field ?>]" value="<?php echo $fieldValue ?>" /> |
| 23 |
<?php endforeach; ?> |
| 24 |
<div class="cjcontainer"> |
| 25 |
<div class="cjcodeblock"> |
| 26 |
<?php echo $this->getTemplate('editor-toolbox', array(), 'tmpl/templates'); ?> |
| 27 |
<div class="datablock"> |
| 28 |
<div id="editor-<?php echo $this->block->id ?>" class="code-editor"><?php echo htmlentities($this->block->file->code, null, 'UTF-8') ?></div> |
| 29 |
</div> |
| 30 |
</div> |
| 31 |
</div> |