mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-12 06:30:07 +01:00
Made things work.
Added missing </form> tag that was making report.php cry.
This commit is contained in:
parent
d6e37500fd
commit
56fa6a556a
2 changed files with 22 additions and 14 deletions
|
@ -20,17 +20,28 @@
|
|||
<script src="theme/bulma/js/bulma-tagsinput.min.js"></script>
|
||||
<script>
|
||||
function setupTagsInput() {
|
||||
BulmaTagsInput.attach();
|
||||
const tagsInput = document.getElementById('tags-with-source');
|
||||
new BulmaTagsInput(tagsInput, {
|
||||
source: async function (value) {
|
||||
// Value equal input value
|
||||
// We can then use it to request data from external API
|
||||
return await fetch("/api/tags_autocomplete.php?tag=" + encodeURIComponent(value))
|
||||
.then(function (response) {
|
||||
return response.json();
|
||||
});
|
||||
}
|
||||
allowDuplicates: false,
|
||||
caseSensitive: false,
|
||||
clearSelectionOnTyping: false,
|
||||
closeDropdownOnItemSelect: true,
|
||||
delimiter: ',',
|
||||
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>
|
||||
<div class="control">
|
||||
<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" ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -142,6 +142,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</article>
|
||||
|
||||
<div class="columns is-multiline">
|
||||
|
|
Loading…
Add table
Reference in a new issue