MISP/app/View/Templates/populate_event_from_templat...

33 lines
1.1 KiB
PHP

<?php echo $this->Html->script('ajaxification'); ?>
<div class="populate_from_template form">
<?php echo $this->Form->create('', array('type' => 'file'));?>
<fieldset>
<div id="populate_template_info" class="templateTableRow templateTableRow80">
<?php
echo $this->element('templateElements/populateTemplateDescription');
?>
</div>
<?php
foreach ($templateData['TemplateElement'] as $k => $element) {
echo $this->element('templateElements/populateTemplate' . ucfirst($element['element_definition']), array('element' => $element['TemplateElement' . ucfirst($element['element_definition'])][0], 'k' => $k, 'element_id' => $element['id'], 'value' => ''));
}
echo $this->Form->input('fileArray', array(
'label' => false,
'style' => 'display:none;',
'value' => '[]',
));
?>
</fieldset>
<?php
echo $this->Form->button('Add', array('class' => 'btn btn-primary'));
echo $this->Form->end();
?>
</div>
<script type="text/javascript">
$(document).ready(function() {
<?php if (isset($fileArray)): ?>
populateTemplateHiddenFileDiv(<?php echo $fileArray; ?>);
<?php endif; ?>
populateTemplateFileBubbles();
});
</script>