From 583f12b094507ffeed415d5f4d054eb97ad819cf Mon Sep 17 00:00:00 2001 From: acanas Date: Tue, 9 May 2023 18:42:01 +0200 Subject: [PATCH] Version 22.107.31:May 09, 2023 Changes in edition of record fields. --- swad_changelog.h | 3 +- swad_record.c | 116 ++++++++++++++++++++++++--------------------- swad_text.c | 46 ------------------ swad_text_action.c | 12 ++--- 4 files changed, 69 insertions(+), 108 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 67bd73dd..9f4f81fa 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.30 (2023-05-09)" +#define Log_PLATFORM_VERSION "SWAD 22.107.31 (2023-05-09)" #define CSS_FILE "swad22.107.17.css" #define JS_FILE "swad22.49.js" /* + Version 22.107.31:May 09, 2023 Changes in edition of record fields. (? lines) Version 22.107.30:May 09, 2023 Changes in edition of plugins. (337694 lines) Version 22.107.29:May 09, 2023 Changes in edition of places. (337713 lines) Version 22.107.28:May 09, 2023 Changes in edition of notices. (337707 lines) diff --git a/swad_record.c b/swad_record.c index 0cdd24fe..1fc1b1ae 100644 --- a/swad_record.c +++ b/swad_record.c @@ -352,76 +352,82 @@ static void Rec_ListFieldsRecordsForEdition (void) void Rec_ShowFormCreateRecordField (void) { extern const char *Hlp_USERS_Students_course_record_card; - extern const char *Txt_Record_field; + extern const char *Txt_Actions[ActLst_NUM_ACTIONS]; extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY]; - extern const char *Txt_Create_record_field; + extern const char *Txt_Create; Rec_VisibilityRecordFields_t Vis; unsigned VisUnsigned; char StrNumLines[Cns_MAX_DECIMAL_DIGITS_UINT + 1]; - /***** Begin form *****/ - Frm_BeginForm (ActNewFie); + /***** Begin fieldset *****/ + HTM_FIELDSET_Begin (NULL); + HTM_LEGEND (Txt_Actions[ActNewFie]); - /***** Begin box and table *****/ - Box_BoxTableBegin (NULL,Txt_Record_field, - NULL,NULL, - Hlp_USERS_Students_course_record_card,Box_NOT_CLOSABLE,2); + /***** Begin form *****/ + Frm_BeginForm (ActNewFie); - /***** Write heading *****/ - Rec_WriteHeadingRecordFields (); + /***** Begin table *****/ + HTM_TABLE_BeginWidePadding (2); - HTM_TR_Begin (NULL); + /***** Write heading *****/ + Rec_WriteHeadingRecordFields (); - /***** Write disabled icon to remove the field *****/ - HTM_TD_Begin ("class=\"BM\""); - Ico_PutIconRemovalNotAllowed (); - HTM_TD_End (); + HTM_TR_Begin (NULL); - /***** Field name *****/ - HTM_TD_Begin ("class=\"LM\""); - HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.Field.Name, - HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"REC_FIELDNAME INPUT_%s\"" - " required=\"required\"", - The_GetSuffix ()); - HTM_TD_End (); + /***** Write disabled icon to remove the field *****/ + HTM_TD_Begin ("class=\"BM\""); + Ico_PutIconRemovalNotAllowed (); + HTM_TD_End (); - /***** Number of lines in form ******/ - HTM_TD_Begin ("class=\"CM\""); - snprintf (StrNumLines,sizeof (StrNumLines),"%u", - Gbl.Crs.Records.Field.NumLines); - HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines, - HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"2\" class=\"INPUT_%s\"" - " required=\"required\"", - The_GetSuffix ()); - HTM_TD_End (); + /***** Field name *****/ + HTM_TD_Begin ("class=\"LM\""); + HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.Field.Name, + HTM_DONT_SUBMIT_ON_CHANGE, + "class=\"REC_FIELDNAME INPUT_%s\"" + " required=\"required\"", + The_GetSuffix ()); + HTM_TD_End (); - /***** Visibility to students *****/ - HTM_TD_Begin ("class=\"CM\""); - HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL, - "name=\"Visibility\" class=\"INPUT_%s\"", - The_GetSuffix ()); - for (Vis = (Rec_VisibilityRecordFields_t) 0; - Vis <= (Rec_VisibilityRecordFields_t) (Rec_NUM_TYPES_VISIBILITY - 1); - Vis++) - { - VisUnsigned = (unsigned) Vis; - HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned, - Vis == Gbl.Crs.Records.Field.Visibility, // Selected? - HTM_OPTION_ENABLED, - "%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]); - } - HTM_SELECT_End (); - HTM_TD_End (); + /***** Number of lines in form ******/ + HTM_TD_Begin ("class=\"CM\""); + snprintf (StrNumLines,sizeof (StrNumLines),"%u", + Gbl.Crs.Records.Field.NumLines); + HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines, + HTM_DONT_SUBMIT_ON_CHANGE, + "size=\"2\" class=\"INPUT_%s\"" + " required=\"required\"", + The_GetSuffix ()); + HTM_TD_End (); - HTM_TR_End (); + /***** Visibility to students *****/ + HTM_TD_Begin ("class=\"CM\""); + HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL, + "name=\"Visibility\" class=\"INPUT_%s\"", + The_GetSuffix ()); + for (Vis = (Rec_VisibilityRecordFields_t) 0; + Vis <= (Rec_VisibilityRecordFields_t) (Rec_NUM_TYPES_VISIBILITY - 1); + Vis++) + { + VisUnsigned = (unsigned) Vis; + HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned, + Vis == Gbl.Crs.Records.Field.Visibility, // Selected? + HTM_OPTION_ENABLED, + "%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]); + } + HTM_SELECT_End (); + HTM_TD_End (); - /***** End table, send button and end box *****/ - Box_BoxTableWithButtonEnd (Btn_CREATE_BUTTON,Txt_Create_record_field); + HTM_TR_End (); - /***** End form *****/ - Frm_EndForm (); + /***** 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 df8d39c1..5644de9b 100644 --- a/swad_text.c +++ b/swad_text.c @@ -6848,29 +6848,6 @@ const char *Txt_Create_question = "Create question"; // Çeviri lazim! #endif -const char *Txt_Create_record_field = -#if L==1 // ca - "Crear camp de fitxa"; -#elif L==2 // de - "Datenfeld erstellen"; -#elif L==3 // en - "Create record field"; -#elif L==4 // es - "Crear campo de ficha"; -#elif L==5 // fr - "Créer champ de carte"; -#elif L==6 // gn - "Crear campo de ficha"; // Okoteve traducción -#elif L==7 // it - "Crea campo di scheda"; -#elif L==8 // pl - "Utwórz rekord pola"; -#elif L==9 // pt - "Criar campo de cartão"; -#elif L==10 // tr - "Create record field"; // Çeviri lazim! -#endif - const char *Txt_Create_room = #if L==1 // ca "Crear sala"; @@ -33081,29 +33058,6 @@ const char *Txt_record_cards_per_page = "record cards per page"; // Çeviri lazim! #endif -const char *Txt_Record_field = -#if L==1 // ca - "Camp de fitxa"; -#elif L==2 // de - "Datenfeld"; -#elif L==3 // en - "Record field"; -#elif L==4 // es - "Campo de ficha"; -#elif L==5 // fr - "Champ de carte"; -#elif L==6 // gn - "Campo de ficha"; // Okoteve traducción -#elif L==7 // it - "Campo di scheda"; -#elif L==8 // pl - "Rekord pola"; -#elif L==9 // pt - "Campo de cartão"; -#elif L==10 // tr - "Kayıt alanı"; -#endif - const char *Txt_Record_field_X_removed = // Warning: it is very important to include %s in the following sentences #if L==1 // ca "Camp de fitxa %s eliminat."; diff --git a/swad_text_action.c b/swad_text_action.c index 9d3756da..dadeb6ee 100644 --- a/swad_text_action.c +++ b/swad_text_action.c @@ -25640,23 +25640,23 @@ const char *Txt_Actions[ActLst_NUM_ACTIONS] = , [ActNewFie] = #if L==1 // ca - "Create record field" // Necessita traducció + "Crear camp de fitxa" #elif L==2 // de - "Create record field" // Need Übersetzung + "Datenfeld erstellen" #elif L==3 // en "Create record field" #elif L==4 // es "Crear campo de ficha" #elif L==5 // fr - "Create record field" // Besoin de traduction + "Créer champ de carte" #elif L==6 // gn "Crear campo de ficha" // Okoteve traducción #elif L==7 // it - "Create record field" // Bisogno di traduzione + "Crea campo di scheda" #elif L==8 // pl - "Create record field" // Potrzebujesz tlumaczenie + "Utwórz rekord pola" #elif L==9 // pt - "Create record field" // Precisa de tradução + "Criar campo de cartão" #elif L==10 // tr "Create record field" // Çeviri lazim! #endif