MISP/app/View/Elements/templateElements/populateTemplateFile.ctp

30 lines
1.6 KiB
PHP

<div id="populate_template_info">
<div id="populate_template_info_body" class="populate_template_div_body">
<div class="left-inverse">Field:</div>
<div class="right-inverse">
<?php echo h($element['name']);
if ($element['mandatory']): ?>
<span class="template_mandatory">(*)</span>
<?php endif;?>
</div><br />
<div class="left"><?php echo __('Description');?>:</div>
<div class="right"><?php echo h($element['description']); ?></div><br />
<?php // The following is not ideal for i18n ?>
<div class="left" style="height:26px;"><?php echo __('File');?><?php if ($element['batch']) echo __('s')?>:</div>
<div class="right" id ="filenames_<?php echo $element_id; ?>" style="height:26px;">
&nbsp;
</div><br />
<div class="input file" id="file_container_<?php echo $element_id;?>">
</div>
<iframe id="iframe_<?php echo $element_id; ?>" src="<?php echo $baseurl; ?>/templates/uploadFile/<?php echo $element_id; ?>/<?php echo ($element['batch'] ? 'yes' : 'no'); ?>" style="border:0px;height:30px;width:100%;overflow:hidden;" scrolling="no"></iframe>
<div class="error-message populateTemplateErrorField" <?php if (!isset($errors[$element_id])) echo 'style="display:none;"';?>>
<?php echo __('Error') . ': ' . $errors[$element_id]; ?>
</div>
</div>
</div>
<script type="text/javascript">
var i_<?php echo h($element_id); ?> = 0;
var element_id_<?php echo h($element_id); ?> = <?php echo h($element_id); ?>;
var batch_<?php echo h($element_id); ?> = "<?php echo ($element['batch'] ? 'yes': 'no'); ?>";
</script>