def overlay_insert(image_id: int, place_id: int, link_id: int) -> Union[str, Response]: form = OverlayForm() if form.validate_on_submit(): Overlay.insert(form=form, image_id=image_id, place_id=place_id, link_id=link_id) return redirect(f"{url_for('entity_view', id_=place_id)}#tab-file") return render_template( 'overlay.html', form=form, crumbs=[[_('place'), url_for('index', view='place')], Entity.get_by_id(place_id), Entity.get_by_id(image_id), _('overlay')])
def overlay_insert(image_id: int, place_id: int, link_id: int) -> Union[str, Response]: form = OverlayForm() if form.validate_on_submit(): Overlay.insert({ 'image_id': image_id, 'place_id': place_id, 'link_id': link_id, 'top_left_northing': form.top_left_northing.data, 'top_left_easting': form.top_left_easting.data, 'top_right_northing': form.top_right_northing.data, 'top_right_easting': form.top_right_easting.data, 'bottom_left_northing': form.bottom_left_northing.data, 'bottom_left_easting': form.bottom_left_easting.data }) return redirect(f"{url_for('view', id_=place_id)}#tab-file") return render_template( 'overlay.html', form=form, crumbs=[[_('place'), url_for('index', view='place')], Entity.get_by_id(place_id), Entity.get_by_id(image_id), _('overlay')])