not allowing double file metadata to be added to avoid query problems.

This commit is contained in:
Naomi 2013-08-22 14:15:40 -04:00
parent 17abb4ad9a
commit fa6de28bcf
2 changed files with 13 additions and 2 deletions

View File

@ -11,11 +11,17 @@
</label>
</div>
<?php $i = 0; ?>
<?php $i = 0;
$usedFileMD = array();
?>
<ul class="template_item_list">
<?php foreach ($this->template_fields as $field): ?>
<?php if($field["isFileMd"]) {
$usedFileMD[] = $field["name"];
} ?>
<li id="<?php echo "field_".$i?>"
data-id="<?php echo isset($field["id"]) ? $field["id"] : ""; ?>"
data-name="<?php echo $field["name"]?>"
@ -40,6 +46,10 @@
<ul class="template_file_md">
<?php foreach ($this->fileMD as $md): ?>
<?php if(in_array($md["name"], $usedFileMD)) {
continue;
} ?>
<li id="<?php echo "md_".$md["name"]?>"
data-name="<?php echo $md["name"]?>"
data-type="<?php echo $md["type"]?>"

View File

@ -89,7 +89,8 @@ var AIRTIME = (function(AIRTIME) {
required: false
};
addField(config);
addField(config);
$li.remove();
});
$templateList.sortable();