From 15f715689c495414f833f908449301ad51c351f8 Mon Sep 17 00:00:00 2001 From: Miguel Ribeiro Date: Fri, 23 Feb 2024 02:33:25 +0100 Subject: [PATCH 1/5] fix: show email field on household on add --- scripts/i18n/de.js | 1 + scripts/i18n/el.js | 1 + scripts/i18n/en.js | 1 + scripts/i18n/es.js | 1 + scripts/i18n/fr.js | 1 + scripts/i18n/jp.js | 1 + scripts/i18n/pt.js | 1 + scripts/i18n/tr.js | 1 + scripts/i18n/zh_cn.js | 1 + scripts/i18n/zh_tw.js | 1 + scripts/settings.js | 7 +++++++ 11 files changed, 17 insertions(+) diff --git a/scripts/i18n/de.js b/scripts/i18n/de.js index e9616f715..22eeeb769 100644 --- a/scripts/i18n/de.js +++ b/scripts/i18n/de.js @@ -12,6 +12,7 @@ let i18n = { network_response_error: "Netzwerkfehler", failed_add_member: "Hinzufügen von Mitglied fehlgeschlagen", member: "Mitglied", + email: "E-Mail", save_member: "Mitglied speichern", delete_member: "Mitglied löschen", failed_remove_member: "Mitglied konnte nicht gelöscht werden", diff --git a/scripts/i18n/el.js b/scripts/i18n/el.js index b6e119652..5b897632f 100644 --- a/scripts/i18n/el.js +++ b/scripts/i18n/el.js @@ -12,6 +12,7 @@ let i18n = { network_response_error: "Η ανταπόκριση του δικτύου δεν ήταν εντάξει", failed_add_member: "Αποτυχία προσθήκης μέλους", member: "Μέλος", + email: "Email", save_member: "Αποθήκευση μέλους", delete_member: "Διαγραφή μέλους", failed_remove_member: "Αποτυχία διαγραφής μέλους", diff --git a/scripts/i18n/en.js b/scripts/i18n/en.js index d84bdfb58..605ce414c 100644 --- a/scripts/i18n/en.js +++ b/scripts/i18n/en.js @@ -12,6 +12,7 @@ let i18n = { network_response_error: "Network response was not ok", failed_add_member: "Failed to add member", member: "Member", + email: "Email", save_member: "Save member", delete_member: "Delete member", failed_remove_member: "Failed to remove member", diff --git a/scripts/i18n/es.js b/scripts/i18n/es.js index d1dc3e398..bf702d870 100644 --- a/scripts/i18n/es.js +++ b/scripts/i18n/es.js @@ -12,6 +12,7 @@ let i18n = { network_response_error: "Error en la respuesta de la red", failed_add_member: "Error al añadir miembro", member: "Miembro", + email: "Correo electrónico", save_member: "Guardar miembro", delete_member: "Eliminar miembro", failed_remove_member: "Error al eliminar miembro", diff --git a/scripts/i18n/fr.js b/scripts/i18n/fr.js index fb1406c58..d49054024 100644 --- a/scripts/i18n/fr.js +++ b/scripts/i18n/fr.js @@ -12,6 +12,7 @@ let i18n = { network_response_error: "La réponse du réseau n'était pas correcte", failed_add_member: "Échec de l'ajout du membre", member: "Membre", + email: "Courriel", save_member: "Enregistrer le membre", delete_member: "Supprimer le membre", failed_remove_member: "Échec de la suppression du membre", diff --git a/scripts/i18n/jp.js b/scripts/i18n/jp.js index bb0d14d07..db4dcb9e5 100644 --- a/scripts/i18n/jp.js +++ b/scripts/i18n/jp.js @@ -12,6 +12,7 @@ let i18n = { network_response_error: "ネットワークの応答異常", failed_add_member: "世帯員の追加に失敗", member: "世帯員", + email: "メール", save_member: "世帯員の保存", delete_member: "世帯員の削除", failed_remove_member: "世帯員の削除に失敗", diff --git a/scripts/i18n/pt.js b/scripts/i18n/pt.js index ca2ae51cd..e32150239 100644 --- a/scripts/i18n/pt.js +++ b/scripts/i18n/pt.js @@ -12,6 +12,7 @@ let i18n = { 'network_response_error': 'Erro de resposta de rede', 'failed_add_member': 'Falha ao adicionar membro', 'member': 'Membro', + 'email': 'Email', 'save_member': 'Guardar membro', 'delete_member': 'Remover membro', 'failed_remove_member': 'Erro ao remover membro', diff --git a/scripts/i18n/tr.js b/scripts/i18n/tr.js index 98140c204..a6afed811 100644 --- a/scripts/i18n/tr.js +++ b/scripts/i18n/tr.js @@ -12,6 +12,7 @@ let i18n = { network_response_error: "Ağ yanıtı kabul edilmedi", failed_add_member: "Üye eklenemedi", member: "Üye", + email: "E-posta", save_member: "Üyeyi Kaydet", delete_member: "Üyeyi Sil", failed_remove_member: "Üye silinmedi", diff --git a/scripts/i18n/zh_cn.js b/scripts/i18n/zh_cn.js index b0bdcea51..853a9c583 100644 --- a/scripts/i18n/zh_cn.js +++ b/scripts/i18n/zh_cn.js @@ -12,6 +12,7 @@ let i18n = { 'network_response_error': "网络响应不正常", 'failed_add_member': '添加成员失败', 'member': '成员', + 'email': '电子邮箱', 'save_member': '保存成员', 'delete_member': '删除成员', 'failed_remove_member': '移除成员失败', diff --git a/scripts/i18n/zh_tw.js b/scripts/i18n/zh_tw.js index aae672427..8333b9f64 100644 --- a/scripts/i18n/zh_tw.js +++ b/scripts/i18n/zh_tw.js @@ -12,6 +12,7 @@ let i18n = { 'network_response_error': "網路無回應", 'failed_add_member': '新增成員失敗', 'member': '成員', + 'email': '電子信箱', 'save_member': '保存成員', 'delete_member': '刪除成員', 'failed_remove_member': '移除成員失敗', diff --git a/scripts/settings.js b/scripts/settings.js index 1708f51ea..d33cd46d3 100644 --- a/scripts/settings.js +++ b/scripts/settings.js @@ -43,6 +43,12 @@ function addMemberButton(memberId) { input.name = "member"; input.value = translate('member'); + let emailInput = document.createElement("input"); + emailInput.type = "text"; + emailInput.placeholder = translate('email'); + emailInput.name = "email"; + emailInput.value = ""; + let editLink = document.createElement("button"); editLink.className = "image-button medium" editLink.name = "save"; @@ -70,6 +76,7 @@ function addMemberButton(memberId) { deleteLink.appendChild(deleteImage); div.appendChild(input); + div.appendChild(emailInput); div.appendChild(editLink); div.appendChild(deleteLink); From 166d42e21fcd4d339338f4f9ba31f6cb68ffc6e3 Mon Sep 17 00:00:00 2001 From: Miguel Ribeiro Date: Fri, 23 Feb 2024 02:33:50 +0100 Subject: [PATCH 2/5] Move display settings to the bottom --- settings.php | 78 ++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/settings.php b/settings.php index 44bea3a9e..2bb7e6a39 100644 --- a/settings.php +++ b/settings.php @@ -470,7 +470,45 @@ - + + + - - - query($sql); - - if ($result) { - $payments = array(); - while ($row = $result->fetchArray(SQLITE3_ASSOC)) { - $payments[] = $row; - } - } - ?> - query($sql); @@ -472,6 +460,18 @@ + query($sql); + + if ($result) { + $payments = array(); + while ($row = $result->fetchArray(SQLITE3_ASSOC)) { + $payments[] = $row; + } + } + ?> +