From fac0e28afbbd27adfe3f88a6144c52046d71e9e6 Mon Sep 17 00:00:00 2001 From: f0x Date: Tue, 13 Sep 2022 22:47:23 +0200 Subject: [PATCH] refactor/cleanup forms --- .../settings-panel/components/form-fields.jsx | 12 ++++- web/source/settings-panel/lib/form-fields.js | 50 ------------------- web/source/settings-panel/user/profile.js | 2 - web/source/settings-panel/user/security.js | 26 ---------- web/source/settings-panel/user/settings.js | 50 +++++++++---------- 5 files changed, 35 insertions(+), 105 deletions(-) delete mode 100644 web/source/settings-panel/lib/form-fields.js delete mode 100644 web/source/settings-panel/user/security.js diff --git a/web/source/settings-panel/components/form-fields.jsx b/web/source/settings-panel/components/form-fields.jsx index a3b19bc17..30f209f13 100644 --- a/web/source/settings-panel/components/form-fields.jsx +++ b/web/source/settings-panel/components/form-fields.jsx @@ -71,7 +71,7 @@ function get(state, id) { module.exports = { formFields: function formFields(setter, selector) { - function FormField({type, id, name, className="", placeHolder="", fileType="", children=null}) { + function FormField({type, id, name, className="", placeHolder="", fileType="", children=null, options={}}) { const dispatch = Redux.useDispatch(); let state = Redux.useSelector(selector); let { @@ -88,6 +88,12 @@ module.exports = { field =