<tr id="entry-{{ entry.id }}">
    <td colspan="5">
        <form hx-post="{{ url_for('edit.update_entry', entry_id=entry.id) }}"
              hx-target="#entry-{{ entry.id }}"
              hx-swap="outerHTML"
              class="edit-form">
            <div class="form-row">
                <div class="form-group">
                    <label for="word-{{ entry.id }}">Word</label>
                    <input type="text"
                           id="word-{{ entry.id }}"
                           name="word"
                           value="{{ entry.current_word }}"
                           required>
                </div>
                <div class="form-group">
                    <label for="translation-{{ entry.id }}">Translation</label>
                    <input type="text"
                           id="translation-{{ entry.id }}"
                           name="translation"
                           value="{{ entry.current_translation }}"
                           required>
                </div>
            </div>
            <div class="form-group">
                <label for="example-{{ entry.id }}">Example Sentence</label>
                <textarea id="example-{{ entry.id }}"
                          name="example"
                          rows="2">{{ entry.current_example }}</textarea>
            </div>
            <div class="form-actions">
                <button type="submit" class="btn btn-sm btn-primary">Save</button>
                <button type="button"
                        hx-get="{{ url_for('preview.preview_upload', upload_id=entry.upload_id) }}"
                        hx-target="body"
                        class="btn btn-sm btn-secondary">Cancel</button>
            </div>
        </form>
    </td>
</tr>
