mirror of
https://gh.wpcy.net/https://github.com/hayBIT/freescout2ant.git
synced 2026-07-15 17:25:56 +08:00
Awesomplete is designed for typed input and doesn't reliably show suggestions when the input is empty. Replace the approach with a visible list-group rendered directly in the modal body: - Add #email-suggestions container in the modal template - Populate with clickable list items from the email search API - On click, fill form fields and load contracts (same as Awesomplete select) - Hide the suggestion list when user starts typing manually - Keep original Awesomplete search untouched for manual input https://claude.ai/code/session_01MahaxvQRjJ9bffCy4kaVNQ
43 lines
1.7 KiB
PHP
43 lines
1.7 KiB
PHP
<div class="modal fade" tabindex="-1" role="dialog" id="ameise-modal">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title">{{ __('In Ameise archivieren') }}</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form id="crm_user_form">
|
|
<div class="form_user_crm">
|
|
<span>{{__('Search')}}</span>
|
|
<span class="loading-icon" style="display: none;">
|
|
<span class="glyphicon glyphicon-refresh glyphicon-spin" aria-hidden="true"></span>
|
|
</span>
|
|
<input type="hidden" name="customer_id" id="customer_id" value="" class="form-control">
|
|
<input type="text" name="crm_id" id="crm_user" class="form-control">
|
|
</div>
|
|
<div id="email-suggestions" style="display: none;">
|
|
<ul class="list-group" id="email-suggestions-list"></ul>
|
|
</div>
|
|
<div>
|
|
<a id="crm_button" target="_blank" class="text-large"></a>
|
|
</div>
|
|
<div id="contract_block">
|
|
<select name="contracts" class="form-control" style="display: none;"
|
|
id="contract-tag-dropdown" multiple="multiple">
|
|
</select>
|
|
</div>
|
|
<div id="division_block">
|
|
<select name="divisions" style="display: none;"
|
|
id="division-tag-dropdown" multiple="multiple">
|
|
</select>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('Abbrechen') }}</button>
|
|
<button type="button" class="btn btn-primary" id="archive_btn" style="display: none;">{{ __('Archivieren') }}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|