mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Prevent tagsinput select element to be submitted without a value when they are required
- This was allowing to submit private messages to the wrong recipient
This commit is contained in:
parent
f6e4984d7e
commit
b24fe917e4
2 changed files with 4 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
<select name="recipient" class="form-control input-lg" id="recipient">
|
||||
<select name="recipient" class="form-control input-lg" id="recipient" required>
|
||||
{{foreach $contacts as $contact}}
|
||||
<option value="{{$contact.id}}"{{if $contact.id == $selected}} selected{{/if}}>{{$contact.name}}</option>
|
||||
{{/foreach}}
|
||||
|
@ -48,7 +48,9 @@
|
|||
}
|
||||
});
|
||||
|
||||
{{if $selected}}
|
||||
// Import existing ACL into the tags input fields.
|
||||
$recipient_input.tagsinput('add', acl.get({{$selected}})[0]);
|
||||
{{/if}}
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue