From 0c61855df9124ef302b1556a84b4b09fa509840a Mon Sep 17 00:00:00 2001 From: acanas Date: Wed, 10 May 2023 11:46:45 +0200 Subject: [PATCH] Version 22.107.38:May 10, 2023 Changes in edition of mail domains. --- swad_changelog.h | 3 +- swad_mail.c | 206 +++++++++++++++++++++++++-------------------- swad_text.c | 46 ---------- swad_text_action.c | 12 +-- 4 files changed, 121 insertions(+), 146 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 25f164fd..58a89657 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -629,10 +629,11 @@ TODO: Emilce Barrera Mesa: Podr TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen. */ -#define Log_PLATFORM_VERSION "SWAD 22.107.37 (2023-05-10)" +#define Log_PLATFORM_VERSION "SWAD 22.107.38 (2023-05-10)" #define CSS_FILE "swad22.107.36.css" #define JS_FILE "swad22.49.js" /* + Version 22.107.38:May 10, 2023 Changes in edition of mail domains. (337455 lines) Version 22.107.37:May 10, 2023 Changes in edition of attendance events and agenda events. (337484 lines) Version 22.107.36:May 10, 2023 Changes in style of fieldset and legend. (337505 lines) Version 22.107.35:May 10, 2023 Changes in edition of course program. (337504 lines) diff --git a/swad_mail.c b/swad_mail.c index c2e68357..5cf0b9b5 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -251,12 +251,8 @@ static void Mai_EditMailDomainsInternal (void) /***** Get list of mail domains *****/ Mai_GetListMailDomainsAllowedForNotif (&Mails); - /***** Put a form to create a new mail *****/ - Mai_PutFormToCreateMailDomain (); - - /***** Forms to edit current mail domains *****/ - if (Mails.Num) - Mai_ListMailDomainsForEdition (&Mails); + /***** Forms to edit mail domains *****/ + Mai_ListMailDomainsForEdition (&Mails); /***** Free list of mail domains *****/ Mai_FreeListMailDomains (&Mails); @@ -449,66 +445,78 @@ static void Mai_ListMailDomainsForEdition (const struct Mai_Mails *Mails) unsigned NumMai; struct Mail *Mai; - /***** Begin box and table *****/ - Box_BoxTableBegin (NULL,Txt_Email_domains_allowed_for_notifications, - NULL,NULL, - Hlp_START_Domains_edit,Box_NOT_CLOSABLE,2); + /***** Begin box *****/ + Box_BoxBegin (NULL,Txt_Email_domains_allowed_for_notifications, + NULL,NULL, + Hlp_START_Domains_edit,Box_NOT_CLOSABLE); - /***** Write heading *****/ - Mai_PutHeadMailDomains (); + /***** Put a form to create a new mail *****/ + Mai_PutFormToCreateMailDomain (); - /***** Write all mail domains *****/ - for (NumMai = 0; - NumMai < Mails->Num; - NumMai++) + if (Mails->Num) { - Mai = &Mails->Lst[NumMai]; + /***** Begin table *****/ + HTM_TABLE_BeginWidePadding (2); - HTM_TR_Begin (NULL); + /***** Write heading *****/ + Mai_PutHeadMailDomains (); - /* Put icon to remove mail */ - HTM_TD_Begin ("class=\"BM\""); - Ico_PutContextualIconToRemove (ActRemMai,NULL, - Mai_PutParMaiCod,&Mai->MaiCod); - HTM_TD_End (); + /***** Write all mail domains *****/ + for (NumMai = 0; + NumMai < Mails->Num; + NumMai++) + { + Mai = &Mails->Lst[NumMai]; - /* Mail code */ - HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ()); - HTM_Long (Mai->MaiCod); - HTM_TD_End (); + HTM_TR_Begin (NULL); - /* Mail domain */ - HTM_TD_Begin ("class=\"CM\""); - Frm_BeginForm (ActRenMaiSho); - ParCod_PutPar (ParCod_Mai,Mai->MaiCod); - HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain, - HTM_SUBMIT_ON_CHANGE, - "size=\"15\" class=\"INPUT_%s\"", - The_GetSuffix ()); - Frm_EndForm (); - HTM_TD_End (); + /* Put icon to remove mail domain */ + HTM_TD_Begin ("class=\"BM\""); + Ico_PutContextualIconToRemove (ActRemMai,NULL, + Mai_PutParMaiCod,&Mai->MaiCod); + HTM_TD_End (); - /* Mail domain info */ - HTM_TD_Begin ("class=\"CM\""); - Frm_BeginForm (ActRenMaiFul); - ParCod_PutPar (ParCod_Mai,Mai->MaiCod); - HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai->Info, - HTM_SUBMIT_ON_CHANGE, - "size=\"40\" class=\"INPUT_%s\"", - The_GetSuffix ()); - Frm_EndForm (); - HTM_TD_End (); + /* Mail domain code */ + HTM_TD_Begin ("class=\"CODE DAT_%s\"",The_GetSuffix ()); + HTM_Long (Mai->MaiCod); + HTM_TD_End (); - /* Number of users */ - HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ()); - HTM_Unsigned (Mai->NumUsrs); - HTM_TD_End (); + /* Mail domain */ + HTM_TD_Begin ("class=\"CM\""); + Frm_BeginForm (ActRenMaiSho); + ParCod_PutPar (ParCod_Mai,Mai->MaiCod); + HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain, + HTM_SUBMIT_ON_CHANGE, + "size=\"15\" class=\"INPUT_%s\"", + The_GetSuffix ()); + Frm_EndForm (); + HTM_TD_End (); - HTM_TR_End (); + /* Mail domain info */ + HTM_TD_Begin ("class=\"CM\""); + Frm_BeginForm (ActRenMaiFul); + ParCod_PutPar (ParCod_Mai,Mai->MaiCod); + HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai->Info, + HTM_SUBMIT_ON_CHANGE, + "size=\"40\" class=\"INPUT_%s\"", + The_GetSuffix ()); + Frm_EndForm (); + HTM_TD_End (); + + /* Number of users */ + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ()); + HTM_Unsigned (Mai->NumUsrs); + HTM_TD_End (); + + HTM_TR_End (); + } + + /***** End table *****/ + HTM_TABLE_End (); } - /***** End table and box *****/ - Box_BoxTableEnd (); + /***** End box *****/ + Box_BoxEnd (); } /*****************************************************************************/ @@ -671,55 +679,67 @@ void Mai_ContEditAfterChgMai (void) static void Mai_PutFormToCreateMailDomain (void) { - extern const char *Hlp_START_Domains_edit; - extern const char *Txt_Email_domain; - extern const char *Txt_EMAIL_DOMAIN_ORDER[3]; - extern const char *Txt_Create_email_domain; + extern const char *Txt_Actions[ActLst_NUM_ACTIONS]; + extern const char *Txt_Create; - /***** Begin form *****/ - Frm_BeginForm (ActNewMai); + /***** Begin fieldset *****/ + HTM_FIELDSET_Begin (NULL); + HTM_LEGEND (Txt_Actions[ActNewMai]); - /***** Begin box and table *****/ - Box_BoxTableBegin (NULL,Txt_Email_domain, - NULL,NULL, - Hlp_START_Domains_edit,Box_NOT_CLOSABLE,2); + /***** Begin form *****/ + Frm_BeginForm (ActNewMai); - /***** Write heading *****/ - HTM_TR_Begin (NULL); - HTM_TH (Txt_EMAIL_DOMAIN_ORDER[Mai_ORDER_BY_DOMAIN],HTM_HEAD_LEFT); - HTM_TH (Txt_EMAIL_DOMAIN_ORDER[Mai_ORDER_BY_INFO] ,HTM_HEAD_LEFT); - HTM_TR_End (); + /***** Begin table *****/ + HTM_TABLE_BeginWidePadding (2); - /***** Second row *****/ - HTM_TR_Begin (NULL); + /***** Write heading *****/ + Mai_PutHeadMailDomains (); - /* Mail domain */ - HTM_TD_Begin ("class=\"CM\""); - HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai_EditingMai->Domain, - HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"15\" class=\"INPUT_%s\"" - " required=\"required\"", - The_GetSuffix ()); - HTM_TD_End (); + /***** Second row *****/ + HTM_TR_Begin (NULL); - /* Mail domain info */ - HTM_TD_Begin ("class=\"CM\""); - HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai_EditingMai->Info, - HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"40\" class=\"INPUT_%s\"" - " required=\"required\"", - The_GetSuffix ()); - HTM_TD_End (); + /* Column to remove mail domain, disabled here */ + HTM_TD_Begin ("class=\"BM\""); + HTM_TD_End (); - HTM_TD_Empty (1); + /* Mail domain code */ + HTM_TD_Begin ("class=\"CODE\""); + HTM_TD_End (); - HTM_TR_End (); + /* Mail domain */ + HTM_TD_Begin ("class=\"CM\""); + HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai_EditingMai->Domain, + HTM_DONT_SUBMIT_ON_CHANGE, + "size=\"15\" class=\"INPUT_%s\"" + " required=\"required\"", + The_GetSuffix ()); + HTM_TD_End (); - /***** End table, send button and end box *****/ - Box_BoxTableWithButtonEnd (Btn_CREATE_BUTTON,Txt_Create_email_domain); + /* Mail domain info */ + HTM_TD_Begin ("class=\"CM\""); + HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai_EditingMai->Info, + HTM_DONT_SUBMIT_ON_CHANGE, + "size=\"40\" class=\"INPUT_%s\"" + " required=\"required\"", + The_GetSuffix ()); + HTM_TD_End (); - /***** End form *****/ - Frm_EndForm (); + /* Number of users */ + HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ()); + HTM_Unsigned (0); + HTM_TD_End (); + + HTM_TR_End (); + + /***** End table and send button *****/ + HTM_TABLE_End (); + Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create); + + /***** End form *****/ + Frm_EndForm (); + + /***** End fieldset *****/ + HTM_FIELDSET_End (); } /*****************************************************************************/ diff --git a/swad_text.c b/swad_text.c index c47c0673..b0c54a52 100644 --- a/swad_text.c +++ b/swad_text.c @@ -6595,29 +6595,6 @@ const char *Txt_Create_account = "Hesabı oluştur"; #endif -const char *Txt_Create_email_domain = -#if L==1 // ca - "Crear domini de correu"; -#elif L==2 // de - "E-Mail-Domäne anlegen"; -#elif L==3 // en - "Create email domain"; -#elif L==4 // es - "Crear dominio de correo"; -#elif L==5 // fr - "Créer domaine de messagerie"; -#elif L==6 // gn - "Crear dominio de correo"; // Okoteve traducción -#elif L==7 // it - "Crea campo mail"; -#elif L==8 // pl - "Utwórz domeny mail"; -#elif L==9 // pt - "Criar domínio de email"; -#elif L==10 // tr - "Create email domain"; // Çeviri lazim! -#endif - const char *Txt_Create_email_message = #if L==1 // ca "Crear missatge de correu"; @@ -11646,29 +11623,6 @@ const char *Txt_Email_addresses = "Email addresses"; // Çeviri lazim! #endif -const char *Txt_Email_domain = -#if L==1 // ca - "Domini de correu"; -#elif L==2 // de - "E-Mail-Domäne"; -#elif L==3 // en - "Email domain"; -#elif L==4 // es - "Dominio de correo"; -#elif L==5 // fr - "Domaine de messagerie"; -#elif L==6 // gn - "Dominio correo"; -#elif L==7 // it - "Campo mail"; -#elif L==8 // pl - "Domeny poczty"; -#elif L==9 // pt - "Domínio de email"; -#elif L==10 // tr - "E-posta etki alanı"; -#endif - const char *Txt_Email_domain_X_removed = // Warning: it is very important to include %s in the following sentences #if L==1 // ca "Domini de correu %s eliminat."; diff --git a/swad_text_action.c b/swad_text_action.c index 04d477de..1bba6996 100644 --- a/swad_text_action.c +++ b/swad_text_action.c @@ -1580,23 +1580,23 @@ const char *Txt_Actions[ActLst_NUM_ACTIONS] = , [ActNewMai] = #if L==1 // ca - "Create email domain" // Necessita traducció + "Crear domini de correu" #elif L==2 // de - "Create email domain" // Need Übersetzung + "E-Mail-Domäne anlegen" #elif L==3 // en "Create email domain" #elif L==4 // es "Crear dominio de correo" #elif L==5 // fr - "Create email domain" // Besoin de traduction + "Créer domaine de messagerie" #elif L==6 // gn "Crear dominio de correo" // Okoteve traducción #elif L==7 // it - "Create email domain" // Bisogno di traduzione + "Crea campo mail" #elif L==8 // pl - "Create email domain" // Potrzebujesz tlumaczenie + "Utwórz domeny mail" #elif L==9 // pt - "Create email domain" // Precisa de tradução + "Criar domínio de email" #elif L==10 // tr "Create email domain" // Çeviri lazim! #endif