- Added compressImageForEmail function (300x300px, quality 0.3)
- Photos in email are now ~5-15KB instead of ~50-200KB
- sendEmail now async to handle photo compression
- Updated email text to indicate photos are resized
- Original quality preserved in CSV export
- Reduced mailto limit check to 64KB
- Photo placeholder now uses label element for better iOS support
- Input gets unique ID for label association
- Removed 'Geen foto's toegevoegd' message from email when no photos
- Added null checks for preview element
- Preview now explicitly set to display:block when photo loaded
- getFormData now scopes queries to #inventory-form element
- clearFormData now scopes queries to #inventory-form element
- Excludes form-selector from field queries
- Fixes exportCSV, sendEmail, and clearForm buttons
New features:
- unique_id_fields in YAML config to define form identity
- Form selector dropdown to switch between saved forms
- Multiple forms can be saved per device
- Auto-detect existing forms when filling ID fields
- Delete saved forms functionality
- Forms persist in localStorage with index
Changes:
- yaml_parser.py: Added unique_id_fields support
- generator.py: Added form selector UI
- templates.py: Complete rewrite of save/load logic for multi-form support
- config.yaml: Example with serienummer and asset_id as unique fields
- Photos are now included in a separate 'FOTO BIJLAGEN' section
- Each photo shows filename with extension (e.g., Foto_van_het_apparaat.jpeg)
- Base64 data wrapped with START/EINDE markers for easy extraction
- Added warning if email exceeds 100KB (mailto limit)
- Instructions included for decoding base64 images
- Show '⏳ Email voorbereiden...' immediately when clicked
- Disable button during processing
- Use setTimeout to allow UI update before heavy processing
- Restore button state after mailto opens
- Python HTML generator from YAML config
- 3 themes: modern, corporate, minimal
- Field types: text, number, date, dropdown, multiselect, boolean, photo, textarea
- Auto-save to localStorage and URL hash
- CSV export with base64 photos
- Mailto with configurable subject
- Responsive design for mobile/tablet/desktop
- Company logo and color customization