src/ApplicationBundle/Resources/views/modals/input_forms/ai_intake_modal.html.twig line 1

Open in your IDE?
  1. <div class="modal fade" id="hbAiIntakeModal" tabindex="-1" role="dialog" aria-labelledby="hbAiIntakeModalLabel">
  2.     <div class="modal-dialog modal-lg" role="document">
  3.         <div class="modal-content">
  4.             <div class="modal-header" style="display:flex;align-items:center;justify-content:space-between;gap:12px;">
  5.                 <div>
  6.                     <h4 class="modal-title" id="hbAiIntakeModalLabel" style="margin:0;font-weight:700;">AI Intake</h4>
  7.                     <small id="hbAiIntakeModalSubtitle" style="color:#777;">Upload a document, preview the extracted data, then apply or continue importing.</small>
  8.                 </div>
  9.                 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  10.                     <span aria-hidden="true">&times;</span>
  11.                 </button>
  12.             </div>
  13.             <div class="modal-body" style="background:#f9fafb;">
  14.                 <div class="row">
  15.                     <div class="col-sm-6">
  16.                         <div class="form-group">
  17.                             <label class="control-label" style="font-weight:600;">Import Type</label>
  18.                             {# ONE source with the /ai-import page (ImportTypeCore). These two
  19.                                lists used to be hardcoded here and drifted: Tender was added to
  20.                                the page and never to this modal, which is why it kept reading as
  21.                                "missing from the AI import pages" from the + menu. #}
  22.                             <select id="hbAiIntakeType" class="form-control">
  23.                                 {% for key, label in hb_import_types() %}
  24.                                     <option value="{{ key }}"{% if key == 'expense' %} selected{% endif %}>{{ label }}</option>
  25.                                 {% endfor %}
  26.                             </select>
  27.                         </div>
  28.                     </div>
  29.                     <div class="col-sm-6">
  30.                         <div class="form-group">
  31.                             <label class="control-label" style="font-weight:600;">Document Type</label>
  32.                             <select id="hbAiIntakeDocumentType" class="form-control">
  33.                                 {% for key, label in hb_document_types() %}
  34.                                     <option value="{{ key }}"{% if key == 'auto' %} selected{% endif %}>{{ label }}</option>
  35.                                 {% endfor %}
  36.                             </select>
  37.                         </div>
  38.                     </div>
  39.                 </div>
  40.                 <div class="form-group" style="margin-bottom:18px;">
  41.                     <label class="btn btn-default btn-block" style="padding:12px;border-radius:8px;background:#fff;">
  42.                         <i class="fa fa-upload" style="margin-right:6px;"></i>
  43.                         Choose document
  44.                         <input type="file" id="hbAiIntakeFile" accept="{{ hb_import_accept() }}" style="display:none;">
  45.                     </label>
  46.                 </div>
  47.                 <div id="hbAiIntakeStatus" class="alert alert-info" style="margin-bottom:18px;">
  48.                     Pick a file to parse.
  49.                 </div>
  50.                 <div id="hbAiIntakePreview" style="display:none;">
  51.                     <div class="panel panel-default" style="margin-bottom:18px;">
  52.                         <div class="panel-heading" style="font-weight:600;">Extracted Summary</div>
  53.                         <div class="panel-body">
  54.                             <div id="hbAiIntakePreviewMeta" style="margin-bottom:10px;"></div>
  55.                             <div id="hbAiIntakePreviewFields" style="display:flex;flex-wrap:wrap;gap:8px;"></div>
  56.                         </div>
  57.                     </div>
  58.                     <div class="panel panel-default">
  59.                         <div class="panel-heading" style="font-weight:600;">Preview Data</div>
  60.                         <div class="panel-body" style="max-height:300px;overflow:auto;">
  61.                             <div id="hbAiIntakePreviewTable"></div>
  62.                         </div>
  63.                     </div>
  64.                 </div>
  65.             </div>
  66.             <div class="modal-footer" style="display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;">
  67.                 <div>
  68.                     <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  69.                 </div>
  70.                 <div style="display:flex;gap:8px;flex-wrap:wrap;">
  71.                     <button type="button" class="btn btn-info" id="hbAiIntakeOpenImportPage" style="display:none;">Continue in AI Import</button>
  72.                     <button type="button" class="btn btn-primary" id="hbAiIntakeApply" style="display:none;">Apply to Form</button>
  73.                 </div>
  74.             </div>
  75.         </div>
  76.     </div>
  77. </div>