From fefdbada9178c6573765377ad61183db898af918 Mon Sep 17 00:00:00 2001 From: flaskfarm Date: Sat, 15 Oct 2022 13:07:38 +0900 Subject: [PATCH] update --- lib/framework/templates/macro.html | 2 +- lib/framework/version.py | 2 +- lib/plugin/logic_module_base.py | 4 ++-- lib/system/mod_tool.py | 12 +++++++++++- lib/system/templates/system_tool_upload.html | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/lib/framework/templates/macro.html b/lib/framework/templates/macro.html index 50d5f66..6c55cd8 100644 --- a/lib/framework/templates/macro.html +++ b/lib/framework/templates/macro.html @@ -234,7 +234,7 @@ {{ setting_bottom(desc, padding_top='-5') }} {% endmacro %} -{% macro info_text_go_button(id, left, buttons, value='', desc=None) %} +{% macro info_text_go_buttons(id, left, buttons, value='', desc=None) %} {{ setting_top(left) }}
{{value}} diff --git a/lib/framework/version.py b/lib/framework/version.py index c3229a7..ecd4d42 100644 --- a/lib/framework/version.py +++ b/lib/framework/version.py @@ -1 +1 @@ -VERSION="4.0.9" \ No newline at end of file +VERSION="4.0.10" \ No newline at end of file diff --git a/lib/plugin/logic_module_base.py b/lib/plugin/logic_module_base.py index d83fe84..b7117d7 100644 --- a/lib/plugin/logic_module_base.py +++ b/lib/plugin/logic_module_base.py @@ -139,11 +139,11 @@ class PluginPageBase(object): arg = {} if self.P.ModelSetting != None: arg = self.P.ModelSetting.to_dict() - return render_template(f'{__package__}_{self.parent.name}_{self.name}.html', arg=arg) + return render_template(f'{self.P.package_name}_{self.parent.name}_{self.name}.html', arg=arg) except Exception as e: pass - return render_template('sample.html', title=f"PluginPageBase-process_menu {self.P.package_name}/{self.parent.name}/{self.name}") + return render_template('sample.html', title=f"PluginPageBase-process_menu --- {self.P.package_name}/{self.parent.name}/{self.name}") def process_ajax(self, sub, req): diff --git a/lib/system/mod_tool.py b/lib/system/mod_tool.py index ec90b96..7a24a16 100644 --- a/lib/system/mod_tool.py +++ b/lib/system/mod_tool.py @@ -7,7 +7,9 @@ name = 'tool' class ModuleTool(PluginModuleBase): def __init__(self, P): super(ModuleTool, self).__init__(P, name=name, first_menu='upload') - self.set_page_list([PageUpload]) + self.set_page_list([PageUpload, PageCrypt]) + + class PageUpload(PluginPageBase): @@ -21,5 +23,13 @@ class PageUpload(PluginPageBase): class PageCrypt(PluginPageBase): + + def __init__(self, P, parent): super(PageCrypt, self).__init__(P, parent, name='crypt') + + self.db_default = { + f'{self.parent.name}_{self.name}_use_user_key': 'False', + f'{self.parent.name}_{self.name}_user_key': '', + f'{self.parent.name}_{self.name}_user_key': '', + } \ No newline at end of file diff --git a/lib/system/templates/system_tool_upload.html b/lib/system/templates/system_tool_upload.html index 2b48c64..a86c9f7 100644 --- a/lib/system/templates/system_tool_upload.html +++ b/lib/system/templates/system_tool_upload.html @@ -11,7 +11,7 @@ {{ macros.m_row_end() }} {{ macros.m_hr() }}
- {{ macros.setting_input_text_and_buttons('path_upload', '업로드 경로', [['select_btn', '폴더 선택']], value=arg['path_upload'], desc=['설정 저장 후부터 적용']) }} + {{ macros.setting_input_text_and_buttons('path_upload', '업로드 경로', [['select_btn', '폴더 선택']], value=arg['path_upload'], desc=['경로 변경시 설정 저장 후부터 적용']) }}
{{ macros.m_hr_black() }} {{ dropzone.create(action='upload') }}