Made things work.

Added missing </form> tag that was making report.php cry.
This commit is contained in:
aftercase 2021-08-21 21:57:53 +01:00
parent d6e37500fd
commit 56fa6a556a
2 changed files with 22 additions and 14 deletions

View file

@ -19,18 +19,29 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="theme/bulma/js/bulma-tagsinput.min.js"></script> <script src="theme/bulma/js/bulma-tagsinput.min.js"></script>
<script> <script>
function setupTagsInput() { function setupTagsInput() {
BulmaTagsInput.attach();
const tagsInput = document.getElementById('tags-with-source'); const tagsInput = document.getElementById('tags-with-source');
new BulmaTagsInput(tagsInput, { new BulmaTagsInput(tagsInput, {
source: async function (value) { allowDuplicates: false,
// Value equal input value caseSensitive: false,
// We can then use it to request data from external API clearSelectionOnTyping: false,
return await fetch("/api/tags_autocomplete.php?tag=" + encodeURIComponent(value)) closeDropdownOnItemSelect: true,
.then(function (response) { delimiter: ',',
return response.json(); freeInput: true,
}); highlightDuplicate: true,
} highlightMatchesString: true,
itemText: 'name',
maxTags: 10,
maxChars: 40,
minChars: 1,
noResultsLabel: 'No results found',
placeholder: '10 Tags Maximum"',
removable: true,
searchMinChars: 1,
searchOn: 'text',
selectable: true,
tagClass: 'is-info',
trim: true,
}); });
} }
@ -246,10 +257,6 @@
<label class="label">Tags</label> <label class="label">Tags</label>
<div class="control"> <div class="control">
<input id="tags-with-source" name="tag_input" class="input" <input id="tags-with-source" name="tag_input" class="input"
data-max-tags="10"
data-max-chars="40" type="text" data-item-text="name"
data-item-value="name"
data-case-sensitive="false" placeholder="10 Tags Maximum"
value="<?php echo (isset($_POST['tag_input'])) ? pp_html_escape($_POST['tag_input']) : ''; // Pre-populate if we come here on an error" ?>"> value="<?php echo (isset($_POST['tag_input'])) ? pp_html_escape($_POST['tag_input']) : ''; // Pre-populate if we come here on an error" ?>">
</div> </div>
</div> </div>

View file

@ -142,6 +142,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
</div> </div>
</div> </div>
</div> </div>
</form>
</article> </article>
<div class="columns is-multiline"> <div class="columns is-multiline">