From 7c96d8d0c827b6ed676ed2fcb1ccb14badbb9d88 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Tue, 30 Jul 2024 18:30:04 -0500 Subject: [PATCH] Move upload fields out of pgwui_common Inheriting templates call "main_form" and initiate execution --- src/pgwui_upload_core/templates/upload.mak | 93 ++++++++++++++++++++-- 1 file changed, 87 insertions(+), 6 deletions(-) diff --git a/src/pgwui_upload_core/templates/upload.mak b/src/pgwui_upload_core/templates/upload.mak index 6a8f6ed..16c584d 100644 --- a/src/pgwui_upload_core/templates/upload.mak +++ b/src/pgwui_upload_core/templates/upload.mak @@ -33,13 +33,91 @@ from pgwui_upload_core.template_utils import show_choice from pgwui_common.path import asset_abspath - auth_base_mak = asset_abspath('pgwui_common:templates/auth_base.mak') + db_base_mak = asset_abspath('pgwui_common:templates/db_base.mak') %> -<%inherit file="${auth_base_mak}" /> +<%inherit file="${db_base_mak}" /> <%block name="title">${pgwui['upload_settings']['menu_label']} +<%def name="format_row(tab_index)"> + + Uploaded Data Format: + + + +
+ + + + + <% tab_index.inc(2) %> + + +<%def name="nulls_row(tab_index)"> + % if show_choice(pgwui, 'null'): + + + + + + + + + + + + + + + + + <% tab_index.inc(2) %> + % endif + + +<%def name="file_row(tab_index)"> + + + + + + + + + <% tab_index.inc() %> + + <%def name="trim_row(tab_index)"> % if show_choice(pgwui, 'trim'): @@ -79,12 +157,15 @@ % endif -<%self:upload_form args="tab_index"> - <%parent:upload_form args="tab_index"> +<%def name="main_form(tab_index)"> + <%parent:main_form tab_index="${tab_index}" args="tab_index"> <% caller.body(tab_index) + format_row(tab_index) + nulls_row(tab_index) trim_row(tab_index) literal_row(tab_index) + file_row(tab_index) %> - - + + -- 2.34.1