diff --git a/swad_HTML.c b/swad_HTML.c index 06f82f98..3cf9c61d 100644 --- a/swad_HTML.c +++ b/swad_HTML.c @@ -1238,11 +1238,11 @@ void HTM_INPUT_FILE (const char *Name,const char *Accept, void HTM_INPUT_BUTTON (const char *Name,const char *Value,const char *Attr) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; - HTM_TxtF ("", + HTM_TxtF ("", Name,Value, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Attr); } diff --git a/swad_ID.c b/swad_ID.c index dd44d0db..ddde7497 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -503,7 +503,6 @@ static void ID_ShowFormChangeUsrID (bool ItsMe,bool IShouldFillInID) { extern const char *Hlp_PROFILE_Account; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Please_fill_in_your_ID; extern const char *Txt_ID_X_confirmed; extern const char *Txt_ID_X_not_confirmed; @@ -634,8 +633,8 @@ static void ID_ShowFormChangeUsrID (bool ItsMe,bool IShouldFillInID) UsrDat->IDs.Num ? UsrDat->IDs.List[UsrDat->IDs.Num - 1].ID : "", // Show the most recent ID HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"NewID\" class=\"%s\" size=\"18\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"NewID\" class=\"INPUT_%s\" size=\"18\"", + The_Colors[Gbl.Prefs.Theme]); HTM_BR (); Btn_PutCreateButtonInline (Txt_Add_this_ID); Frm_EndForm (); diff --git a/swad_MAC.c b/swad_MAC.c index 5da003de..844677da 100644 --- a/swad_MAC.c +++ b/swad_MAC.c @@ -80,15 +80,15 @@ static void MAC_PutParams (void *Args) static void MAC_PutFormToEditMACAddress (Act_Action_t NextAction,const char *Anchor, void (*FuncParams) (void *Args),void *Args) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; /***** Form to enter a new MAC address *****/ Frm_BeginFormAnchor (NextAction,Anchor); FuncParams (Args); HTM_INPUT_TEXT ("NewMAC",MAC_LENGTH_MAC_ADDRESS,((struct MAC_Params *) Args)->MACstr, HTM_SUBMIT_ON_CHANGE, - "size=\"8\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"8\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } diff --git a/swad_account.c b/swad_account.c index d9a85cde..787b7fd0 100644 --- a/swad_account.c +++ b/swad_account.c @@ -147,7 +147,7 @@ static void Acc_ShowFormCheckIfIHaveAccount (const char *Title) { extern const char *Hlp_PROFILE_SignUp; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_If_you_think_you_may_have_been_registered_; extern const char *Txt_ID; extern const char *Txt_Check; @@ -167,8 +167,8 @@ static void Acc_ShowFormCheckIfIHaveAccount (const char *Title) HTM_TxtColonNBSP (Txt_ID); HTM_INPUT_TEXT ("ID",ID_MAX_CHARS_USR_ID,"", HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"18\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"18\" class=\"INPUT_%s\" required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_LABEL_End (); Btn_PutCreateButtonInline (Txt_Check); Frm_EndForm (); @@ -366,7 +366,7 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char NewNickWithoutAr { extern const char *Hlp_PROFILE_SignUp; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Create_account; extern const char *Txt_Nickname; extern const char *Txt_HELP_nickname; @@ -399,9 +399,9 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char NewNickWithoutAr HTM_INPUT_TEXT ("NewNick",1 + Nck_MAX_CHARS_NICK_WITHOUT_ARROBA, NewNickWithArr,HTM_DONT_SUBMIT_ON_CHANGE, "id=\"NewNick\" size=\"18\" placeholder=\"%s\"" - " class=\"%s\" required=\"required\"", + " class=\"INPUT_%s\" required=\"required\"", Txt_HELP_nickname, - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /* End table row */ @@ -418,9 +418,9 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char NewNickWithoutAr HTM_TD_Begin ("class=\"LT\""); HTM_INPUT_EMAIL ("NewEmail",Cns_MAX_CHARS_EMAIL_ADDRESS,NewEmail, "id=\"NewEmail\" size=\"18\" placeholder=\"%s\"" - " class=\"%s\" required=\"required\"", + " class=\"INPUT_%s\" required=\"required\"", Txt_HELP_email, - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /* End table row */ diff --git a/swad_agenda.c b/swad_agenda.c index 45c1d774..4079bd65 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -1402,7 +1402,7 @@ void Agd_RequestCreatOrEditEvent (void) { extern const char *Hlp_PROFILE_Agenda_new_event; extern const char *Hlp_PROFILE_Agenda_edit_event; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_event; extern const char *Txt_Edit_event; extern const char *Txt_Location; @@ -1484,9 +1484,9 @@ void Agd_RequestCreatOrEditEvent (void) HTM_TD_Begin ("class=\"LT\""); HTM_INPUT_TEXT ("Event",Agd_MAX_CHARS_EVENT,AgdEvent.Event, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Event\" class=\"TITLE_DESCRIPTION_WIDTH %s\"" + "id=\"Event\" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /* End table row */ @@ -1503,9 +1503,9 @@ void Agd_RequestCreatOrEditEvent (void) HTM_TD_Begin ("class=\"LT\""); HTM_INPUT_TEXT ("Location",Agd_MAX_CHARS_LOCATION,AgdEvent.Location, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Location\" class=\"TITLE_DESCRIPTION_WIDTH %s\"" + "id=\"Location\" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /* End table row */ @@ -1526,8 +1526,8 @@ void Agd_RequestCreatOrEditEvent (void) /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" rows=\"5\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); if (!ItsANewEvent) HTM_Txt (Txt); HTM_TEXTAREA_End (); diff --git a/swad_announcement.c b/swad_announcement.c index ec4beda4..5f89687a 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -394,7 +394,7 @@ static void Ann_PutSubjectMessage (const char *Field,const char *Label, unsigned Rows) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; /***** Subject or content *****/ HTM_TR_Begin (NULL); @@ -405,9 +405,9 @@ static void Ann_PutSubjectMessage (const char *Field,const char *Label, /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"%s\" name=\"%s\" cols=\"75\" rows=\"%u\"" - " class=\"%s\"", + " class=\"INPUT_%s\"", Field,Field,Rows, - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TEXTAREA_End (); HTM_TD_End (); diff --git a/swad_assignment.c b/swad_assignment.c index df511c7e..546d1b7a 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -1081,7 +1081,6 @@ void Asg_RequestCreatOrEditAsg (void) extern const char *Hlp_ASSESSMENT_Assignments_new_assignment; extern const char *Hlp_ASSESSMENT_Assignments_edit_assignment; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_assignment; extern const char *Txt_Edit_assignment; extern const char *Txt_Title; @@ -1175,9 +1174,9 @@ void Asg_RequestCreatOrEditAsg (void) HTM_INPUT_TEXT ("Title",Asg_MAX_CHARS_ASSIGNMENT_TITLE,Asg.Title, HTM_DONT_SUBMIT_ON_CHANGE, "id=\"Title\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"" + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -1200,8 +1199,8 @@ void Asg_RequestCreatOrEditAsg (void) HTM_TxtColon (Txt_Folder); HTM_INPUT_TEXT ("Folder",Brw_MAX_CHARS_FOLDER,Asg.Folder, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Folder\" size=\"30\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Folder\" size=\"30\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_LABEL_End (); HTM_TD_End (); @@ -1216,8 +1215,8 @@ void Asg_RequestCreatOrEditAsg (void) /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" rows=\"10\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); if (!ItsANewAssignment) HTM_Txt (Txt); HTM_TEXTAREA_End (); diff --git a/swad_attendance.c b/swad_attendance.c index ac937b1c..5cff3a31 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -972,7 +972,7 @@ void Att_RequestCreatOrEditAttEvent (void) { extern const char *Hlp_USERS_Attendance_new_event; extern const char *Hlp_USERS_Attendance_edit_event; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_event; extern const char *Txt_Edit_event; extern const char *Txt_Teachers_comment; @@ -1063,9 +1063,9 @@ void Att_RequestCreatOrEditAttEvent (void) HTM_TD_Begin ("class=\"LT\""); HTM_INPUT_TEXT ("Title",Att_MAX_CHARS_ATTENDANCE_EVENT_TITLE,Event.Title, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Title\" class=\"TITLE_DESCRIPTION_WIDTH %s\"" + "id=\"Title\" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -1085,8 +1085,8 @@ void Att_RequestCreatOrEditAttEvent (void) HTM_TD_Begin ("class=\"LT\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"ComTchVisible\" name=\"ComTchVisible\"" - " class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"N",!Event.CommentTchVisible,false, "%s",Txt_Hidden_MALE_PLURAL); HTM_OPTION (HTM_Type_STRING,"Y",Event.CommentTchVisible,false, @@ -1105,8 +1105,8 @@ void Att_RequestCreatOrEditAttEvent (void) /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" rows=\"5\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); if (!ItsANewAttEvent) HTM_Txt (Description); HTM_TEXTAREA_End (); @@ -1694,7 +1694,6 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, struct UsrData *UsrDat, struct Att_Event *Event) { - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; static const char *ClassPhoto[PhoSha_NUM_SHAPES] = { @@ -1810,9 +1809,9 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, if (ICanEditStdComment) // Show with form { HTM_TEXTAREA_Begin ("name=\"CommentStd%s\" cols=\"40\" rows=\"3\"" - " class=\"%s\"", + " class=\"INPUT_%s\"", UsrDat->EnUsrCod, - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (CommentStd); HTM_TEXTAREA_End (); } @@ -1833,9 +1832,9 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr, if (ICanEditTchComment) // Show with form { HTM_TEXTAREA_Begin ("name=\"CommentTch%s\" cols=\"40\" rows=\"3\"" - " class=\"%s\"", + " class=\"INPUT_%s\"", UsrDat->EnUsrCod, - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (CommentTch); HTM_TEXTAREA_End (); } diff --git a/swad_banner.c b/swad_banner.c index 69aee949..581f0fe5 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -403,7 +403,6 @@ void Ban_PutIconToViewBanners (void) static void Ban_ListBannersForEdition (struct Ban_Banners *Banners) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; unsigned NumBan; struct Ban_Banner *Ban; char *Anchor = NULL; @@ -463,8 +462,8 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners) Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit); HTM_INPUT_TEXT ("ShortName",Ban_MAX_CHARS_SHRT_NAME,Ban->ShrtName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -474,8 +473,8 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners) Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit); HTM_INPUT_TEXT ("FullName",Ban_MAX_CHARS_FULL_NAME,Ban->FullName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_FULL_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -485,8 +484,8 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners) Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit); HTM_INPUT_TEXT ("Img",Ban_MAX_CHARS_IMAGE,Ban->Img, HTM_SUBMIT_ON_CHANGE, - "size=\"12\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"12\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -495,9 +494,9 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners) Frm_BeginForm (ActChgBanWWW); Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit); HTM_INPUT_URL ("WWW",Ban->WWW,HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -854,7 +853,7 @@ void Ban_ContEditAfterChgBan (void) static void Ban_PutFormToCreateBanner (const struct Ban_Banner *Ban) { extern const char *Hlp_SYSTEM_Banners_edit; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_banner; extern const char *Txt_Create_banner; @@ -886,35 +885,35 @@ static void Ban_PutFormToCreateBanner (const struct Ban_Banner *Ban) HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("ShortName",Ban_MAX_CHARS_SHRT_NAME,Ban->ShrtName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"" + "class=\"INPUT_SHORT_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /* Banner full name */ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("FullName",Ban_MAX_CHARS_FULL_NAME,Ban->FullName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"" + "class=\"INPUT_FULL_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /* Banner image */ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("Img",Ban_MAX_CHARS_IMAGE,Ban->Img, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"12\" class=\"%s\"" + "size=\"12\" class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /* Banner WWW */ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_URL ("WWW",Ban->WWW,HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /* End table row */ diff --git a/swad_browser.c b/swad_browser.c index b38a91ca..ed342121 100644 --- a/swad_browser.c +++ b/swad_browser.c @@ -6871,7 +6871,7 @@ void Brw_ShowFormFileBrowser (void) static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1]) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Create_folder; extern const char *Txt_You_can_create_a_new_folder_inside_the_folder_X; extern const char *Txt_Folder; @@ -6894,9 +6894,9 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1]) HTM_TxtColonNBSP (Txt_Folder); HTM_INPUT_TEXT ("NewFolderName",Brw_MAX_CHARS_FOLDER,"", HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"30\" class=\"%s\"" + "size=\"30\" class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_LABEL_End (); /***** Send button and end box *****/ @@ -7046,7 +7046,7 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow) static void Brw_PutFormToCreateALink (const char *FileNameToShow) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Create_link; extern const char *Txt_or_you_can_create_a_new_link_inside_the_folder_X; extern const char *Txt_URL; @@ -7078,9 +7078,9 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_INPUT_URL ("NewLinkURL","",HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"30\" class=\"%s\"" + "size=\"30\" class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -7098,8 +7098,9 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("NewLinkName",Brw_MAX_CHARS_FOLDER,"", HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"NewLinkName\" size=\"30\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"NewLinkName\" size=\"30\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -10214,7 +10215,7 @@ static void Brw_PutLinkToAskRemOldFiles (void) void Brw_AskRemoveOldFiles (void) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Remove_old_files; extern const char *Txt_Remove_files_older_than_PART_1_OF_2; extern const char *Txt_Remove_files_older_than_PART_2_OF_2; @@ -10237,8 +10238,8 @@ void Brw_AskRemoveOldFiles (void) HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtF ("%s ",Txt_Remove_files_older_than_PART_1_OF_2); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"Months\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"Months\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Months = Brw_MIN_MONTHS_TO_REMOVE_OLD_FILES; Months <= Brw_MAX_MONTHS_IN_BRIEFCASE; Months++) diff --git a/swad_building.c b/swad_building.c index 230c8ebe..752cdfac 100644 --- a/swad_building.c +++ b/swad_building.c @@ -409,7 +409,6 @@ void Bld_FreeListBuildings (struct Bld_Buildings *Buildings) static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; unsigned NumBld; struct Bld_Building *Building; char *Anchor = NULL; @@ -451,8 +450,8 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings) Bld_PutParamBldCod (&Building->BldCod); HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Building->ShrtName, HTM_SUBMIT_ON_CHANGE, - "size=\"10\" class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -462,8 +461,8 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings) Bld_PutParamBldCod (&Building->BldCod); HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Building->FullName, HTM_SUBMIT_ON_CHANGE, - "size=\"20\" class=\"INPUT_FULL_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -473,8 +472,8 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings) Bld_PutParamBldCod (&Building->BldCod); HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Building->Location, HTM_SUBMIT_ON_CHANGE, - "size=\"15\" class=\"INPUT_FULL_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"15\" class=\"INPUT_FULL_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -704,7 +703,7 @@ void Bld_ContEditAfterChgBuilding (void) static void Bld_PutFormToCreateBuilding (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_building; extern const char *Txt_Create_building; @@ -733,26 +732,26 @@ static void Bld_PutFormToCreateBuilding (void) HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Bld_EditingBuilding->ShrtName, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"10\" class=\"INPUT_SHORT_NAME %s\"" + "size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Building full name *****/ HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Bld_EditingBuilding->FullName, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"20\" class=\"INPUT_FULL_NAME %s\"" + "size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Building location *****/ HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Bld_EditingBuilding->Location, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"15\" class=\"INPUT_FULL_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"15\" class=\"INPUT_FULL_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_call_for_exam.c b/swad_call_for_exam.c index 36f0c979..bd98d6e7 100644 --- a/swad_call_for_exam.c +++ b/swad_call_for_exam.c @@ -887,7 +887,6 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, extern const char *Hlp_ASSESSMENT_Calls_for_exam_new_call; extern const char *Hlp_ASSESSMENT_Announcements_edit_announcement; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE]; extern const char *Txt_CALL_FOR_EXAM; extern const char *Txt_CALL_FOR_EXAM_Course; @@ -1049,8 +1048,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, if (TypeViewCallForExam == Cfe_FORM_VIEW) HTM_INPUT_TEXT ("CrsName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,CallsForExams->CallForExam.CrsFullName, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"CrsName\" size=\"30\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"CrsName\" size=\"30\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); else { HTM_STRONG_Begin (); @@ -1076,8 +1075,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, if (TypeViewCallForExam == Cfe_FORM_VIEW) { HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Year\" name=\"Year\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Year\" name=\"Year\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Year = 0; Year <= Deg_MAX_YEARS_PER_DEGREE; Year++) @@ -1107,8 +1106,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, if (TypeViewCallForExam == Cfe_FORM_VIEW) HTM_INPUT_TEXT ("ExamSession",Cfe_MAX_CHARS_SESSION,CallsForExams->CallForExam.Session, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"ExamSession\" size=\"30\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"ExamSession\" size=\"30\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); else HTM_Txt (CallsForExams->CallForExam.Session); HTM_TD_End (); @@ -1162,8 +1161,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, { HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"ExamHour\" name=\"ExamHour\"" - " class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"0", CallsForExams->CallForExam.StartTime.Hour == 0,false, "-"); @@ -1176,8 +1175,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, HTM_SELECT_End (); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"ExamMinute\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"ExamMinute\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Minute = 0; Minute <= 59; Minute++) @@ -1209,8 +1208,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, { HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"DurationHour\" name=\"DurationHour\"" - " class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Hour = 0; Hour <= 8; Hour++) @@ -1220,8 +1219,9 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, HTM_SELECT_End (); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"DurationMinute\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"DurationMinute\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Minute = 0; Minute <= 59; Minute++) @@ -1270,8 +1270,9 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, if (TypeViewCallForExam == Cfe_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"Place\" name=\"Place\"" - " cols=\"30\" rows=\"4\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " cols=\"30\" rows=\"4\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (CallsForExams->CallForExam.Place); HTM_TEXTAREA_End (); } @@ -1301,8 +1302,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, if (TypeViewCallForExam == Cfe_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"ExamMode\" name=\"ExamMode\"" - " cols=\"30\" rows=\"2\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " cols=\"30\" rows=\"2\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (CallsForExams->CallForExam.Mode); HTM_TEXTAREA_End (); } @@ -1332,8 +1333,9 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, if (TypeViewCallForExam == Cfe_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"Structure\" name=\"Structure\"" - " cols=\"30\" rows=\"8\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " cols=\"30\" rows=\"8\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (CallsForExams->CallForExam.Structure); HTM_TEXTAREA_End (); } @@ -1363,8 +1365,9 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, if (TypeViewCallForExam == Cfe_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"DocRequired\" name=\"DocRequired\"" - " cols=\"30\" rows=\"2\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " cols=\"30\" rows=\"2\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (CallsForExams->CallForExam.DocRequired); HTM_TEXTAREA_End (); } @@ -1394,8 +1397,9 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, if (TypeViewCallForExam == Cfe_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"MatRequired\" name=\"MatRequired\"" - " cols=\"30\" rows=\"4\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " cols=\"30\" rows=\"4\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (CallsForExams->CallForExam.MatRequired); HTM_TEXTAREA_End (); } @@ -1425,8 +1429,9 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, if (TypeViewCallForExam == Cfe_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"MatAllowed\" name=\"MatAllowed\"" - " cols=\"30\" rows=\"4\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " cols=\"30\" rows=\"4\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (CallsForExams->CallForExam.MatAllowed); HTM_TEXTAREA_End (); } @@ -1456,8 +1461,9 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams, if (TypeViewCallForExam == Cfe_FORM_VIEW) { HTM_TEXTAREA_Begin ("id=\"OtherInfo\" name=\"OtherInfo\"" - " cols=\"30\" rows=\"5\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " cols=\"30\" rows=\"5\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (CallsForExams->CallForExam.OtherInfo); HTM_TEXTAREA_End (); } diff --git a/swad_center.c b/swad_center.c index dc49e515..a6e8e313 100644 --- a/swad_center.c +++ b/swad_center.c @@ -692,7 +692,7 @@ void Ctr_FreeListCenters (void) void Ctr_WriteSelectorOfCenter (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Center; MYSQL_RES *mysql_res; MYSQL_ROW row; @@ -706,13 +706,13 @@ void Ctr_WriteSelectorOfCenter (void) /***** Begin selector *****/ if (Gbl.Hierarchy.Ins.InsCod > 0) HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "id=\"ctr\" name=\"ctr\" class=\"HIE_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"ctr\" name=\"ctr\" class=\"HIE_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"ctr\" name=\"ctr\" class=\"HIE_SEL %s\"" + "id=\"ctr\" name=\"ctr\" class=\"HIE_SEL INPUT_%s\"" " disabled=\"disabled\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"", Gbl.Hierarchy.Ctr.CtrCod < 0,true, "[%s]",Txt_Center); @@ -757,7 +757,6 @@ void Ctr_WriteSelectorOfCenter (void) static void Ctr_ListCentersForEdition (const struct Plc_Places *Places) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Another_place; extern const char *Txt_CENTER_STATUS[Hie_NUM_STATUS_TXT]; unsigned NumCtr; @@ -825,8 +824,9 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places) Frm_BeginForm (ActChgCtrPlc); Hie_PutParamOtherHieCod (&Ctr->CtrCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "name=\"PlcCod\" class=\"PLC_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"PlcCod\"" + " class=\"PLC_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"0", Ctr->PlcCod == 0,false, "%s",Txt_Another_place); @@ -855,8 +855,8 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places) Hie_PutParamOtherHieCod (&Ctr->CtrCod); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ctr->ShrtName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -871,8 +871,8 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places) Hie_PutParamOtherHieCod (&Ctr->CtrCod); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ctr->FullName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_FULL_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -886,9 +886,9 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places) Frm_BeginForm (ActChgCtrWWW); Hie_PutParamOtherHieCod (&Ctr->CtrCod); HTM_INPUT_URL ("WWW",Ctr->WWW,HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -1305,7 +1305,6 @@ static void Ctr_PutParamGoToCtr (void *CtrCod) static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_center; extern const char *Txt_Another_place; extern const char *Txt_Create_center; @@ -1345,8 +1344,8 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places) /***** Place *****/ HTM_TD_Begin ("class=\"LM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"PlcCod\" class=\"PLC_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"0", Ctr_EditingCtr->PlcCod == 0,false, "%s",Txt_Another_place); @@ -1363,23 +1362,26 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places) HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ctr_EditingCtr->ShrtName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_SHORT_NAME INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Center full name *****/ HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ctr_EditingCtr->FullName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_FULL_NAME INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Center WWW *****/ HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_URL ("WWW",Ctr_EditingCtr->WWW,HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_WWW_NARROW INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Number of users who claim to belong to this center *****/ diff --git a/swad_center_config.c b/swad_center_config.c index f0c234c1..cfe4c7f1 100644 --- a/swad_center_config.c +++ b/swad_center_config.c @@ -353,7 +353,7 @@ static void CtrCfg_Map (void) static void CtrCfg_Latitude (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Latitude; /***** Latitude *****/ @@ -370,8 +370,9 @@ static void CtrCfg_Latitude (void) 90.0, // North Pole 0.0, // step="any" Gbl.Hierarchy.Ctr.Coord.Latitude,false, - "class=\"INPUT_COORD %s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_COORD INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -380,7 +381,7 @@ static void CtrCfg_Latitude (void) static void CtrCfg_Longitude (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Longitude; /***** Longitude *****/ @@ -397,8 +398,9 @@ static void CtrCfg_Longitude (void) 180.0, // East 0.0, // step="any" Gbl.Hierarchy.Ctr.Coord.Longitude,false, - "class=\"INPUT_COORD %s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_COORD INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -407,7 +409,7 @@ static void CtrCfg_Longitude (void) static void CtrCfg_Altitude (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Altitude; /***** Altitude *****/ @@ -424,8 +426,9 @@ static void CtrCfg_Altitude (void) 8848.0, // Mount Everest 0.0, // step="any" Gbl.Hierarchy.Ctr.Coord.Altitude,false, - "class=\"INPUT_COORD %s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_COORD INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -552,7 +555,6 @@ static void CtrCfg_FreePhotoAttr (char **PhotoAttribution) static void CtrCfg_Institution (bool PrintView,bool PutForm) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Institution; unsigned NumIns; @@ -575,8 +577,8 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm) Frm_BeginForm (ActChgCtrInsCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthInsCod\" name=\"OthInsCod\"" - " class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (NumIns = 0; NumIns < Gbl.Hierarchy.Inss.Num; NumIns++) @@ -644,7 +646,6 @@ static void CtrCfg_ShrtName (bool PutForm) static void CtrCfg_Place (bool PutForm) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Place; extern const char *Txt_Another_place; struct Plc_Places Places; @@ -677,8 +678,9 @@ static void CtrCfg_Place (bool PutForm) /* Put form to select place */ Frm_BeginForm (ActChgCtrPlcCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "name=\"PlcCod\" class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"PlcCod\"" + " class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"0", Gbl.Hierarchy.Ctr.PlcCod == 0,false, "%s",Txt_Another_place); diff --git a/swad_changelog.h b/swad_changelog.h index 2243e428..248115b8 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate TODO: Attach pdf files in multimedia. */ -#define Log_PLATFORM_VERSION "SWAD 21.86.8 (2022-03-29)" +#define Log_PLATFORM_VERSION "SWAD 21.87 (2022-03-30)" #define CSS_FILE "swad21.86.7.css" #define JS_FILE "swad21.78.2.js" /* + Version 21.87: Mar 30, 2022 Working on design of dark theme. (323833 lines) Version 21.86.8: Mar 29, 2022 Working on design of dark theme. (323834 lines) Version 21.86.7: Mar 28, 2022 Working on design of dark theme. (323823 lines) Version 21.86.6: Mar 26, 2022 Working on design of dark theme. (323751 lines) diff --git a/swad_country.c b/swad_country.c index f5a64aad..3c7755c9 100644 --- a/swad_country.c +++ b/swad_country.c @@ -870,7 +870,7 @@ void Cty_GetFullListOfCountries (void) void Cty_WriteSelectorOfCountry (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Country; unsigned NumCty; @@ -882,8 +882,8 @@ void Cty_WriteSelectorOfCountry (void) /***** Begin selector of country *****/ HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "id=\"cty\" name=\"cty\" class=\"HIE_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"cty\" name=\"cty\" class=\"HIE_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); /***** Initial disabled option *****/ HTM_OPTION (HTM_Type_STRING,"",Gbl.Hierarchy.Cty.CtyCod < 0,true, @@ -1058,7 +1058,6 @@ void Cty_FreeListCountries (void) static void Cty_ListCountriesForEdition (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_STR_LANG_NAME[1 + Lan_NUM_LANGUAGES]; unsigned NumCty; struct Cty_Countr *Cty; @@ -1147,8 +1146,8 @@ static void Cty_ListCountriesForEdition (void) Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan); HTM_INPUT_TEXT ("Name",Cty_MAX_CHARS_NAME,Cty->Name[Lan], HTM_SUBMIT_ON_CHANGE, - "size=\"15\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"15\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -1158,9 +1157,9 @@ static void Cty_ListCountriesForEdition (void) Cty_PutParamOtherCtyCod (&Cty->CtyCod); Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan); HTM_INPUT_URL ("WWW",Cty->WWW[Lan],HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -1444,7 +1443,6 @@ static void Cty_PutFormToCreateCountry (void) { extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES]; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_country; extern const char *Txt_STR_LANG_NAME[1 + Lan_NUM_LANGUAGES]; extern const char *Txt_Create_country; @@ -1476,15 +1474,17 @@ static void Cty_PutFormToCreateCountry (void) else StrCtyCod[0] = '\0'; HTM_INPUT_TEXT ("OthCtyCod",3,StrCtyCod,HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"3\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"3\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Alphabetic country code with 2 letters (ISO 3166-1) *****/ HTM_TD_Begin ("rowspan=\"%u\" class=\"RT\"",1 + Lan_NUM_LANGUAGES); HTM_INPUT_TEXT ("Alpha2",2,Cty_EditingCty->Alpha2,HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"2\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"2\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TD_Empty (3); @@ -1520,18 +1520,18 @@ static void Cty_PutFormToCreateCountry (void) snprintf (StrName,sizeof (StrName),"Name_%s",Lan_STR_LANG_ID[Lan]); HTM_INPUT_TEXT (StrName,Cty_MAX_CHARS_NAME,Cty_EditingCty->Name[Lan], HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"15\" class=\"%s\"" + "size=\"15\" class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /* WWW */ HTM_TD_Begin ("class=\"LM\""); snprintf (StrName,sizeof (StrName),"WWW_%s",Lan_STR_LANG_ID[Lan]); HTM_INPUT_URL (StrName,Cty_EditingCty->WWW[Lan],HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_course.c b/swad_course.c index 02278ea8..de829859 100644 --- a/swad_course.c +++ b/swad_course.c @@ -614,7 +614,7 @@ unsigned Crs_GetCachedNumCrssWithUsrs (Rol_Role_t Role) void Crs_WriteSelectorOfCourse (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Course; MYSQL_RES *mysql_res; MYSQL_ROW row; @@ -628,13 +628,13 @@ void Crs_WriteSelectorOfCourse (void) /***** Begin selector of course *****/ if (Gbl.Hierarchy.Deg.DegCod > 0) HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "id=\"crs\" name=\"crs\" class=\"HIE_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"crs\" name=\"crs\" class=\"HIE_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"crs\" name=\"crs\" class=\"HIE_SEL %s\"" + "id=\"crs\" name=\"crs\" class=\"HIE_SEL INPUT_%s\"" " disabled=\"disabled\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); /***** Initial disabled option *****/ HTM_OPTION (HTM_Type_STRING,"",Gbl.Hierarchy.Crs.CrsCod < 0,true, @@ -755,7 +755,7 @@ void Crs_FreeListCoursesInCurrentDegree (void) void Crs_WriteSelectorMyCoursesInBreadcrumb (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Course; unsigned NumMyCrs; long CrsCod; @@ -774,8 +774,8 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void) /***** Begin selector of courses *****/ HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "id=\"my_courses\" name=\"crs\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"my_courses\" name=\"crs\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); /***** Write an option when no course selected *****/ if (Gbl.Hierarchy.Crs.CrsCod <= 0) // No course selected @@ -1139,7 +1139,6 @@ static void Crs_ListCoursesForEdition (void) static void Crs_ListCoursesOfAYearForEdition (unsigned Year) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE]; extern const char *Txt_COURSE_STATUS[Hie_NUM_STATUS_TXT]; struct Crs_Course *Crs; @@ -1195,8 +1194,8 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Hie_PutParamOtherHieCod (&Crs->CrsCod); HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD, Crs->InstitutionalCrsCod,HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_INS_CODE %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_INS_CODE INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -1211,8 +1210,8 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Hie_PutParamOtherHieCod (&Crs->CrsCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"OthCrsYear\"" - " class=\"HIE_SEL_NARROW %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"HIE_SEL_NARROW INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (YearAux = 0; YearAux <= Deg_MAX_YEARS_PER_DEGREE; YearAux++) // All the years are permitted @@ -1236,8 +1235,8 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Hie_PutParamOtherHieCod (&Crs->CrsCod); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Crs->ShrtName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -1252,8 +1251,8 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Hie_PutParamOtherHieCod (&Crs->CrsCod); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Crs->FullName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_FULL_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -1312,7 +1311,6 @@ static bool Crs_CheckIfICanEdit (struct Crs_Course *Crs) static void Crs_PutFormToCreateCourse (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_course; extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE]; extern const char *Txt_Create_course; @@ -1349,15 +1347,16 @@ static void Crs_PutFormToCreateCourse (void) HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD, Crs_EditingCrs->InstitutionalCrsCod, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_INS_CODE %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_INS_CODE INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Year *****/ HTM_TD_Begin ("class=\"CM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"OthCrsYear\" class=\"HIE_SEL_NARROW %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"OthCrsYear\"" + " class=\"HIE_SEL_NARROW INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Year = 0; Year <= Deg_MAX_YEARS_PER_DEGREE; Year++) @@ -1371,18 +1370,18 @@ static void Crs_PutFormToCreateCourse (void) HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Crs_EditingCrs->ShrtName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"" + "class=\"INPUT_SHORT_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Course full name *****/ HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Crs_EditingCrs->FullName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"" + "class=\"INPUT_FULL_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Current number of teachers in this course *****/ @@ -2557,7 +2556,7 @@ void Crs_AskRemoveOldCrss (void) { extern const char *Hlp_SYSTEM_Maintenance_eliminate_old_courses; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Eliminate_old_courses; extern const char *Txt_Eliminate_all_courses_whithout_users_PART_1_OF_2; extern const char *Txt_Eliminate_all_courses_whithout_users_PART_2_OF_2; @@ -2577,8 +2576,8 @@ void Crs_AskRemoveOldCrss (void) HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtF ("%s ",Txt_Eliminate_all_courses_whithout_users_PART_1_OF_2); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"Months\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"Months\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (i = Crs_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS; i <= Crs_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS; i++) diff --git a/swad_course_config.c b/swad_course_config.c index d8191604..118d8c1d 100644 --- a/swad_course_config.c +++ b/swad_course_config.c @@ -208,7 +208,6 @@ static void CrsCfg_Title (bool PutLink) static void CrsCfg_Degree (bool PrintView,bool PutForm) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Degree; unsigned NumDeg; @@ -231,8 +230,8 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm) Frm_BeginForm (ActChgCrsDegCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthDegCod\" name=\"OthDegCod\"" - " class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (NumDeg = 0; NumDeg < Gbl.Hierarchy.Degs.Num; NumDeg++) @@ -298,7 +297,6 @@ static void CrsCfg_ShrtName (bool PutForm) static void CrsCfg_Year (bool PutForm) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Year_OF_A_DEGREE; extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE]; extern const char *Txt_Not_applicable; @@ -319,9 +317,9 @@ static void CrsCfg_Year (bool PutForm) Frm_BeginForm (ActChgCrsYeaCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthCrsYear\" name=\"OthCrsYear\"" - " class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); - for (Year = 0; + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); + for (Year = 0; Year <= Deg_MAX_YEARS_PER_DEGREE; Year++) HTM_OPTION (HTM_Type_UNSIGNED,&Year, @@ -345,7 +343,6 @@ static void CrsCfg_Year (bool PutForm) static void CrsCfg_InstitutionalCode (bool PutForm) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Institutional_code; /***** Institutional course code *****/ @@ -365,9 +362,9 @@ static void CrsCfg_InstitutionalCode (bool PutForm) Gbl.Hierarchy.Crs.InstitutionalCrsCod, HTM_SUBMIT_ON_CHANGE, "id=\"InsCrsCod\" size=\"%u\"" - " class=\"INPUT_INS_CODE %s\"", + " class=\"INPUT_INS_CODE INPUT_%s\"", Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD, - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else diff --git a/swad_date.c b/swad_date.c index 869c62b6..4d39f081 100644 --- a/swad_date.c +++ b/swad_date.c @@ -554,7 +554,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, Dat_SetHMS SetHMS, bool SubmitFormOnChange) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_MONTHS_SMALL[12]; unsigned Day; unsigned Month; @@ -585,24 +585,24 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, if (SubmitFormOnChange) HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sYear\" name=\"%sYear\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"" "adjustDateForm('%s');" "setUTCFromLocalDateTimeForm('%s');" "document.getElementById('%s').submit();return false;\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id,Id, Gbl.Form.Id); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sYear\" name=\"%sYear\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"" "adjustDateForm('%s');" "setUTCFromLocalDateTimeForm('%s');\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id,Id); for (Year = FirstYear; Year <= LastYear; @@ -617,24 +617,24 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, if (SubmitFormOnChange) HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sMonth\" name=\"%sMonth\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"" "adjustDateForm('%s');" "setUTCFromLocalDateTimeForm('%s');" "document.getElementById('%s').submit();return false;\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id,Id, Gbl.Form.Id); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sMonth\" name=\"%sMonth\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"" "adjustDateForm('%s');" "setUTCFromLocalDateTimeForm('%s');\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id,Id); for (Month = 1; Month <= 12; @@ -649,19 +649,19 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, if (SubmitFormOnChange) HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sDay\" name=\"%sDay\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"setUTCFromLocalDateTimeForm('%s');" "document.getElementById('%s').submit();return false;\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id,Gbl.Form.Id); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sDay\" name=\"%sDay\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"setUTCFromLocalDateTimeForm('%s');\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id); for (Day = 1; Day <= 31; @@ -676,19 +676,19 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, if (SubmitFormOnChange) HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sHour\" name=\"%sHour\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"setUTCFromLocalDateTimeForm('%s');" "document.getElementById('%s').submit();return false;\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id,Gbl.Form.Id); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sHour\" name=\"%sHour\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"setUTCFromLocalDateTimeForm('%s');\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id); for (Hour = 0; Hour <= 23; @@ -703,19 +703,19 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, if (SubmitFormOnChange) HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sMinute\" name=\"%sMinute\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"setUTCFromLocalDateTimeForm('%s');" "document.getElementById('%s').submit();return false;\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id,Gbl.Form.Id); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sMinute\" name=\"%sMinute\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"setUTCFromLocalDateTimeForm('%s');\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id); for (Minute = 0; Minute < 60; @@ -732,19 +732,19 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id, if (SubmitFormOnChange) HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sSecond\" name=\"%sSecond\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"setUTCFromLocalDateTimeForm('%s');" "document.getElementById('%s').submit();return false;\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id,Gbl.Form.Id); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sSecond\" name=\"%sSecond\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " onchange=\"setUTCFromLocalDateTimeForm('%s');\"", Id,ParamName, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Id); for (Second = 0; Second <= 59; @@ -891,7 +891,7 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear, struct Dat_Date *DateSelected, bool SubmitFormOnChange,bool Disabled) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_MONTHS_SMALL[12]; unsigned Year; unsigned Month; @@ -907,23 +907,23 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear, if (SubmitFormOnChange) HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sYear\" name=\"%sYear\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" "%s" " onchange=\"adjustDateForm('%s');" "document.getElementById('%s').submit();return false;\"", Id,Id, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Disabled ? " disabled=\"disabled\"" : "", Id, Gbl.Form.Id); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sYear\" name=\"%sYear\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" "%s" " onchange=\"adjustDateForm('%s');\"", Id,Id, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Disabled ? " disabled=\"disabled\"" : "", Id); HTM_OPTION (HTM_Type_STRING,"0",false,false, @@ -942,23 +942,23 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear, if (SubmitFormOnChange) HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sMonth\" name=\"%sMonth\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" "%s" " onchange=\"adjustDateForm('%s');" "document.getElementById('%s').submit();return false;\"", Id,Id, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Disabled ? " disabled=\"disabled\"" : "", Id, Gbl.Form.Id); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"%sMonth\" name=\"%sMonth\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" "%s" " onchange=\"adjustDateForm('%s');\"", Id,Id, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Disabled ? " disabled=\"disabled\"" : "", Id); HTM_OPTION (HTM_Type_STRING,"0",false,false, @@ -976,10 +976,10 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear, HTM_TD_Begin ("class=\"CM\""); HTM_SELECT_Begin (SubmitFormOnChange, "id=\"%sDay\" name=\"%sDay\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" "%s", Id,Id, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Disabled ? " disabled=\"disabled\"" : ""); HTM_OPTION (HTM_Type_STRING,"0",false,false, "-"); diff --git a/swad_degree.c b/swad_degree.c index 770c6de0..f6eac403 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -215,7 +215,7 @@ void Deg_DrawDegreeLogoAndNameWithLink (struct Deg_Degree *Deg,Act_Action_t Acti void Deg_WriteSelectorOfDegree (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Degree; MYSQL_RES *mysql_res; MYSQL_ROW row; @@ -229,13 +229,13 @@ void Deg_WriteSelectorOfDegree (void) /***** Begin selector of degree *****/ if (Gbl.Hierarchy.Ctr.CtrCod > 0) HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "id=\"deg\" name=\"deg\" class=\"HIE_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"deg\" name=\"deg\" class=\"HIE_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"deg\" name=\"deg\" class=\"HIE_SEL %s\"" + "id=\"deg\" name=\"deg\" class=\"HIE_SEL INPUT_%s\"" " disabled=\"disabled\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"", Gbl.Hierarchy.Deg.DegCod < 0,true, "[%s]",Txt_Degree); @@ -307,7 +307,6 @@ void Deg_ShowDegsOfCurrentCtr (void) static void Deg_ListDegreesForEdition (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_DEGREE_STATUS[Hie_NUM_STATUS_TXT]; unsigned NumDeg; struct DegreeType *DegTyp; @@ -373,8 +372,8 @@ static void Deg_ListDegreesForEdition (void) Hie_PutParamOtherHieCod (&Deg->DegCod); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Deg->ShrtName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -389,8 +388,8 @@ static void Deg_ListDegreesForEdition (void) Hie_PutParamOtherHieCod (&Deg->DegCod); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Deg->FullName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_FULL_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -405,8 +404,8 @@ static void Deg_ListDegreesForEdition (void) Hie_PutParamOtherHieCod (&Deg->DegCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"OthDegTypCod\"" - " class=\"HIE_SEL_NARROW %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"HIE_SEL_NARROW INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (NumDegTyp = 0; NumDegTyp < Gbl.DegTypes.Num; NumDegTyp++) @@ -435,9 +434,9 @@ static void Deg_ListDegreesForEdition (void) Frm_BeginForm (ActChgDegWWW); Hie_PutParamOtherHieCod (&Deg->DegCod); HTM_INPUT_URL ("WWW",Deg->WWW,HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -508,7 +507,6 @@ static bool Deg_CheckIfICanEditADegree (struct Deg_Degree *Deg) static void Deg_PutFormToCreateDegree (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_degree; extern const char *Txt_Create_degree; struct DegreeType *DegTyp; @@ -549,26 +547,26 @@ static void Deg_PutFormToCreateDegree (void) HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Deg_EditingDeg->ShrtName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"" + "class=\"INPUT_SHORT_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Degree full name *****/ HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Deg_EditingDeg->FullName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"" + "class=\"INPUT_FULL_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Degree type *****/ HTM_TD_Begin ("class=\"LM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "name=\"OthDegTypCod\"" - " class=\"HIE_SEL_NARROW %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"HIE_SEL_NARROW INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (NumDegTyp = 0; NumDegTyp < Gbl.DegTypes.Num; NumDegTyp++) @@ -584,9 +582,9 @@ static void Deg_PutFormToCreateDegree (void) /***** Degree WWW *****/ HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_URL ("WWW",Deg_EditingDeg->WWW,HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Number of courses in this degree *****/ diff --git a/swad_degree_config.c b/swad_degree_config.c index e6e3c8d4..683babad 100644 --- a/swad_degree_config.c +++ b/swad_degree_config.c @@ -202,7 +202,6 @@ static void DegCfg_Title (bool PutLink) static void DegCfg_Center (bool PrintView,bool PutForm) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Center; unsigned NumCtr; @@ -225,8 +224,8 @@ static void DegCfg_Center (bool PrintView,bool PutForm) Frm_BeginForm (ActChgDegCtrCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthCtrCod\" name=\"OthCtrCod\"" - " class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (NumCtr = 0; NumCtr < Gbl.Hierarchy.Ctrs.Num; NumCtr++) diff --git a/swad_degree_type.c b/swad_degree_type.c index 276d6617..30eb0dbf 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -98,7 +98,7 @@ static void DegTyp_EditingDegreeTypeDestructor (void); void DegTyp_WriteSelectorDegreeTypes (long SelectedDegTypCod) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Any_type_of_degree; unsigned NumDegTyp; @@ -108,8 +108,9 @@ void DegTyp_WriteSelectorDegreeTypes (long SelectedDegTypCod) /* List degree types */ HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "id=\"OthDegTypCod\" name=\"OthDegTypCod\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"OthDegTypCod\" name=\"OthDegTypCod\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"-1", SelectedDegTypCod == -1L,false, "%s",Txt_Any_type_of_degree); @@ -389,7 +390,6 @@ static void DegTyp_PutIconToEditDegTypes (__attribute__((unused)) void *Args) static void DegTyp_ListDegreeTypesForEdition (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; unsigned NumDegTyp; /***** Begin table *****/ @@ -427,8 +427,9 @@ static void DegTyp_ListDegreeTypesForEdition (void) HTM_INPUT_TEXT ("DegTypName",DegTyp_MAX_CHARS_DEGREE_TYPE_NAME, Gbl.DegTypes.Lst[NumDegTyp].DegTypName, HTM_SUBMIT_ON_CHANGE, - "size=\"25\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"25\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -461,7 +462,6 @@ bool DegTyp_CheckIfICanCreateDegreeTypes (void) static void DegTyp_PutFormToCreateDegreeType (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_type_of_degree; extern const char *Txt_Create_type_of_degree; @@ -491,8 +491,9 @@ static void DegTyp_PutFormToCreateDegreeType (void) HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("DegTypName",DegTyp_MAX_CHARS_DEGREE_TYPE_NAME,DegTyp_EditingDegTyp->DegTypName, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"25\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"25\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Number of degrees of this degree type ****/ diff --git a/swad_department.c b/swad_department.c index 2f2bb47b..0a89709d 100644 --- a/swad_department.c +++ b/swad_department.c @@ -446,7 +446,6 @@ void Dpt_FreeListDepartments (struct Dpt_Departments *Departments) static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departments) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Another_institution; unsigned NumDpt; struct Dpt_Department *Dpt; @@ -492,8 +491,8 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm Dpt_PutParamDptCod (&Dpt->DptCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"OthInsCod\"" - " class=\"HIE_SEL_NARROW %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"HIE_SEL_NARROW INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"0",Dpt->InsCod == 0,false, "%s",Txt_Another_institution); for (NumIns = 0; @@ -512,8 +511,8 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm Dpt_PutParamDptCod (&Dpt->DptCod); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Dpt->ShrtName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -523,8 +522,8 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm Dpt_PutParamDptCod (&Dpt->DptCod); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Dpt->FullName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_FULL_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -533,9 +532,9 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm Frm_BeginForm (ActChgDptWWW); Dpt_PutParamDptCod (&Dpt->DptCod); HTM_INPUT_URL ("WWW",Dpt->WWW,HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -804,7 +803,7 @@ void Dpt_ContEditAfterChgDpt (void) static void Dpt_PutFormToCreateDepartment (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_department; extern const char *Txt_Institution; extern const char *Txt_Short_name; @@ -836,8 +835,8 @@ static void Dpt_PutFormToCreateDepartment (void) HTM_TD_Begin ("class=\"CM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "name=\"OthInsCod\"" - " class=\"HIE_SEL_NARROW %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"HIE_SEL_NARROW INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"0",Dpt_EditingDpt->InsCod == 0,false, "%s",Txt_Another_institution); for (NumIns = 0; @@ -853,26 +852,26 @@ static void Dpt_PutFormToCreateDepartment (void) HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Dpt_EditingDpt->ShrtName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"" + "class=\"INPUT_SHORT_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Department full name *****/ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Dpt_EditingDpt->FullName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"" + "class=\"INPUT_FULL_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Department WWW *****/ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_URL ("WWW",Dpt_EditingDpt->WWW,HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_enrolment.c b/swad_enrolment.c index 9f9b95f6..2f178680 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -331,7 +331,7 @@ static void Enr_NotifyAfterEnrolment (const struct UsrData *UsrDat, void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction,void (*FuncParams) (void)) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_nick_email_or_ID; extern const char *Txt_Continue; @@ -350,9 +350,9 @@ void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction,void (*FuncParams) HTM_INPUT_TEXT ("OtherUsrIDNickOrEMail",Cns_MAX_CHARS_EMAIL_ADDRESS,"", HTM_DONT_SUBMIT_ON_CHANGE, "id=\"OtherUsrIDNickOrEMail\" size=\"18\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); /***** Send button*****/ Btn_PutConfirmButton (Txt_Continue); @@ -657,7 +657,7 @@ void Enr_PutLinkToRemOldUsrs (void) void Enr_AskRemoveOldUsrs (void) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Eliminate_old_users; extern const char *Txt_Eliminate_all_users_who_are_not_enroled_on_any_courses_PART_1_OF_2; extern const char *Txt_Eliminate_all_users_who_are_not_enroled_on_any_courses_PART_2_OF_2; @@ -676,8 +676,8 @@ void Enr_AskRemoveOldUsrs (void) HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtF ("%s ",Txt_Eliminate_all_users_who_are_not_enroled_on_any_courses_PART_1_OF_2); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"Months\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"Months\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Months = Usr_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS; Months <= Usr_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS; Months++) @@ -772,7 +772,7 @@ void Enr_RemoveOldUsrs (void) static void Enr_PutAreaToEnterUsrsIDs (void) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_List_of_nicks_emails_or_IDs; /***** Text area for users' IDs *****/ @@ -786,8 +786,8 @@ static void Enr_PutAreaToEnterUsrsIDs (void) HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"UsrsIDs\" name=\"UsrsIDs\"" " cols=\"60\" rows=\"10\"" - " class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TEXTAREA_End (); HTM_TD_End (); diff --git a/swad_exam.c b/swad_exam.c index 56ba4a46..bf2cc26d 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -1333,7 +1333,7 @@ void Exa_PutFormEditionExam (struct Exa_Exams *Exams, extern const char *Hlp_ASSESSMENT_Exams_new_exam; extern const char *Hlp_ASSESSMENT_Exams_edit_exam; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_exam; extern const char *Txt_Edit_exam; extern const char *Txt_Title; @@ -1372,9 +1372,9 @@ void Exa_PutFormEditionExam (struct Exa_Exams *Exams, HTM_INPUT_TEXT ("Title",Exa_MAX_CHARS_TITLE,Exam->Title, HTM_DONT_SUBMIT_ON_CHANGE, "id=\"Title\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"" + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -1388,8 +1388,8 @@ void Exa_PutFormEditionExam (struct Exa_Exams *Exams, HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_FLOAT ("MaxGrade",0.0,DBL_MAX,0.01,Exam->MaxGrade,false, - " class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\" required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -1416,8 +1416,8 @@ void Exa_PutFormEditionExam (struct Exa_Exams *Exams, /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" rows=\"5\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Txt); HTM_TEXTAREA_End (); HTM_TD_End (); diff --git a/swad_exam_session.c b/swad_exam_session.c index 05dd6d1e..b7ec1326 100644 --- a/swad_exam_session.c +++ b/swad_exam_session.c @@ -991,7 +991,7 @@ long ExaSes_GetParamSesCod (void) static void ExaSes_PutFormSession (const struct ExaSes_Session *Session) { extern const char *Hlp_ASSESSMENT_Exams_sessions; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_session; extern const char *Txt_Title; extern const char *Txt_Create_session; @@ -1029,9 +1029,9 @@ static void ExaSes_PutFormSession (const struct ExaSes_Session *Session) HTM_TD_Begin ("class=\"LT\""); HTM_INPUT_TEXT ("Title",ExaSes_MAX_CHARS_TITLE,Session->Title, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Title\" size=\"45\" class=\"%s\"" + "id=\"Title\" size=\"45\" class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_exam_set.c b/swad_exam_set.c index a7025e81..fc11ec27 100644 --- a/swad_exam_set.c +++ b/swad_exam_set.c @@ -222,7 +222,7 @@ static void ExaSet_PutFormNewSet (struct Exa_Exams *Exams, struct ExaSet_Set *Set, unsigned MaxSetInd) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_set_of_questions; extern const char *Txt_Create_set_of_questions; @@ -256,9 +256,9 @@ static void ExaSet_PutFormNewSet (struct Exa_Exams *Exams, HTM_INPUT_TEXT ("Title",ExaSet_MAX_CHARS_TITLE,Set->Title, HTM_DONT_SUBMIT_ON_CHANGE, "id=\"Title\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"" + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Current number of questions in set *****/ @@ -712,7 +712,7 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams, MYSQL_RES *mysql_res, bool ICanEditSets) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Sets_of_questions; extern const char *Txt_Move_up_X; extern const char *Txt_Move_down_X; @@ -832,9 +832,9 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams, HTM_INPUT_TEXT ("Title",ExaSet_MAX_CHARS_TITLE,Set.Title, HTM_SUBMIT_ON_CHANGE, "id=\"Title\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"" + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else diff --git a/swad_figure.c b/swad_figure.c index 97eb7347..6e022822 100644 --- a/swad_figure.c +++ b/swad_figure.c @@ -76,7 +76,7 @@ static void Fig_ReqShowFigure (Fig_FigureType_t SelectedFigureType) { extern const char *Hlp_ANALYTICS_Figures; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Figures; extern const char *Txt_Scope; extern const char *Txt_Statistic; @@ -113,8 +113,8 @@ static void Fig_ReqShowFigure (Fig_FigureType_t SelectedFigureType) HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_Statistic); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"FigureType\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"FigureType\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (FigType = (Fig_FigureType_t) 0; FigType <= (Fig_FigureType_t) (Fig_NUM_FIGURES - 1); FigType++) diff --git a/swad_forum.c b/swad_forum.c index 4650402e..d069d04b 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -2690,7 +2690,7 @@ static void For_WriteFormForumPst (struct For_Forums *Forums, extern const char *Hlp_COMMUNICATION_Forums_new_post; extern const char *Hlp_COMMUNICATION_Forums_new_thread; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_post; extern const char *Txt_New_thread; extern const char *Txt_MSG_Subject; @@ -2738,9 +2738,9 @@ static void For_WriteFormForumPst (struct For_Forums *Forums, IsReply ? Subject : "", HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Subject\" class=\"MSG_SUBJECT %s\"" + "id=\"Subject\" class=\"MSG_SUBJECT INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -2754,8 +2754,8 @@ static void For_WriteFormForumPst (struct For_Forums *Forums, /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Content\" name=\"Content\"" - " class=\"MSG_CONTENT %s\" rows=\"10\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"MSG_CONTENT INPUT_%s\" rows=\"10\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TEXTAREA_End (); HTM_TD_End (); @@ -2767,7 +2767,8 @@ static void For_WriteFormForumPst (struct For_Forums *Forums, Lay_HelpPlainEditor (); /***** Attached image (optional) *****/ - if (asprintf (&ClassInput,"FOR_MED_INPUT %s",The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&ClassInput,"FOR_MED_INPUT INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); Med_PutMediaUploader (-1,ClassInput); free (ClassInput); diff --git a/swad_game.c b/swad_game.c index cf481704..1db164c2 100644 --- a/swad_game.c +++ b/swad_game.c @@ -1310,7 +1310,7 @@ static void Gam_PutFormsEditionGame (struct Gam_Games *Games, extern const char *Hlp_ASSESSMENT_Games_new_game; extern const char *Hlp_ASSESSMENT_Games_edit_game; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_game; extern const char *Txt_Edit_game; extern const char *Txt_Title; @@ -1349,9 +1349,9 @@ static void Gam_PutFormsEditionGame (struct Gam_Games *Games, HTM_INPUT_TEXT ("Title",Gam_MAX_CHARS_TITLE,Game->Title, HTM_DONT_SUBMIT_ON_CHANGE, "id=\"Title\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"" + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -1365,8 +1365,8 @@ static void Gam_PutFormsEditionGame (struct Gam_Games *Games, HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_FLOAT ("MaxGrade",0.0,DBL_MAX,0.01,Game->MaxGrade,false, - " class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\" required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -1393,8 +1393,8 @@ static void Gam_PutFormsEditionGame (struct Gam_Games *Games, /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" rows=\"5\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Txt); HTM_TEXTAREA_End (); HTM_TD_End (); diff --git a/swad_group.c b/swad_group.c index 4a5d2cfa..924b463e 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1227,7 +1227,6 @@ static void Grp_RemoveUsrFromGroup (long UsrCod,long GrpCod) static void Grp_ListGroupTypesForEdition (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_It_is_optional_to_choose_a_group; extern const char *Txt_It_is_mandatory_to_choose_a_group; extern const char *Txt_A_student_can_belong_to_several_groups; @@ -1264,8 +1263,8 @@ static void Grp_ListGroupTypesForEdition (void) HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME, Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName, HTM_SUBMIT_ON_CHANGE, - "size=\"12\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"12\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -1275,8 +1274,8 @@ static void Grp_ListGroupTypesForEdition (void) Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"MandatoryEnrolment\"" - " class=\"%s\" style=\"width:150px;\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\" style=\"width:150px;\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"N", !Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrolment,false, "%s",Txt_It_is_optional_to_choose_a_group); @@ -1293,8 +1292,8 @@ static void Grp_ListGroupTypesForEdition (void) Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"MultipleEnrolment\"" - " class=\"%s\" style=\"width:150px;\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\" style=\"width:150px;\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"N", !Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrolment,false, "%s",Txt_A_student_can_only_belong_to_one_group); @@ -1417,7 +1416,6 @@ static void Grp_WriteHeadingGroupTypes (void) static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Group_X_open_click_to_close_it; extern const char *Txt_Group_X_closed_click_to_open_it; extern const char *Txt_File_zones_of_the_group_X_enabled_click_to_disable_them; @@ -1506,8 +1504,8 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms) Grp_PutParamGrpCod (&Grp->GrpCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"GrpTypCod\"" - " class=\"%s\" style=\"width:100px;\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\" style=\"width:100px;\"", + The_Colors[Gbl.Prefs.Theme]); /* Options for group types */ for (NumTipGrpAux = 0; @@ -1531,8 +1529,8 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms) Grp_PutParamGrpCod (&Grp->GrpCod); HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Grp->GrpName, HTM_SUBMIT_ON_CHANGE, - "size=\"20\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"20\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -1543,8 +1541,8 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms) Grp_PutParamGrpCod (&Grp->GrpCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"RooCod\"" - " class=\"%s\" style=\"width:100px;\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\" style=\"width:100px;\"", + The_Colors[Gbl.Prefs.Theme]); /* Option for no assigned room */ HTM_OPTION (HTM_Type_STRING,"-1", @@ -1586,8 +1584,8 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms) Grp_WriteMaxStds (StrMaxStudents,Grp->MaxStudents); HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents, HTM_SUBMIT_ON_CHANGE, - "size=\"3\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"3\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -2427,7 +2425,6 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight) static void Grp_PutFormToCreateGroupType (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_type_of_group; extern const char *Txt_It_is_optional_to_choose_a_group; extern const char *Txt_It_is_mandatory_to_choose_a_group; @@ -2461,17 +2458,17 @@ static void Grp_PutFormToCreateGroupType (void) HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME, Gbl.Crs.Grps.GrpTyp.GrpTypName,HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"12\" class=\"%s\"" + "size=\"12\" class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Is it mandatory to register in any groups of this type? *****/ HTM_TD_Begin ("class=\"CM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "name=\"MandatoryEnrolment\"" - " class=\"%s\" style=\"width:150px;\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\" style=\"width:150px;\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"N", !Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment,false, "%s",Txt_It_is_optional_to_choose_a_group); @@ -2485,8 +2482,8 @@ static void Grp_PutFormToCreateGroupType (void) HTM_TD_Begin ("class=\"CM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "name=\"MultipleEnrolment\"" - " class=\"%s\" style=\"width:150px;\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\" style=\"width:150px;\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"N", !Gbl.Crs.Grps.GrpTyp.MultipleEnrolment,false, "%s",Txt_A_student_can_only_belong_to_one_group); @@ -2550,7 +2547,6 @@ static void Grp_PutFormToCreateGroupType (void) static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_group; extern const char *Txt_Group_closed; extern const char *Txt_File_zones_disabled; @@ -2597,8 +2593,8 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms) HTM_TD_Begin ("class=\"CM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "name=\"GrpTypCod\"" - " class=\"%s\" style=\"width:100px;\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\" style=\"width:100px;\"", + The_Colors[Gbl.Prefs.Theme]); /* Options for group types */ for (NumGrpTyp = 0; @@ -2617,9 +2613,9 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms) HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Gbl.Crs.Grps.GrpName, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"20\" class=\"%s\"" + "size=\"20\" class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Room *****/ @@ -2627,8 +2623,8 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms) HTM_TD_Begin ("class=\"CM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "name=\"RooCod\"" - " class=\"%s\" style=\"width:100px;\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\" style=\"width:100px;\"", + The_Colors[Gbl.Prefs.Theme]); /* Option for no assigned room */ HTM_OPTION (HTM_Type_STRING,"-1",Gbl.Crs.Grps.RooCod < 0,false, @@ -2666,8 +2662,8 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms) Grp_WriteMaxStds (StrMaxStudents,Gbl.Crs.Grps.MaxStudents); HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"3\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"3\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_hierarchy_config.c b/swad_hierarchy_config.c index aef77939..387d82c7 100644 --- a/swad_hierarchy_config.c +++ b/swad_hierarchy_config.c @@ -87,7 +87,6 @@ void HieCfg_FullName (bool PutForm,const char *Label,Act_Action_t NextAction, const char FullName[Cns_HIERARCHY_MAX_BYTES_FULL_NAME + 1]) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; /***** Full name *****/ HTM_TR_Begin (NULL); @@ -105,9 +104,10 @@ void HieCfg_FullName (bool PutForm,const char *Label,Act_Action_t NextAction, Frm_BeginForm (NextAction); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,FullName, HTM_SUBMIT_ON_CHANGE, - "id=\"FullName\" class=\"INPUT_FULL_NAME %s\"" + "id=\"FullName\"" + " class=\"INPUT_FULL_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else // I can not edit full name @@ -125,7 +125,6 @@ void HieCfg_ShrtName (bool PutForm,Act_Action_t NextAction, const char ShrtName[Cns_HIERARCHY_MAX_BYTES_SHRT_NAME + 1]) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Short_name; /***** Short name *****/ @@ -144,9 +143,10 @@ void HieCfg_ShrtName (bool PutForm,Act_Action_t NextAction, Frm_BeginForm (NextAction); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,ShrtName, HTM_SUBMIT_ON_CHANGE, - "id=\"ShortName\" class=\"INPUT_SHORT_NAME %s\"" + "id=\"ShortName\"" + " class=\"INPUT_SHORT_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else // I can not edit short name @@ -164,7 +164,6 @@ void HieCfg_WWW (bool PrintView,bool PutForm,Act_Action_t NextAction, const char WWW[Cns_MAX_BYTES_WWW + 1]) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Web; /***** Web *****/ @@ -182,9 +181,9 @@ void HieCfg_WWW (bool PrintView,bool PutForm,Act_Action_t NextAction, /* Form to change web */ Frm_BeginForm (NextAction); HTM_INPUT_URL ("WWW",WWW,HTM_SUBMIT_ON_CHANGE, - "id=\"WWW\" class=\"INPUT_WWW_WIDE %s\"" + "id=\"WWW\" class=\"INPUT_WWW_WIDE INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else // I can not change web diff --git a/swad_holiday.c b/swad_holiday.c index 6adc219c..663d291b 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -508,7 +508,6 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays, { extern const char *Hlp_INSTITUTION_Holidays_edit; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Holidays; extern const char *Txt_All_places; extern const char *Txt_HOLIDAY_TYPES[Hld_NUM_TYPES_HOLIDAY]; @@ -551,8 +550,8 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays, Frm_BeginForm (ActChgHldPlc); Hld_PutParamHldCod (&Hld->HldCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "name=\"PlcCod\" class=\"PLC_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"-1",Hld->PlcCod <= 0,false, "%s",Txt_All_places); for (NumPlc = 0; @@ -570,9 +569,9 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays, Frm_BeginForm (ActChgHldTyp); Hld_PutParamHldCod (&Hld->HldCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "name=\"HldTyp\" class=\"%s\"" + "name=\"HldTyp\" class=\"INPUT_%s\"" " style=\"width:62px;\"", // TODO: Use a CSS class - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); for (HolidayType = (Hld_HolidayType_t) 0; HolidayType <= (Hld_HolidayType_t) (Hld_NUM_TYPES_HOLIDAY - 1); HolidayType++) @@ -616,8 +615,8 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays, Hld_PutParamHldCod (&Hld->HldCod); HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name, HTM_SUBMIT_ON_CHANGE, - "size=\"20\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"20\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); HTM_TR_End (); @@ -901,7 +900,7 @@ void Hld_ContEditAfterChgHld (void) static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places) { extern const char *Hlp_INSTITUTION_Holidays_edit; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_All_places; extern const char *Txt_New_holiday; extern const char *Txt_Place; @@ -936,8 +935,8 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places) /***** Holiday place *****/ HTM_TD_Begin ("class=\"CM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"PlcCod\" class=\"PLC_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"-1",Hld_EditingHld->PlcCod <= 0,false, "%s",Txt_All_places); for (NumPlc = 0; @@ -952,9 +951,9 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places) /***** Holiday type *****/ HTM_TD_Begin ("class=\"CM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"HldTyp\" class=\"%s\"" + "name=\"HldTyp\" class=\"INPUT_%s\"" " style=\"width:62px;\"", // TODO: Use a CSS class - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); for (HolidayType = (Hld_HolidayType_t) 0; HolidayType <= (Hld_HolidayType_t) (Hld_NUM_TYPES_HOLIDAY - 1); HolidayType++) @@ -989,8 +988,9 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places) HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"20\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"20\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TD_Empty (1); diff --git a/swad_indicator.c b/swad_indicator.c index cdc4b700..8619fe7f 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -96,7 +96,6 @@ void Ind_ReqIndicatorsCourses (void) extern const char *Hlp_ANALYTICS_Indicators; extern const char *The_ClassFormInBox[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Scope; extern const char *Txt_Types_of_degree; extern const char *Txt_only_if_the_scope_is_X; @@ -163,8 +162,8 @@ void Ind_ReqIndicatorsCourses (void) /* Data */ HTM_TD_Begin ("class=\"LT\""); - if (asprintf (&SelectClass,"INDICATORS_INPUT %s", - The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&SelectClass,"INDICATORS_INPUT INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); Dpt_WriteSelectorDepartment (Gbl.Hierarchy.Ins.InsCod, // Departments in current insitution Indicators.DptCod, // Selected department diff --git a/swad_info.c b/swad_info.c index 333b2a74..aa5bddd9 100644 --- a/swad_info.c +++ b/swad_info.c @@ -1109,7 +1109,7 @@ void Inf_FormToSendPage (Inf_Src_t InfoSrc) void Inf_FormToSendURL (Inf_Src_t InfoSrc) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_URL; extern const char *Txt_Send_URL; char PathFile[PATH_MAX + 1]; @@ -1136,8 +1136,8 @@ void Inf_FormToSendURL (Inf_Src_t InfoSrc) HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_URL); HTM_INPUT_URL ("InfoSrcURL",Gbl.Crs.Info.URL,HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"50\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"50\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_LABEL_End (); HTM_DIV_End (); @@ -1675,7 +1675,7 @@ static bool Inf_CheckAndShowRichTxt (void) void Inf_EditPlainTxtInfo (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_INFO_TITLE[Inf_NUM_TYPES]; extern const char *Txt_Save_changes; struct Syl_Syllabus Syllabus; @@ -1715,8 +1715,9 @@ void Inf_EditPlainTxtInfo (void) /***** Edition area *****/ HTM_DIV_Begin ("class=\"CM\""); Lay_HelpPlainEditor (); - HTM_TEXTAREA_Begin ("name=\"Txt\" cols=\"80\" rows=\"20\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + HTM_TEXTAREA_Begin ("name=\"Txt\" cols=\"80\" rows=\"20\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (TxtHTML); HTM_TEXTAREA_End (); HTM_DIV_End (); @@ -1732,7 +1733,7 @@ void Inf_EditPlainTxtInfo (void) void Inf_EditRichTxtInfo (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_INFO_TITLE[Inf_NUM_TYPES]; extern const char *Txt_Save_changes; struct Syl_Syllabus Syllabus; @@ -1772,8 +1773,9 @@ void Inf_EditRichTxtInfo (void) /***** Edition area *****/ HTM_DIV_Begin ("class=\"CM\""); Lay_HelpRichEditor (); - HTM_TEXTAREA_Begin ("name=\"Txt\" cols=\"80\" rows=\"20\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + HTM_TEXTAREA_Begin ("name=\"Txt\" cols=\"80\" rows=\"20\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (TxtHTML); HTM_TEXTAREA_End (); HTM_DIV_End (); diff --git a/swad_institution.c b/swad_institution.c index 87079fe8..3c296a20 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -867,7 +867,7 @@ void Ins_FreeListInstitutions (void) void Ins_WriteSelectorOfInstitution (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Institution; MYSQL_RES *mysql_res; MYSQL_ROW row; @@ -881,13 +881,13 @@ void Ins_WriteSelectorOfInstitution (void) /***** Begin selector *****/ if (Gbl.Hierarchy.Cty.CtyCod > 0) HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "id=\"ins\" name=\"ins\" class=\"HIE_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"ins\" name=\"ins\" class=\"HIE_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); else HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"ins\" name=\"ins\" class=\"HIE_SEL %s\"" + "id=\"ins\" name=\"ins\" class=\"HIE_SEL INPUT_%s\"" " disabled=\"disabled\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"", Gbl.Hierarchy.Ins.InsCod < 0,true, @@ -935,7 +935,6 @@ void Ins_WriteSelectorOfInstitution (void) static void Ins_ListInstitutionsForEdition (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_INSTITUTION_STATUS[Hie_NUM_STATUS_TXT]; unsigned NumIns; struct Ins_Instit *Ins; @@ -1003,8 +1002,8 @@ static void Ins_ListInstitutionsForEdition (void) Hie_PutParamOtherHieCod (&Ins->InsCod); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ins->ShrtName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -1019,8 +1018,8 @@ static void Ins_ListInstitutionsForEdition (void) Hie_PutParamOtherHieCod (&Ins->InsCod); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ins->FullName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_FULL_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -1034,9 +1033,9 @@ static void Ins_ListInstitutionsForEdition (void) Frm_BeginForm (ActChgInsWWW); Hie_PutParamOtherHieCod (&Ins->InsCod); HTM_INPUT_URL ("WWW",Ins->WWW,HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); } else @@ -1452,7 +1451,6 @@ static void Ins_PutParamGoToIns (void *InsCod) static void Ins_PutFormToCreateInstitution (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_institution; extern const char *Txt_Create_institution; @@ -1491,26 +1489,26 @@ static void Ins_PutFormToCreateInstitution (void) HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ins_EditingIns->ShrtName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"" + "class=\"INPUT_SHORT_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Institution full name *****/ HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ins_EditingIns->FullName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"" + "class=\"INPUT_FULL_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Institution WWW *****/ HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_URL ("WWW",Ins_EditingIns->WWW,HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Number of users who claim to belong to this institution ****/ diff --git a/swad_institution_config.c b/swad_institution_config.c index afba43e2..7563dcd4 100644 --- a/swad_institution_config.c +++ b/swad_institution_config.c @@ -303,7 +303,6 @@ static void InsCfg_Map (void) static void InsCfg_Country (bool PrintView,bool PutForm) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Country; unsigned NumCty; @@ -326,8 +325,8 @@ static void InsCfg_Country (bool PrintView,bool PutForm) Frm_BeginForm (ActChgInsCtyCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthCtyCod\" name=\"OthCtyCod\"" - " class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (NumCty = 0; NumCty < Gbl.Hierarchy.Ctys.Num; NumCty++) diff --git a/swad_language.c b/swad_language.c index 69efe603..1df528f9 100644 --- a/swad_language.c +++ b/swad_language.c @@ -117,16 +117,16 @@ static void Lan_PutIconsLanguage (__attribute__((unused)) void *Args) void Lan_PutSelectorToSelectLanguage (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_STR_LANG_NAME[1 + Lan_NUM_LANGUAGES]; Lan_Language_t Lan; unsigned LanUnsigned; Frm_BeginForm (ActReqChgLan); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "name=\"Lan\" class=\"%s\"" + "name=\"Lan\" class=\"INPUT_%s\"" " style=\"width:112px; margin:0;\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); for (Lan = (Lan_Language_t) 1; Lan <= (Lan_Language_t) Lan_NUM_LANGUAGES; Lan++) diff --git a/swad_link.c b/swad_link.c index 6e28c6f1..0f6fe3b7 100644 --- a/swad_link.c +++ b/swad_link.c @@ -381,7 +381,6 @@ void Lnk_FreeListLinks (void) static void Lnk_ListLinksForEdition (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; unsigned NumLnk; struct Lnk_Link *Lnk; @@ -417,9 +416,9 @@ static void Lnk_ListLinksForEdition (void) Lnk_PutParamLnkCod (&Lnk->LnkCod); HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"" + "class=\"INPUT_SHORT_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -429,9 +428,9 @@ static void Lnk_ListLinksForEdition (void) Lnk_PutParamLnkCod (&Lnk->LnkCod); HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"" + "class=\"INPUT_FULL_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -440,9 +439,9 @@ static void Lnk_ListLinksForEdition (void) Frm_BeginForm (ActChgLnkWWW); Lnk_PutParamLnkCod (&Lnk->LnkCod); HTM_INPUT_URL ("WWW",Lnk->WWW,HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -667,7 +666,7 @@ void Lnk_ContEditAfterChgLnk (void) static void Lnk_PutFormToCreateLink (void) { extern const char *Hlp_SYSTEM_Links_edit; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_link; extern const char *Txt_Create_link; @@ -694,26 +693,26 @@ static void Lnk_PutFormToCreateLink (void) HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk_EditingLnk->ShrtName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"" + "class=\"INPUT_SHORT_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Link full name *****/ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk_EditingLnk->FullName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"" + "class=\"INPUT_FULL_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Link WWW *****/ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_URL ("WWW",Lnk_EditingLnk->WWW,HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_WWW_NARROW %s\"" + "class=\"INPUT_WWW_NARROW INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_mail.c b/swad_mail.c index a3c9e334..203262d9 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -406,7 +406,6 @@ static void Mai_ListMailDomainsForEdition (void) { extern const char *Hlp_START_Domains_edit; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Email_domains_allowed_for_notifications; unsigned NumMai; struct Mail *Mai; @@ -445,8 +444,8 @@ static void Mai_ListMailDomainsForEdition (void) Mai_PutParamMaiCod (&Mai->MaiCod); HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain, HTM_SUBMIT_ON_CHANGE, - "size=\"15\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"15\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -456,8 +455,8 @@ static void Mai_ListMailDomainsForEdition (void) Mai_PutParamMaiCod (&Mai->MaiCod); HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai->Info, HTM_SUBMIT_ON_CHANGE, - "size=\"40\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"40\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -646,7 +645,7 @@ void Mai_ContEditAfterChgMai (void) static void Mai_PutFormToCreateMailDomain (void) { extern const char *Hlp_START_Domains_edit; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_email_domain; extern const char *Txt_EMAIL_DOMAIN_ORDER[3]; extern const char *Txt_Create_email_domain; @@ -672,16 +671,18 @@ static void Mai_PutFormToCreateMailDomain (void) 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=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"15\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /* 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=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"40\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TD_Empty (1); @@ -1060,7 +1061,6 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe, bool IShouldConfirmEmail) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Before_going_to_any_other_option_you_must_fill_in_your_email_address; extern const char *Txt_Please_confirm_your_email_address; extern const char *Txt_Current_email; @@ -1211,8 +1211,8 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe, Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); } HTM_INPUT_EMAIL ("NewEmail",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrDat.Email, - "id=\"NewEmail\" class=\"%s\" size=\"18\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"NewEmail\" class=\"INPUT_%s\" size=\"18\"", + The_Colors[Gbl.Prefs.Theme]); HTM_BR (); Btn_PutCreateButtonInline (NumEmails ? Txt_Change_email : // User already has an email address Txt_Save_changes); // User has no email address yet diff --git a/swad_match.c b/swad_match.c index 0f209276..9e9f6da3 100644 --- a/swad_match.c +++ b/swad_match.c @@ -1221,7 +1221,7 @@ static void Mch_PutFormExistingMatch (struct Gam_Games *Games, const char *Anchor) { extern const char *Hlp_ASSESSMENT_Games_matches; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Title; extern const char *Txt_Save_changes; @@ -1244,9 +1244,9 @@ static void Mch_PutFormExistingMatch (struct Gam_Games *Games, HTM_TD_Begin ("class=\"LT\""); HTM_INPUT_TEXT ("Title",Mch_MAX_CHARS_TITLE,Match->Title, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Title\" size=\"45\" class=\"%s\"" + "id=\"Title\" size=\"45\" class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -1274,7 +1274,7 @@ static void Mch_PutFormExistingMatch (struct Gam_Games *Games, static void Mch_PutFormNewMatch (const struct Gam_Game *Game) { extern const char *Hlp_ASSESSMENT_Games_matches; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_match; extern const char *Txt_Title; extern const char *Txt_Play; @@ -1302,9 +1302,9 @@ static void Mch_PutFormNewMatch (const struct Gam_Game *Game) HTM_TD_Begin ("class=\"LT\""); HTM_INPUT_TEXT ("Title",Mch_MAX_CHARS_TITLE,Game->Title, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Title\" size=\"45\" class=\"%s\"" + "id=\"Title\" size=\"45\" class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_message.c b/swad_message.c index 5eb23a53..caf6075d 100644 --- a/swad_message.c +++ b/swad_message.c @@ -219,7 +219,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages, { extern const char *Hlp_COMMUNICATION_Messages_write; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Reply_message; extern const char *Txt_New_message; extern const char *Txt_MSG_To; @@ -372,8 +372,8 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages, Lay_HelpPlainEditor (); /***** Attached image (optional) *****/ - if (asprintf (&ClassInput,"MSG_MED_INPUT %s", - The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&ClassInput,"MSG_MED_INPUT INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); Med_PutMediaUploader (-1,ClassInput); free (ClassInput); @@ -525,7 +525,7 @@ static void Msg_ShowOneUniqueRecipient (void) static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Other_recipients; extern const char *Txt_Recipients; extern const char *Txt_nicks_emails_or_IDs_separated_by_commas; @@ -555,9 +555,9 @@ static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void) HTM_TR_Begin (NULL); HTM_TD_Begin ("colspan=\"%u\" class=\"LM\"",ColSpan); HTM_TEXTAREA_Begin ("id=\"OtherRecipients\" name=\"OtherRecipients\"" - " class=\"MSG_RECIPIENTS %s\" rows=\"2\"" + " class=\"MSG_RECIPIENTS INPUT_%s\" rows=\"2\"" " placeholder=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Txt_nicks_emails_or_IDs_separated_by_commas); if (Gbl.Usrs.ListOtherRecipients[0]) HTM_Txt (Gbl.Usrs.ListOtherRecipients); @@ -582,7 +582,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag char Content[Cns_MAX_BYTES_LONG_TEXT + 1]) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_MSG_Subject; extern const char *Txt_MSG_Content; extern const char *Txt_Original_message; @@ -603,8 +603,8 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"MsgSubject\" name=\"Subject\"" - " class=\"MSG_SUBJECT %s\" rows=\"2\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"MSG_SUBJECT INPUT_%s\" rows=\"2\"", + The_Colors[Gbl.Prefs.Theme]); /* If message is a reply ==> get original message */ if (MsgCod > 0) // It's a reply @@ -643,8 +643,8 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"MsgContent\" name=\"Content\"" - " class=\"MSG_CONTENT %s\" rows=\"20\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"MSG_CONTENT INPUT_%s\" rows=\"20\"", + The_Colors[Gbl.Prefs.Theme]); /* Begin textarea with a '\n', that will be not visible in textarea. When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"), @@ -678,8 +678,8 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"MsgContent\" name=\"Content\"" - " class=\"MSG_CONTENT %s\" rows=\"20\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"MSG_CONTENT INPUT_%s\" rows=\"20\"", + The_Colors[Gbl.Prefs.Theme]); /* Begin textarea with a '\n', that will be not visible in textarea. When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"), @@ -1812,7 +1812,7 @@ void Msg_PutHiddenParamsMsgsFilters (void *Messages) static void Msg_ShowFormSelectCourseSentOrRecMsgs (const struct Msg_Messages *Messages) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Messages_received_from_A_COURSE; extern const char *Txt_Messages_sent_from_A_COURSE; extern const char *Txt_any_course; @@ -1842,8 +1842,8 @@ static void Msg_ShowFormSelectCourseSentOrRecMsgs (const struct Msg_Messages *Me HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtF ("%s ",*TxtSelector[Messages->TypeOfMessages]); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"FilterCrsCod\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"FilterCrsCod\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); /* Write a first option to select any course */ HTM_OPTION (HTM_Type_STRING,"", @@ -1878,7 +1878,7 @@ static void Msg_ShowFormSelectCourseSentOrRecMsgs (const struct Msg_Messages *Me static void Msg_ShowFormToFilterMsgs (const struct Msg_Messages *Messages) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_MSG_From; extern const char *Txt_MSG_To; extern const char *Txt_MSG_Content; @@ -1900,8 +1900,8 @@ static void Msg_ShowFormToFilterMsgs (const struct Msg_Messages *Messages) HTM_TxtColonNBSP (*TxtFromTo[Messages->TypeOfMessages]); HTM_INPUT_SEARCH ("FilterFromTo",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME * 3, Messages->FilterFromTo, - "size=\"20\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"20\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_LABEL_End (); HTM_TD_End (); @@ -1911,8 +1911,8 @@ static void Msg_ShowFormToFilterMsgs (const struct Msg_Messages *Messages) HTM_TxtColonNBSP (Txt_MSG_Content); HTM_INPUT_SEARCH ("FilterContent",Msg_MAX_CHARS_FILTER_CONTENT, Messages->FilterContent, - "size=\"20\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"20\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_LABEL_End (); HTM_TD_End (); diff --git a/swad_network.c b/swad_network.c index a88c0215..92b9ffc2 100644 --- a/swad_network.c +++ b/swad_network.c @@ -193,7 +193,7 @@ void Net_ShowFormMyWebsAndSocialNets (void) { extern const char *Hlp_PROFILE_Webs; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Webs_social_networks; extern const char *Txt_Save_changes; Net_WebsAndSocialNetworks_t NumURL; @@ -240,9 +240,10 @@ void Net_ShowFormMyWebsAndSocialNets (void) HTM_TD_Begin ("class=\"REC_C2_BOT LM\""); HTM_INPUT_URL (StrName,URL,HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"%s\" class=\"REC_C2_BOT_INPUT %s\"", + "id=\"%s\"" + " class=\"REC_C2_BOT_INPUT INPUT_%s\"", StrName, - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_nickname.c b/swad_nickname.c index 4cd519bf..f130ef41 100644 --- a/swad_nickname.c +++ b/swad_nickname.c @@ -151,7 +151,6 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe, { extern const char *Hlp_PROFILE_Account; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Nickname; extern const char *Txt_Before_going_to_any_other_option_you_must_fill_your_nickname; extern const char *Txt_Current_nickname; @@ -308,8 +307,9 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe, Gbl.Usrs.Me.UsrDat.Nickname); HTM_INPUT_TEXT ("NewNick",1 + Nck_MAX_CHARS_NICK_WITHOUT_ARROBA, NickWithArr,HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"NewNick\" class=\"%s\" size=\"18\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"NewNick\" class=\"INPUT_%s\"" + " size=\"18\"", + The_Colors[Gbl.Prefs.Theme]); HTM_BR (); Btn_PutCreateButtonInline (NumNicks ? Txt_Change_nickname : // I already have a nickname Txt_Save_changes); // I have no nickname yet); diff --git a/swad_notice.c b/swad_notice.c index af6bd9b6..b8b68299 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -100,7 +100,7 @@ static long Not_GetParamNotCod (void); void Not_ShowFormNotice (void) { extern const char *Hlp_COMMUNICATION_Notices; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_The_notice_will_appear_as_a_yellow_note_; extern const char *Txt_New_notice; extern const char *Txt_Create_notice; @@ -119,9 +119,9 @@ void Not_ShowFormNotice (void) /***** Message body *****/ HTM_TEXTAREA_Begin ("name=\"Content\" cols=\"30\" rows=\"10\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " autofocus=\"autofocus\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TEXTAREA_End (); /***** Send button and end box *****/ diff --git a/swad_password.c b/swad_password.c index 2b36eb6c..16fe7e55 100644 --- a/swad_password.c +++ b/swad_password.c @@ -252,7 +252,7 @@ void Pwd_ShowFormSendNewPwd (void) { extern const char *Hlp_PROFILE_Password; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_If_you_have_forgotten_your_password_; extern const char *Txt_Forgotten_password; extern const char *Txt_nick_email_or_ID; @@ -274,8 +274,8 @@ void Pwd_ShowFormSendNewPwd (void) HTM_TxtColonNBSP (Txt_nick_email_or_ID); HTM_INPUT_TEXT ("UsrId",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrIdLogin, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"8\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"8\" class=\"INPUT_%s\" required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_LABEL_End (); /***** Send button and end box *****/ @@ -582,7 +582,7 @@ void Pwd_ShowFormChgMyPwd (void) { extern const char *Hlp_PROFILE_Password; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Before_going_to_any_other_option_you_must_create_your_password; extern const char *Txt_Your_password_is_not_secure_enough; extern const char *Txt_Your_password_must_be_at_least_X_characters_and_can_not_contain_spaces_; @@ -631,8 +631,8 @@ void Pwd_ShowFormChgMyPwd (void) /* Data */ HTM_TD_Begin ("class=\"REC_C2_BOT LM\""); HTM_INPUT_PASSWORD ("UsrPwd",NULL,"off",true, - "id=\"UsrPwd\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"UsrPwd\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -668,7 +668,7 @@ void Pwd_ShowFormChgMyPwd (void) void Pwd_PutFormToGetNewPasswordOnce (void) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Password; extern const char *Txt_HELP_password; @@ -681,8 +681,8 @@ void Pwd_PutFormToGetNewPasswordOnce (void) /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_INPUT_PASSWORD ("Paswd",Txt_HELP_password,NULL,true, - "id=\"Paswd\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Paswd\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -695,7 +695,7 @@ void Pwd_PutFormToGetNewPasswordOnce (void) void Pwd_PutFormToGetNewPasswordTwice (void) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_password; extern const char *Txt_Retype_new_password; extern const char *Txt_HELP_password; @@ -709,8 +709,8 @@ void Pwd_PutFormToGetNewPasswordTwice (void) /* Data */ HTM_TD_Begin ("class=\"REC_C2_BOT LM\""); HTM_INPUT_PASSWORD ("Paswd1",Txt_HELP_password,NULL,true, - "id=\"Paswd1\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Paswd1\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -724,8 +724,8 @@ void Pwd_PutFormToGetNewPasswordTwice (void) /* Data */ HTM_TD_Begin ("class=\"REC_C2_BOT LM\""); HTM_INPUT_PASSWORD ("Paswd2",Txt_HELP_password,NULL,true, - "id=\"Paswd2\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Paswd2\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -793,7 +793,7 @@ void Pwd_ShowFormChgOtherUsrPwd (void) void Pwd_AskForConfirmationOnDangerousAction (void) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_I_understand_that_this_action_can_not_be_undone; extern const char *Txt_For_security_enter_your_password; @@ -812,8 +812,8 @@ void Pwd_AskForConfirmationOnDangerousAction (void) HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_For_security_enter_your_password); HTM_INPUT_PASSWORD ("OthUsrPwd",NULL,"off",true, - "class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_LABEL_End (); HTM_DIV_End (); diff --git a/swad_photo.c b/swad_photo.c index 95c1aaa0..96e6d986 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -1784,7 +1784,7 @@ static void Pho_PutParamsDegPhoto (void *DegPhotos) static void Pho_PutSelectorForTypeOfAvg (const struct Pho_DegPhotos *DegPhotos) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Average_type; extern const char *Txt_AVERAGE_PHOTO_TYPES[Pho_NUM_AVERAGE_PHOTO_TYPES]; Pho_AvgPhotoTypeOfAverage_t TypeOfAvg; @@ -1803,8 +1803,9 @@ static void Pho_PutSelectorForTypeOfAvg (const struct Pho_DegPhotos *DegPhotos) Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees); Set_PutParamsPrefsAboutUsrList (); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "id=\"AvgType\" name=\"AvgType\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"AvgType\" name=\"AvgType\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (TypeOfAvg = (Pho_AvgPhotoTypeOfAverage_t) 0; TypeOfAvg <= (Pho_AvgPhotoTypeOfAverage_t) (Pho_NUM_AVERAGE_PHOTO_TYPES - 1); TypeOfAvg++) @@ -1850,7 +1851,7 @@ static Pho_AvgPhotoTypeOfAverage_t Pho_GetPhotoAvgTypeFromForm (void) static void Pho_PutSelectorForHowComputePhotoSize (const struct Pho_DegPhotos *DegPhotos) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Size_of_photos; extern const char *Txt_STAT_DEGREE_PHOTO_SIZE[Pho_NUM_HOW_COMPUTE_PHOTO_SIZES]; Pho_HowComputePhotoSize_t PhoSi; @@ -1869,8 +1870,9 @@ static void Pho_PutSelectorForHowComputePhotoSize (const struct Pho_DegPhotos *D Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees); Set_PutParamsPrefsAboutUsrList (); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "id=\"PhotoSize\" name=\"PhotoSize\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"PhotoSize\" name=\"PhotoSize\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (PhoSi = (Pho_HowComputePhotoSize_t) 0; PhoSi <= (Pho_HowComputePhotoSize_t) (Pho_NUM_HOW_COMPUTE_PHOTO_SIZES - 1); PhoSi++) @@ -1916,7 +1918,7 @@ static Pho_HowComputePhotoSize_t Pho_GetHowComputePhotoSizeFromForm (void) static void Pho_PutSelectorForHowOrderDegrees (const struct Pho_DegPhotos *DegPhotos) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Sort_degrees_by; extern const char *Txt_STAT_DEGREE_PHOTO_ORDER[Pho_NUM_HOW_ORDER_DEGREES]; Pho_HowOrderDegrees_t Order; @@ -1935,8 +1937,8 @@ static void Pho_PutSelectorForHowOrderDegrees (const struct Pho_DegPhotos *DegPh Pho_PutHiddenParamPhotoSize (DegPhotos->HowComputePhotoSize); Set_PutParamsPrefsAboutUsrList (); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "id=\"Order\" name=\"Order\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Order\" name=\"Order\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Order = (Pho_HowOrderDegrees_t) 0; Order <= (Pho_HowOrderDegrees_t) (Pho_NUM_HOW_ORDER_DEGREES - 1); Order++) @@ -2000,7 +2002,7 @@ static void Pho_PutLinkToPrintViewOfDegreeStatsParams (void *DegPhotos) static void Pho_PutLinkToCalculateDegreeStats (const struct Pho_DegPhotos *DegPhotos) { extern const char *The_ClassFormLinkInBoxBold[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Calculate_average_photo_of_THE_DEGREE_X; extern const char *Txt_unknown_TIME; extern const char *Txt_time; @@ -2039,8 +2041,8 @@ static void Pho_PutLinkToCalculateDegreeStats (const struct Pho_DegPhotos *DegPh /* Selector with all degrees with students */ HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"OthDegCod\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"OthDegCod\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (NumDeg = 0; NumDeg < Degs.Num; NumDeg++) diff --git a/swad_place.c b/swad_place.c index f2525907..5fd20473 100644 --- a/swad_place.c +++ b/swad_place.c @@ -463,7 +463,6 @@ void Plc_FreeListPlaces (struct Plc_Places *Places) static void Plc_ListPlacesForEdition (const struct Plc_Places *Places) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; unsigned NumPlc; struct Plc_Place *Plc; @@ -502,8 +501,8 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places) Plc_PutParamPlcCod (&Plc->PlcCod); HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc->ShrtName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -513,8 +512,8 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places) Plc_PutParamPlcCod (&Plc->PlcCod); HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc->FullName, HTM_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_FULL_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -711,7 +710,6 @@ void Plc_ContEditAfterChgPlc (void) static void Plc_PutFormToCreatePlace (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_place; extern const char *Txt_Create_place; @@ -740,18 +738,18 @@ static void Plc_PutFormToCreatePlace (void) HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc_EditingPlc->ShrtName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_SHORT_NAME %s\"" + "class=\"INPUT_SHORT_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Place full name *****/ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc_EditingPlc->FullName, HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"INPUT_FULL_NAME %s\"" + "class=\"INPUT_FULL_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Number of centers *****/ diff --git a/swad_plugin.c b/swad_plugin.c index 3a66d081..bde24f3e 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -329,7 +329,6 @@ void Plg_FreeListPlugins (void) static void Plg_ListPluginsForEdition (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; unsigned NumPlg; struct Plugin *Plg; char *Icon; @@ -377,8 +376,8 @@ static void Plg_ListPluginsForEdition (void) Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg->Name, HTM_SUBMIT_ON_CHANGE, - "size=\"10\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"10\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -388,8 +387,8 @@ static void Plg_ListPluginsForEdition (void) Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg->Description, HTM_SUBMIT_ON_CHANGE, - "size=\"30\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"30\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -399,8 +398,8 @@ static void Plg_ListPluginsForEdition (void) Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg->Logo, HTM_SUBMIT_ON_CHANGE, - "size=\"4\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"4\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -410,8 +409,8 @@ static void Plg_ListPluginsForEdition (void) Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg->AppKey, HTM_SUBMIT_ON_CHANGE, - "size=\"16\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"16\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -420,8 +419,8 @@ static void Plg_ListPluginsForEdition (void) Frm_BeginForm (ActChgPlgURL); Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_URL ("URL",Plg->URL,HTM_SUBMIT_ON_CHANGE, - "size=\"15\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"15\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -430,8 +429,8 @@ static void Plg_ListPluginsForEdition (void) Frm_BeginForm (ActChgPlgIP); Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg->IP,HTM_SUBMIT_ON_CHANGE, - "size=\"10\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"10\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -778,7 +777,7 @@ void Plg_ContEditAfterChgPlg (void) static void Plg_PutFormToCreatePlugin (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_plugin; extern const char *Txt_Name; extern const char *Txt_Description; @@ -813,8 +812,9 @@ static void Plg_PutFormToCreatePlugin (void) HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg_EditingPlg->Name, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"10\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"10\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Plugin description *****/ @@ -822,39 +822,44 @@ static void Plg_PutFormToCreatePlugin (void) HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION, Plg_EditingPlg->Description, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"30\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"30\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Plugin logo *****/ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg_EditingPlg->Logo, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"4\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"4\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Plugin application key *****/ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg_EditingPlg->AppKey, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"16\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"16\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Plugin URL *****/ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_URL ("URL",Plg_EditingPlg->URL,HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"15\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"15\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Plugin IP address *****/ HTM_TD_Begin ("class=\"CM\""); HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg_EditingPlg->IP, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"10\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"10\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Row end *****/ diff --git a/swad_profile.c b/swad_profile.c index de8ea7c9..1ef4afa1 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -176,7 +176,7 @@ void Prf_RequestUserProfile (void) extern const char *Hlp_START_Profiles_view_public_profile; extern const char *Txt_Another_user_s_profile; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Nickname; extern const char *Txt_Continue; char NickWithArr[Nck_MAX_BYTES_NICK_WITH_ARROBA + 1]; @@ -208,8 +208,9 @@ void Prf_RequestUserProfile (void) Gbl.Usrs.Me.UsrDat.Nickname); HTM_INPUT_TEXT ("usr",sizeof (NickWithArr) - 1,NickWithArr, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"18\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"18\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_LABEL_End (); /***** Send button and end box *****/ diff --git a/swad_program.c b/swad_program.c index 925e08d9..00264c35 100644 --- a/swad_program.c +++ b/swad_program.c @@ -1750,7 +1750,7 @@ static void Prg_ShowFormItem (const struct Prg_Item *Item, const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME], const char *Txt) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Title; extern const char *Txt_Description; @@ -1765,9 +1765,9 @@ static void Prg_ShowFormItem (const struct Prg_Item *Item, HTM_INPUT_TEXT ("Title",Prg_MAX_CHARS_PROGRAM_ITEM_TITLE,Item->Title, HTM_DONT_SUBMIT_ON_CHANGE, "id=\"Title\"" - " class=\"PRG_TITLE_DESCRIPTION_WIDTH %s\"" + " class=\"PRG_TITLE_DESCRIPTION_WIDTH INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -1786,8 +1786,8 @@ static void Prg_ShowFormItem (const struct Prg_Item *Item, /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" rows=\"25\"" - " class=\"PRG_TITLE_DESCRIPTION_WIDTH %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"PRG_TITLE_DESCRIPTION_WIDTH INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); if (Txt) if (Txt[0]) HTM_Txt (Txt); diff --git a/swad_project.c b/swad_project.c index 0d7f2577..05cf9028 100644 --- a/swad_project.c +++ b/swad_project.c @@ -744,7 +744,7 @@ static void Prj_ShowFormToFilterByWarning (const struct Prj_Projects *Projects) static void Prj_ShowFormToFilterByDpt (const struct Prj_Projects *Projects) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Any_department; struct Prj_Filter Filter; char *SelectClass; @@ -763,8 +763,8 @@ static void Prj_ShowFormToFilterByDpt (const struct Prj_Projects *Projects) -1L); /***** Write selector with departments *****/ - if (asprintf (&SelectClass,"TITLE_DESCRIPTION_WIDTH %s", - The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&SelectClass,"TITLE_DESCRIPTION_WIDTH INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); Dpt_WriteSelectorDepartment (Gbl.Hierarchy.Ins.InsCod, // Departments in current insitution Projects->Filter.DptCod, // Selected department @@ -3299,7 +3299,6 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects, extern const char *Hlp_ASSESSMENT_Projects_edit_project; extern const char *The_ClassFormInBox[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_project; extern const char *Txt_Edit_project; extern const char *Txt_Data; @@ -3377,9 +3376,9 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects, HTM_INPUT_TEXT ("Title",Prj_MAX_CHARS_PROJECT_TITLE,Prj->Title, HTM_DONT_SUBMIT_ON_CHANGE, "id=\"Title\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"" + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -3392,8 +3391,8 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects, /* Data */ HTM_TD_Begin ("class=\"LT\""); - if (asprintf (&SelectClass,"TITLE_DESCRIPTION_WIDTH %s", - The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&SelectClass,"TITLE_DESCRIPTION_WIDTH INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); Dpt_WriteSelectorDepartment (Gbl.Hierarchy.Ins.InsCod, // Departments in current institution Prj->DptCod, // Selected department @@ -3415,8 +3414,8 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects, HTM_TD_Begin ("class=\"LM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"Assigned\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"Assigned\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"Y",Prj->Assigned == Prj_ASSIGNED,false, "%s",Txt_Yes); HTM_OPTION (HTM_Type_STRING,"N",Prj->Assigned == Prj_NONASSIG,false, @@ -3436,8 +3435,8 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects, HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_LONG ("NumStds",(long) 0,(long) UINT_MAX,(long) Prj->NumStds, HTM_DONT_SUBMIT_ON_CHANGE,false, - "class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -3452,8 +3451,8 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects, HTM_TD_Begin ("class=\"LM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "name=\"Proposal\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Proposal = (Prj_Proposal_t) 0; Proposal <= (Prj_Proposal_t) (Prj_NUM_PROPOSAL_TYPES - 1); Proposal++) @@ -3492,8 +3491,8 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects, /* Data */ HTM_TD_Begin ("class=\"LT DAT_%s\"",The_Colors[Gbl.Prefs.Theme]); HTM_INPUT_URL ("URL",Prj->URL,HTM_DONT_SUBMIT_ON_CHANGE, - "class=\"TITLE_DESCRIPTION_WIDTH %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -3520,7 +3519,7 @@ static void Prj_EditOneProjectTxtArea (const char *Id, unsigned NumRows,bool Required) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; /***** Description *****/ HTM_TR_Begin (NULL); @@ -3531,9 +3530,9 @@ static void Prj_EditOneProjectTxtArea (const char *Id, /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"%s\" name=\"%s\" rows=\"%u\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"%s", + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"%s", Id,Id,NumRows, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Required ? " required=\"required\"" : ""); HTM_Txt (TxtField); diff --git a/swad_question.c b/swad_question.c index b31b34d8..ac4b75ac 100644 --- a/swad_question.c +++ b/swad_question.c @@ -649,7 +649,7 @@ void Qst_PutFormToEditQstMedia (const struct Med_Media *Media,int NumMedia, bool OptionsDisabled) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_No_image_video; extern const char *Txt_Current_image_video; extern const char *Txt_Change_image_video; @@ -697,7 +697,8 @@ void Qst_PutFormToEditQstMedia (const struct Med_Media *Media,int NumMedia, OptionsDisabled ? " disabled=\"disabled\"" : ""); HTM_TxtColonNBSP (Txt_Change_image_video); HTM_LABEL_End (); - if (asprintf (&ClassInput,"Tst_MED_INPUT %s",The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&ClassInput,"Tst_MED_INPUT INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); Med_PutMediaUploader (NumMedia,ClassInput); free (ClassInput); @@ -708,7 +709,8 @@ void Qst_PutFormToEditQstMedia (const struct Med_Media *Media,int NumMedia, else // No current image { /***** Attached media *****/ - if (asprintf (&ClassInput,"Tst_MED_INPUT %s",The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&ClassInput,"Tst_MED_INPUT INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); Med_PutMediaUploader (NumMedia,ClassInput); free (ClassInput); @@ -1867,7 +1869,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question) { extern const char *Hlp_ASSESSMENT_Questions_writing_a_question; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Question_code_X; extern const char *Txt_New_question; extern const char *Txt_Tags; @@ -1954,10 +1956,10 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question) HTM_TD_Begin ("class=\"LM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"SelTag%u\" name=\"SelTag%u\"" - " class=\"TAG_SEL %s\"" + " class=\"TAG_SEL INPUT_%s\"" " onchange=\"changeTxtTag('%u')\"", IndTag,IndTag, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], IndTag); HTM_OPTION (HTM_Type_STRING,"",false,false," "); mysql_data_seek (mysql_res,0); @@ -1999,10 +2001,10 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question) snprintf (StrTagTxt,sizeof (StrTagTxt),"TagTxt%u",IndTag); HTM_INPUT_TEXT (StrTagTxt,Tag_MAX_CHARS_TAG,Question->Tags.Txt[IndTag], HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"%s\" class=\"TAG_TXT %s\"" + "id=\"%s\" class=\"TAG_TXT INPUT_%s\"" " onchange=\"changeSelTag('%u')\"", StrTagTxt, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], IndTag); HTM_TD_End (); @@ -2026,9 +2028,9 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question) /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Stem\" name=\"Stem\" rows=\"5\"" - " class=\"STEM_TEXTAREA %s\"" + " class=\"STEM_TEXTAREA INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Question->Stem); HTM_TEXTAREA_End (); HTM_BR (); @@ -2040,8 +2042,8 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question) HTM_TxtF ("%s (%s):",Txt_Feedback,Txt_optional); HTM_BR (); HTM_TEXTAREA_Begin ("name=\"Feedback\" rows=\"2\"" - " class=\"STEM_TEXTAREA %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"STEM_TEXTAREA INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); if (Question->Feedback[0]) HTM_Txt (Question->Feedback); HTM_TEXTAREA_End (); @@ -2090,9 +2092,9 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question) snprintf (StrInteger,sizeof (StrInteger),"%ld",Question->Answer.Integer); HTM_INPUT_TEXT ("AnsInt",Cns_MAX_DECIMAL_DIGITS_LONG,StrInteger, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"11\" class=\"%s\"" + "size=\"11\" class=\"INPUT_%s\"" " required=\"required\"%s", - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Question->Answer.Type == Qst_ANS_INT ? "" : " disabled=\"disabled\""); HTM_LABEL_End (); @@ -2233,9 +2235,9 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question) /* Answer text */ HTM_TEXTAREA_Begin ("name=\"AnsStr%u\" rows=\"5\"" - " class=\"ANSWER_TEXTAREA %s\"%s", + " class=\"ANSWER_TEXTAREA INPUT_%s\"%s", NumOpt, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], OptionsDisabled ? " disabled=\"disabled\"" : ""); if (AnswerHasContent) @@ -2252,9 +2254,9 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question) HTM_TxtF ("%s (%s):",Txt_Feedback,Txt_optional); HTM_BR (); HTM_TEXTAREA_Begin ("name=\"FbStr%u\" rows=\"2\"" - " class=\"ANSWER_TEXTAREA %s\"%s", + " class=\"ANSWER_TEXTAREA INPUT_%s\"%s", NumOpt, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], OptionsDisabled ? " disabled=\"disabled\"" : ""); if (Question->Answer.Options[NumOpt].Feedback) @@ -2298,7 +2300,7 @@ void Qst_PutFloatInputField (const char *Label,const char *Field, unsigned Index) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; char StrDouble[32]; HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); @@ -2307,8 +2309,8 @@ void Qst_PutFloatInputField (const char *Label,const char *Field, Question->Answer.FloatingPoint[Index]); HTM_INPUT_TEXT (Field,Qst_MAX_BYTES_FLOAT_ANSWER,StrDouble, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"11\" class=\"%s\" required=\"required\"%s", - The_ClassInput[Gbl.Prefs.Theme], + "size=\"11\" class=\"INPUT_%s\" required=\"required\"%s", + The_Colors[Gbl.Prefs.Theme], Question->Answer.Type == Qst_ANS_FLOAT ? "" : " disabled=\"disabled\""); HTM_LABEL_End (); diff --git a/swad_record.c b/swad_record.c index 72e0c8af..12458a8d 100644 --- a/swad_record.c +++ b/swad_record.c @@ -253,7 +253,7 @@ void Rec_GetListRecordFieldsInCurrentCrs (void) void Rec_ListFieldsRecordsForEdition (void) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY]; unsigned NumField; Rec_VisibilityRecordFields_t Vis; @@ -283,8 +283,8 @@ void Rec_ListFieldsRecordsForEdition (void) HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD, Gbl.Crs.Records.LstFields.Lst[NumField].Name, HTM_SUBMIT_ON_CHANGE, - "class=\"REC_FIELDNAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"REC_FIELDNAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -296,8 +296,8 @@ void Rec_ListFieldsRecordsForEdition (void) Gbl.Crs.Records.LstFields.Lst[NumField].NumLines); HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines, HTM_SUBMIT_ON_CHANGE, - "size=\"2\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"2\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -306,8 +306,8 @@ void Rec_ListFieldsRecordsForEdition (void) Frm_BeginForm (ActChgVisFie); Rec_PutParamFieldCod (&Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "name=\"Visibility\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"Visibility\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Vis = (Rec_VisibilityRecordFields_t) 0; Vis <= (Rec_VisibilityRecordFields_t) (Rec_NUM_TYPES_VISIBILITY - 1); Vis++) @@ -332,7 +332,7 @@ void Rec_ListFieldsRecordsForEdition (void) void Rec_ShowFormCreateRecordField (void) { extern const char *Hlp_USERS_Students_course_record_card; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_record_field; extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY]; extern const char *Txt_Create_record_field; @@ -362,8 +362,9 @@ void Rec_ShowFormCreateRecordField (void) 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 %s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"REC_FIELDNAME INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Number of lines in form ******/ @@ -372,15 +373,16 @@ void Rec_ShowFormCreateRecordField (void) Gbl.Crs.Records.Field.NumLines); HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"2\" class=\"%s\" required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"2\" class=\"INPUT_%s\"" + " required=\"required\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Visibility to students *****/ HTM_TD_Begin ("class=\"CM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"Visibility\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"Visibility\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Vis = (Rec_VisibilityRecordFields_t) 0; Vis <= (Rec_VisibilityRecordFields_t) (Rec_NUM_TYPES_VISIBILITY - 1); Vis++) @@ -1576,7 +1578,6 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView, { extern const char *Hlp_USERS_Students_course_record_card; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_RECORD_FIELD_VISIBILITY_RECORD[Rec_NUM_TYPES_VISIBILITY]; extern const char *Txt_Save_changes; @@ -1753,10 +1754,10 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView, if (ICanEditThisField) // Show with form { HTM_TEXTAREA_Begin ("name=\"Field%ld\" rows=\"%u\"" - " class=\"REC_C2_BOT_INPUT %s\"", + " class=\"REC_C2_BOT_INPUT INPUT_%s\"", Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod, Gbl.Crs.Records.LstFields.Lst[NumField].NumLines, - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); if (ThisFieldHasText) HTM_Txt (row[0]); HTM_TEXTAREA_End (); @@ -2790,7 +2791,6 @@ static void Rec_ShowRole (struct UsrData *UsrDat, { extern const char *Usr_StringsSexIcons[Usr_NUM_SEXS]; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Role; extern const char *Txt_Sex; extern const char *Txt_SEX_SINGULAR_Abc[Usr_NUM_SEXS]; @@ -2833,8 +2833,9 @@ static void Rec_ShowRole (struct UsrData *UsrDat, /***** Selector of role *****/ HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Role\" name=\"Role\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Role\" name=\"Role\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Role = Rol_STD; Role <= Rol_TCH; Role++) @@ -2896,8 +2897,9 @@ static void Rec_ShowRole (struct UsrData *UsrDat, /***** Selector of role *****/ HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Role\" name=\"Role\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Role\" name=\"Role\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); switch (Gbl.Usrs.Me.Role.Logged) { case Rol_GST: @@ -2938,8 +2940,9 @@ static void Rec_ShowRole (struct UsrData *UsrDat, /***** Selector of role *****/ HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Role\" name=\"Role\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Role\" name=\"Role\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); RoleUnsigned = (unsigned) DefaultRoleInForm; HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned,true,true, "%s",Txt_ROLES_SINGUL_Abc[DefaultRoleInForm][UsrDat->Sex]); @@ -2974,8 +2977,9 @@ static void Rec_ShowRole (struct UsrData *UsrDat, /***** Selector of role *****/ HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Role\" name=\"Role\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Role\" name=\"Role\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (Role = Rol_STD; Role <= Rol_TCH; Role++) @@ -2996,8 +3000,9 @@ static void Rec_ShowRole (struct UsrData *UsrDat, case Rol_SYS_ADM: /***** Selector of role *****/ HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Role\" name=\"Role\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Role\" name=\"Role\"" + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); RoleUnsigned = (unsigned) Rol_GST; HTM_OPTION (HTM_Type_UNSIGNED,&RoleUnsigned, true,false, @@ -3062,7 +3067,6 @@ static void Rec_ShowRole (struct UsrData *UsrDat, static void Rec_ShowSurname1 (struct UsrData *UsrDat,bool PutForm) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Surname_1; char *Label; @@ -3085,9 +3089,9 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat,bool PutForm) if (PutForm) HTM_INPUT_TEXT ("Surname1",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME,UsrDat->Surname1, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Surname1\" class=\"REC_C2_BOT_INPUT %s\"" + "id=\"Surname1\" class=\"REC_C2_BOT_INPUT INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); else if (UsrDat->Surname1[0]) { HTM_STRONG_Begin (); @@ -3106,7 +3110,6 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat,bool PutForm) static void Rec_ShowSurname2 (struct UsrData *UsrDat,bool PutForm) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Surname_2; HTM_TR_Begin (NULL); @@ -3123,8 +3126,9 @@ static void Rec_ShowSurname2 (struct UsrData *UsrDat,bool PutForm) HTM_INPUT_TEXT ("Surname2",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME, UsrDat->Surname2, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"Surname2\" class=\"REC_C2_BOT_INPUT %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Surname2\"" + " class=\"REC_C2_BOT_INPUT INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); else if (UsrDat->Surname2[0]) { HTM_STRONG_Begin (); @@ -3143,7 +3147,6 @@ static void Rec_ShowSurname2 (struct UsrData *UsrDat,bool PutForm) static void Rec_ShowFirstName (struct UsrData *UsrDat,bool PutForm) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_First_name; char *Label; @@ -3167,9 +3170,10 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,bool PutForm) HTM_INPUT_TEXT ("FirstName",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME, UsrDat->FrstName, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"FirstName\" class=\"REC_C2_BOT_INPUT %s\"" + "id=\"FirstName\"" + " class=\"REC_C2_BOT_INPUT INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); else if (UsrDat->FrstName[0]) { HTM_STRONG_Begin (); @@ -3187,7 +3191,7 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,bool PutForm) static void Rec_ShowCountry (struct UsrData *UsrDat,bool PutForm) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Country; extern const char *Txt_Another_country; char *Label; @@ -3214,9 +3218,9 @@ static void Rec_ShowCountry (struct UsrData *UsrDat,bool PutForm) HTM_TD_Begin ("colspan=\"2\" class=\"REC_C2_BOT LM\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"OthCtyCod\" name=\"OthCtyCod\"" - " class=\"REC_C2_BOT_INPUT %s\"" + " class=\"REC_C2_BOT_INPUT INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"",false,false, "%s",Txt_Country); HTM_OPTION (HTM_Type_STRING,"0",UsrDat->CtyCod == 0,false, @@ -3280,7 +3284,6 @@ static void Rec_ShowPhone (struct UsrData *UsrDat,bool ShowData,bool PutForm, unsigned NumPhone) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Phone; char *Name; char *Label; @@ -3309,9 +3312,9 @@ static void Rec_ShowPhone (struct UsrData *UsrDat,bool ShowData,bool PutForm, if (PutForm) HTM_INPUT_TEL (Name,UsrDat->Phone[NumPhone], HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"%s\" class=\"REC_C2_BOT_INPUT %s\"", + "id=\"%s\" class=\"REC_C2_BOT_INPUT INPUT_%s\"", Name, - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); else if (UsrDat->Phone[NumPhone][0]) { HTM_A_Begin ("href=\"tel:%s\" class=\"DAT_STRONG_%s\"", @@ -3338,7 +3341,6 @@ static void Rec_ShowPhone (struct UsrData *UsrDat,bool ShowData,bool PutForm, static void Rec_ShowComments (struct UsrData *UsrDat,bool ShowData,bool PutForm) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_USER_comments; /***** Comments *****/ @@ -3357,8 +3359,9 @@ static void Rec_ShowComments (struct UsrData *UsrDat,bool ShowData,bool PutForm) if (PutForm) { HTM_TEXTAREA_Begin ("id=\"Comments\" name=\"Comments\"" - " rows=\"4\" class=\"REC_C2_BOT_INPUT %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " rows=\"4\"" + " class=\"REC_C2_BOT_INPUT INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (UsrDat->Comments); HTM_TEXTAREA_End (); } @@ -3798,7 +3801,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) { extern const char *Hlp_PROFILE_Institution; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Institution_center_and_department; extern const char *Txt_Institution; extern const char *Txt_Country; @@ -3845,8 +3848,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) Frm_BeginFormAnchor (ActChgCtyMyIns,Rec_MY_INS_CTR_DPT_ID); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"InsCtyCod\" name=\"OthCtyCod\"" - " class=\"REC_C2_BOT_INPUT %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"REC_C2_BOT_INPUT INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"-1", Gbl.Usrs.Me.UsrDat.InsCtyCod <= 0,true, NULL); @@ -3884,8 +3887,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) Frm_BeginFormAnchor (ActChgMyIns,Rec_MY_INS_CTR_DPT_ID); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthInsCod\" name=\"OthInsCod\"" - " class=\"REC_C2_BOT_INPUT %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"REC_C2_BOT_INPUT INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"-1", Gbl.Usrs.Me.UsrDat.InsCod < 0,true, NULL); @@ -3927,8 +3930,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) Frm_BeginFormAnchor (ActChgMyCtr,Rec_MY_INS_CTR_DPT_ID); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthCtrCod\" name=\"OthCtrCod\"" - " class=\"REC_C2_BOT_INPUT %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"REC_C2_BOT_INPUT INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"-1", Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0,true, NULL); @@ -3959,8 +3962,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) /* Data */ HTM_TD_Begin ("class=\"REC_C2_BOT LM\""); Frm_BeginFormAnchor (ActChgMyDpt,Rec_MY_INS_CTR_DPT_ID); - if (asprintf (&SelectClass,"REC_C2_BOT_INPUT %s", - The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&SelectClass,"REC_C2_BOT_INPUT INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); Dpt_WriteSelectorDepartment (Gbl.Usrs.Me.UsrDat.InsCod, // Departments in my institution Gbl.Usrs.Me.UsrDat.Tch.DptCod, // Selected department @@ -3985,8 +3988,9 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) Frm_BeginFormAnchor (ActChgMyOff,Rec_MY_INS_CTR_DPT_ID); HTM_INPUT_TEXT ("Office",Usr_MAX_CHARS_ADDRESS,Gbl.Usrs.Me.UsrDat.Tch.Office, HTM_SUBMIT_ON_CHANGE, - "id=\"Office\" class=\"REC_C2_BOT_INPUT %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"Office\"" + " class=\"REC_C2_BOT_INPUT INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -4003,8 +4007,9 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) Frm_BeginFormAnchor (ActChgMyOffPho,Rec_MY_INS_CTR_DPT_ID); HTM_INPUT_TEL ("OfficePhone",Gbl.Usrs.Me.UsrDat.Tch.OfficePhone, HTM_SUBMIT_ON_CHANGE, - "id=\"OfficePhone\" class=\"REC_C2_BOT_INPUT %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"OfficePhone\"" + " class=\"REC_C2_BOT_INPUT INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); diff --git a/swad_role.c b/swad_role.c index 666b8f5a..02b4f69f 100644 --- a/swad_role.c +++ b/swad_role.c @@ -544,7 +544,7 @@ void Rol_ChangeMyRole (void) void Rol_WriteSelectorRoles (unsigned RolesAllowed,unsigned RolesSelected, bool Disabled,HTM_SubmitOnChange_t SubmitOnChange) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_ROLES_PLURAL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; Rol_Role_t Role; @@ -555,9 +555,9 @@ void Rol_WriteSelectorRoles (unsigned RolesAllowed,unsigned RolesSelected, { HTM_LABEL_Begin (NULL); HTM_INPUT_CHECKBOX ("Role",SubmitOnChange, - "id=\"Role\" value=\"%u\" class=\"%s\"%s%s", + "id=\"Role\" value=\"%u\" class=\"INPUT_%s\"%s%s", (unsigned) Role, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], (RolesSelected & (1 << Role)) ? " checked=\"checked\"" : "", Disabled ? " disabled=\"disabled\"" : diff --git a/swad_room.c b/swad_room.c index aae74e47..2d9cb923 100644 --- a/swad_room.c +++ b/swad_room.c @@ -664,7 +664,6 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings, const struct Roo_Rooms *Rooms) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; unsigned NumRoom; struct Roo_Room *Room; char *Anchor = NULL; @@ -715,8 +714,8 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings, Roo_PutParamRooCod (&Room->RooCod); HTM_INPUT_LONG ("Floor",(long) INT_MIN,(long) INT_MAX,(long) Room->Floor, HTM_SUBMIT_ON_CHANGE,false, - "class=\"INPUT_LONG %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_LONG INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -735,8 +734,9 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings, Roo_PutParamRooCod (&Room->RooCod); HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Room->ShrtName, HTM_SUBMIT_ON_CHANGE, - "size=\"10\" class=\"INPUT_SHORT_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"10\"" + " class=\"INPUT_SHORT_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -746,8 +746,9 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings, Roo_PutParamRooCod (&Room->RooCod); HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Room->FullName, HTM_SUBMIT_ON_CHANGE, - "size=\"20\" class=\"INPUT_FULL_NAME %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"20\"" + " class=\"INPUT_FULL_NAME INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -758,8 +759,8 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings, Roo_WriteCapacity (StrCapacity,Room->Capacity); HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity, HTM_SUBMIT_ON_CHANGE, - "size=\"3\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"3\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); @@ -783,15 +784,15 @@ static void Roo_PutSelectorBuilding (long BldCod, const struct Bld_Buildings *Buildings, HTM_SubmitOnChange_t SubmitOnChange) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_No_assigned_building; extern const char *Txt_Another_building; unsigned NumBld; /***** Begin selector *****/ HTM_SELECT_Begin (SubmitOnChange, - "name=\"BldCod\" class=\"BLD_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"BldCod\" class=\"BLD_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); /***** Option for no assigned building *****/ HTM_OPTION (HTM_Type_STRING,"-1", @@ -822,14 +823,14 @@ static void Roo_PutSelectorBuilding (long BldCod, static void Roo_PutSelectorType (Roo_RoomType_t RoomType, HTM_SubmitOnChange_t SubmitOnChange) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_ROOM_TYPES[Roo_NUM_TYPES]; Roo_RoomType_t Type; /***** Begin selector *****/ HTM_SELECT_Begin (SubmitOnChange, - "name=\"Type\" class=\"ROOM_TYPE_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"Type\" class=\"ROOM_TYPE_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); /***** Options for types *****/ for (Type = (Roo_RoomType_t) 0; @@ -1256,7 +1257,7 @@ void Roo_ContEditAfterChgRoom (void) static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_room; extern const char *Txt_Create_room; char StrCapacity[Cns_MAX_DECIMAL_DIGITS_UINT + 1]; @@ -1293,8 +1294,8 @@ static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings) HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_LONG ("Floor",(long) INT_MIN,(long) INT_MAX,(long) Roo_EditingRoom->Floor, HTM_DONT_SUBMIT_ON_CHANGE,false, - "class=\"INPUT_LONG %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "class=\"INPUT_LONG INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Room type *****/ @@ -1307,18 +1308,18 @@ static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings) HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Roo_EditingRoom->ShrtName, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"10\" class=\"INPUT_SHORT_NAME %s\"" + "size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Room full name *****/ HTM_TD_Begin ("class=\"LM\""); HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Roo_EditingRoom->FullName, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"20\" class=\"INPUT_FULL_NAME %s\"" + "size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** Seating capacity *****/ @@ -1326,8 +1327,8 @@ static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings) Roo_WriteCapacity (StrCapacity,Roo_EditingRoom->Capacity); HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"3\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"3\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); /***** MAC address *****/ @@ -1335,8 +1336,8 @@ static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings) MAC_MACnumToMACstr (Roo_EditingRoom->MACnum,MACstr); HTM_INPUT_TEXT ("MAC",MAC_LENGTH_MAC_ADDRESS,MACstr, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"8\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"8\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_scope.c b/swad_scope.c index 9ba58baf..0e60f715 100644 --- a/swad_scope.c +++ b/swad_scope.c @@ -46,7 +46,7 @@ extern struct Globals Gbl; void Sco_PutSelectorScope (const char *ParamName,HTM_SubmitOnChange_t SubmitOnChange) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_System; extern const char *Txt_Country; extern const char *Txt_Institution; @@ -58,8 +58,8 @@ void Sco_PutSelectorScope (const char *ParamName,HTM_SubmitOnChange_t SubmitOnCh bool WriteScope; HTM_SELECT_Begin (SubmitOnChange, - "id=\"%s\" name=\"%s\" class=\"%s\"", - ParamName,ParamName,The_ClassInput[Gbl.Prefs.Theme]); + "id=\"%s\" name=\"%s\" class=\"INPUT_%s\"", + ParamName,ParamName,The_Colors[Gbl.Prefs.Theme]); for (Scope = (HieLvl_Level_t) 0; Scope <= (HieLvl_Level_t) (HieLvl_NUM_LEVELS - 1); diff --git a/swad_search.c b/swad_search.c index a0cd1abe..5b96fd41 100644 --- a/swad_search.c +++ b/swad_search.c @@ -100,7 +100,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie { extern const char *Hlp_START_Search; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Scope; extern const char *Txt_SEARCH_X_in_Y; extern const char *Txt_all; @@ -170,8 +170,9 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtF (" %s ",Txt_SEARCH_X_in_Y); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"WhatToSearch\" class=\"WHAT_TO_SEARCH %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"WhatToSearch\"" + " class=\"WHAT_TO_SEARCH INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (WhatToSearch = (Sch_WhatToSearch_t) 0; WhatToSearch <= (Sch_WhatToSearch_t) (Sch_NUM_WHAT_TO_SEARCH - 1); WhatToSearch++) @@ -252,15 +253,16 @@ void Sch_PutFormToSearchInPageTopHeading (void) void Sch_PutInputStringToSearch (const char *IdInputText) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Search; /***** String to find *****/ // Input field not required, because it can be hidden (display:none) HTM_INPUT_SEARCH ("Search",Sch_MAX_CHARS_STRING_TO_FIND,Gbl.Search.Str, - "id=\"%s\" size=\"18\" class=\"%s\" placeholder=\"%s…\"", + "id=\"%s\" size=\"18\" class=\"INPUT_%s\"" + " placeholder=\"%s…\"", IdInputText, - The_ClassInput[Gbl.Prefs.Theme], + The_Colors[Gbl.Prefs.Theme], Txt_Search); } diff --git a/swad_statistic.c b/swad_statistic.c index 5d8f4c0d..d2f8369d 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -222,7 +222,7 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats) { extern const char *Hlp_ANALYTICS_Visits_visits_to_course; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Statistics_of_visits_to_the_course_X; extern const char *Txt_Users; extern const char *Txt_Show; @@ -372,8 +372,8 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats) HTM_TxtF (" %s ",Txt_distributed_by); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"GroupedBy\" name=\"GroupedBy\"" - " class=\%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (ClicksGroupedBy = Sta_CLICKS_CRS_PER_USR; ClicksGroupedBy <= Sta_CLICKS_CRS_PER_ACTION; ClicksGroupedBy++) @@ -473,7 +473,7 @@ static void Sta_PutFormGblHits (struct Sta_Stats *Stats) { extern const char *Hlp_ANALYTICS_Visits_global_visits; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Statistics_of_all_visits; extern const char *Txt_Users; extern const char *Txt_ROLE_STATS[Sta_NUM_ROLES_STAT]; @@ -519,8 +519,8 @@ static void Sta_PutFormGblHits (struct Sta_Stats *Stats) HTM_TD_Begin ("class=\"LT\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"Role\" name=\"Role\"" - " class=\"STAT_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"STAT_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (RoleStat = (Sta_Role_t) 0; RoleStat <= (Sta_Role_t) (Sta_NUM_ROLES_STAT - 1); RoleStat++) @@ -578,8 +578,8 @@ static void Sta_PutFormGblHits (struct Sta_Stats *Stats) Stats->ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAY; HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"GroupedBy\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"GroupedBy\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAY; ClicksGroupedBy <= Sta_CLICKS_GBL_PER_COURSE; ClicksGroupedBy++) @@ -652,15 +652,15 @@ void Sta_PutLinkToGlobalHits (void) static void Sta_WriteSelectorCountType (const struct Sta_Stats *Stats) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_STAT_TYPE_COUNT_SMALL[Sta_NUM_COUNT_TYPES]; Sta_CountType_t StatCountType; unsigned StatCountTypeUnsigned; /**** Count type *****/ HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"CountType\" name=\"CountType\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"CountType\" name=\"CountType\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (StatCountType = (Sta_CountType_t) 0; StatCountType <= (Sta_CountType_t) (Sta_NUM_COUNT_TYPES - 1); StatCountType++) @@ -680,7 +680,7 @@ static void Sta_WriteSelectorCountType (const struct Sta_Stats *Stats) static void Sta_WriteSelectorAction (const struct Sta_Stats *Stats) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Action; extern const char *Txt_Any_action; extern const char *Txt_TABS_TXT[Tab_NUM_TABS]; @@ -697,8 +697,8 @@ static void Sta_WriteSelectorAction (const struct Sta_Stats *Stats) HTM_TD_Begin ("class=\"LT\""); HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, "id=\"StatAct\" name=\"StatAct\"" - " class=\"STAT_SEL %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"STAT_SEL INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"0",Stats->NumAction == 0,false, "%s",Txt_Any_action); for (Action = (Act_Action_t) 1; diff --git a/swad_survey.c b/swad_survey.c index 8a7e31c7..bb941814 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -1648,7 +1648,6 @@ void Svy_RequestCreatOrEditSvy (void) extern const char *Hlp_ASSESSMENT_Surveys_edit_survey; extern const char *The_ClassFormInBox[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_survey; extern const char *Txt_Scope; extern const char *Txt_Edit_survey; @@ -1758,9 +1757,9 @@ void Svy_RequestCreatOrEditSvy (void) HTM_INPUT_TEXT ("Title",Svy_MAX_CHARS_SURVEY_TITLE,Svy.Title, HTM_DONT_SUBMIT_ON_CHANGE, "id=\"Title\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"" + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -1779,8 +1778,8 @@ void Svy_RequestCreatOrEditSvy (void) /* Data */ HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" rows=\"5\"" - " class=\"TITLE_DESCRIPTION_WIDTH %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); if (!ItsANewSurvey) HTM_Txt (Txt); HTM_TEXTAREA_End (); @@ -2305,7 +2304,7 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys, { extern const char *Hlp_ASSESSMENT_Surveys_questions; extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Question; extern const char *Txt_New_question; extern const char *Txt_Wording; @@ -2395,8 +2394,8 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys, HTM_TD_Begin ("class=\"LT\""); HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\"" " cols=\"60\" rows=\"4\"" - " class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + " class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_Txt (Stem); HTM_TEXTAREA_End (); HTM_TD_End (); diff --git a/swad_syllabus.c b/swad_syllabus.c index 0cdadfae..b6d90ff2 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -834,7 +834,7 @@ void Syl_WriteSyllabusIntoHTMLTmpFile (FILE *FileHTMLTmp) static void Syl_PutFormItemSyllabus (struct Syl_Syllabus *Syllabus, bool NewItem,unsigned NumItem,int Level,int *CodItem,const char *Text) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Enter_a_new_item_here; if (Level < 1) @@ -880,8 +880,8 @@ static void Syl_PutFormItemSyllabus (struct Syl_Syllabus *Syllabus, Syl_PutParamNumItem (&Syllabus->ParamNumItem); HTM_INPUT_TEXT ("Txt",Syl_MAX_CHARS_TEXT_ITEM,Text, HTM_SUBMIT_ON_CHANGE, - "size=\"60\" class=\"%s\" placeholder=\"%s\"%s", - The_ClassInput[Gbl.Prefs.Theme], + "size=\"60\" class=\"INPUT_%s\" placeholder=\"%s\"%s", + The_Colors[Gbl.Prefs.Theme], Txt_Enter_a_new_item_here, NewItem ? " autofocus=\"autofocus\"" : ""); diff --git a/swad_tag.c b/swad_tag.c index 5498b2f2..8a10c92f 100644 --- a/swad_tag.c +++ b/swad_tag.c @@ -400,7 +400,7 @@ void Tag_ShowFormSelTags (const struct Tag_Tags *Tags, void Tag_ShowFormEditTags (void) { extern const char *Hlp_ASSESSMENT_Questions_editing_tags; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_No_test_questions; extern const char *Txt_Tags; MYSQL_RES *mysql_res; @@ -445,9 +445,9 @@ void Tag_ShowFormEditTags (void) Par_PutHiddenParamString (NULL,"OldTagTxt",row[1]); HTM_INPUT_TEXT ("NewTagTxt",Tag_MAX_CHARS_TAG,row[1], HTM_SUBMIT_ON_CHANGE, - "size=\"36\" class=\"%s\"" + "size=\"36\" class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); Frm_EndForm (); HTM_TD_End (); diff --git a/swad_test_config.c b/swad_test_config.c index aceec877..978c753c 100644 --- a/swad_test_config.c +++ b/swad_test_config.c @@ -144,7 +144,6 @@ static void TstCfg_ShowFormConfig (void) extern const char *Hlp_ASSESSMENT_Tests_configuring_tests; extern const char *The_ClassFormInBox[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Configure_tests; extern const char *Txt_Plugins; extern const char *Txt_TST_PLUGGABLE[TstCfg_NUM_OPTIONS_PLUGGABLE]; @@ -235,9 +234,9 @@ static void TstCfg_ShowFormConfig (void) HTM_INPUT_TEXT ("MinTimeNxtTstPerQst",Cns_MAX_DECIMAL_DIGITS_ULONG,StrMinTimeNxtTstPerQst, HTM_DONT_SUBMIT_ON_CHANGE, "id=\"MinTimeNxtTstPerQst\" size=\"7\"" - " class=\"%s\"" + " class=\"INPUT_%s\"" " required=\"required\"", - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); @@ -278,7 +277,6 @@ static void TstCfg_PutInputFieldNumQsts (const char *Field,const char *Label, unsigned Value) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; char StrValue[Cns_MAX_DECIMAL_DIGITS_UINT + 1]; HTM_TR_Begin (NULL); @@ -294,9 +292,9 @@ static void TstCfg_PutInputFieldNumQsts (const char *Field,const char *Label, snprintf (StrValue,sizeof (StrValue),"%u",Value); HTM_INPUT_TEXT (Field,Cns_MAX_DECIMAL_DIGITS_UINT,StrValue, HTM_DONT_SUBMIT_ON_CHANGE, - "id=\"%s\" size=\"3\" class=\"%s\"" + "id=\"%s\" size=\"3\" class=\"INPUT_%s\"" " required=\"required\"", - Field,The_ClassInput[Gbl.Prefs.Theme]); + Field,The_Colors[Gbl.Prefs.Theme]); HTM_TD_End (); HTM_TR_End (); diff --git a/swad_test_print.c b/swad_test_print.c index 36c132b5..2edbe04b 100644 --- a/swad_test_print.c +++ b/swad_test_print.c @@ -347,15 +347,15 @@ static void TstPrn_WriteIntAnsToFill (const struct TstPrn_PrintedQuestion *Print unsigned QstInd, __attribute__((unused)) struct Qst_Question *Question) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; char StrAns[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x" /***** Write input field for the answer *****/ snprintf (StrAns,sizeof (StrAns),"Ans%010u",QstInd); HTM_INPUT_TEXT (StrAns,11,PrintedQuestion->StrAnswers, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"11\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"11\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); } /*****************************************************************************/ @@ -366,15 +366,15 @@ static void TstPrn_WriteFltAnsToFill (const struct TstPrn_PrintedQuestion *Print unsigned QstInd, __attribute__((unused)) struct Qst_Question *Question) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; char StrAns[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x" /***** Write input field for the answer *****/ snprintf (StrAns,sizeof (StrAns),"Ans%010u",QstInd); HTM_INPUT_TEXT (StrAns,Qst_MAX_BYTES_FLOAT_ANSWER,PrintedQuestion->StrAnswers, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"11\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"11\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); } /*****************************************************************************/ @@ -385,7 +385,7 @@ static void TstPrn_WriteTF_AnsToFill (const struct TstPrn_PrintedQuestion *Print unsigned QstInd, __attribute__((unused)) struct Qst_Question *Question) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_TF_QST[2]; /***** Write selector for the answer *****/ @@ -393,8 +393,8 @@ static void TstPrn_WriteTF_AnsToFill (const struct TstPrn_PrintedQuestion *Print If the user does not confirm the submission of their exam ==> ==> the exam may be half filled ==> the answers displayed will be those selected by the user. */ HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, - "name=\"Ans%010u\" class=\"%s\"", - QstInd,The_ClassInput[Gbl.Prefs.Theme]); + "name=\"Ans%010u\" class=\"INPUT_%s\"", + QstInd,The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"" ,PrintedQuestion->StrAnswers[0] == '\0',false," "); HTM_OPTION (HTM_Type_STRING,"T",PrintedQuestion->StrAnswers[0] == 'T' ,false,"%s",Txt_TF_QST[0]); HTM_OPTION (HTM_Type_STRING,"F",PrintedQuestion->StrAnswers[0] == 'F' ,false,"%s",Txt_TF_QST[1]); @@ -494,15 +494,15 @@ static void TstPrn_WriteTxtAnsToFill (const struct TstPrn_PrintedQuestion *Print unsigned QstInd, __attribute__((unused)) struct Qst_Question *Question) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; char StrAns[3 + Cns_MAX_DECIMAL_DIGITS_UINT + 1]; // "Ansxx...x" /***** Write input field for the answer *****/ snprintf (StrAns,sizeof (StrAns),"Ans%010u",QstInd); HTM_INPUT_TEXT (StrAns,Qst_MAX_CHARS_ANSWERS_ONE_QST,PrintedQuestion->StrAnswers, HTM_DONT_SUBMIT_ON_CHANGE, - "size=\"40\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "size=\"40\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); } /*****************************************************************************/ diff --git a/swad_theme.c b/swad_theme.c index 22d0326f..11e99e6c 100644 --- a/swad_theme.c +++ b/swad_theme.c @@ -188,17 +188,6 @@ const char *The_ClassFormOutBoxBold[The_NUM_THEMES] = [The_THEME_DARK ] = "FORM_OUT_DARK BOLD", }; -const char *The_ClassInput[The_NUM_THEMES] = - { - [The_THEME_WHITE ] = "INPUT_WHITE", - [The_THEME_GREY ] = "INPUT_GREY", - [The_THEME_PURPLE] = "INPUT_PURPLE", - [The_THEME_BLUE ] = "INPUT_BLUE", - [The_THEME_YELLOW] = "INPUT_YELLOW", - [The_THEME_PINK ] = "INPUT_PINK", - [The_THEME_DARK ] = "INPUT_DARK", - }; - const char *The_Colors[The_NUM_THEMES] = { [The_THEME_WHITE ] = "WHITE", diff --git a/swad_timeline_comment.c b/swad_timeline_comment.c index 3eeb7a5e..c575c0e1 100644 --- a/swad_timeline_comment.c +++ b/swad_timeline_comment.c @@ -213,7 +213,7 @@ static void TmlCom_ShowAuthorPhoto (struct UsrData *UsrDat) static void TmlCom_PutFormToWriteNewComm (const struct Tml_Timeline *Timeline, long NotCod) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_New_TIMELINE_comment; char *ClassTextArea; @@ -225,8 +225,8 @@ static void TmlCom_PutFormToWriteNewComm (const struct Tml_Timeline *Timeline, TmlNot_PutHiddenParamNotCod (NotCod); /***** Textarea and button *****/ - if (asprintf (&ClassTextArea,"Tml_COM_TEXTAREA Tml_COM_WIDTH %s", - The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&ClassTextArea,"Tml_COM_TEXTAREA Tml_COM_WIDTH INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); TmlPst_PutTextarea (Txt_New_TIMELINE_comment,ClassTextArea); free (ClassTextArea); diff --git a/swad_timeline_post.c b/swad_timeline_post.c index 67125499..d480d803 100644 --- a/swad_timeline_post.c +++ b/swad_timeline_post.c @@ -173,7 +173,6 @@ void TmlPst_PutPhotoAndFormToWriteNewPost (struct Tml_Timeline *Timeline) static void TmlPst_PutFormToWriteNewPost (struct Tml_Timeline *Timeline) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_New_TIMELINE_post; char *Class; @@ -193,8 +192,8 @@ static void TmlPst_PutFormToWriteNewPost (struct Tml_Timeline *Timeline) /* Form with textarea */ TmlFrm_BeginForm (Timeline,TmlFrm_RECEIVE_POST); - if (asprintf (&Class,"Tml_COM_TEXTAREA Tml_RIGHT_WIDTH %s", - The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&Class,"Tml_COM_TEXTAREA Tml_RIGHT_WIDTH INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); TmlPst_PutTextarea (Txt_New_TIMELINE_post,Class); free (Class); @@ -213,7 +212,7 @@ static void TmlPst_PutFormToWriteNewPost (struct Tml_Timeline *Timeline) void TmlPst_PutTextarea (const char *Placeholder,const char *ClassTextArea) { - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Post; char IdDivImgButton[Frm_MAX_BYTES_ID + 1]; char *ClassInput; @@ -237,7 +236,8 @@ void TmlPst_PutTextarea (const char *Placeholder,const char *ClassTextArea) Lay_HelpPlainEditor (); /***** Attached image (optional) *****/ - if (asprintf (&ClassInput,"Tml_MED_INPUT_WIDTH %s",The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&ClassInput,"Tml_MED_INPUT_WIDTH INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); Med_PutMediaUploader (-1,ClassInput); free (ClassInput); diff --git a/swad_timetable.c b/swad_timetable.c index 4e1081c8..de615bd2 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -1496,7 +1496,6 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable, unsigned DurationNumIntervals,const char *Info) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Tmt_DB_ClassType[Tmt_NUM_CLASS_TYPES]; extern const char *Txt_TIMETABLE_CLASS_TYPES[Tmt_NUM_CLASS_TYPES]; extern const char *Txt_Group; @@ -1531,8 +1530,8 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable, /***** Class type *****/ HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "name=\"TTTyp\" class=\"Tmt_TYP %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"TTTyp\" class=\"Tmt_TYP INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (CT = (Tmt_ClassType_t) 0; CT <= (Tmt_ClassType_t) (Tmt_NUM_CLASS_TYPES - 1); CT++) @@ -1566,8 +1565,8 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable, { /***** Class duration *****/ HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "name=\"TTDur\" class=\"Tmt_DUR %s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"TTDur\" class=\"Tmt_DUR INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); for (i = WhichCell->Interval + Tmt_TimeTable[WhichCell->Weekday][WhichCell->Interval].Columns[WhichCell->Column].DurationIntervals; i < Timetable->Config.IntervalsPerDay; @@ -1609,9 +1608,9 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable, HTM_LABEL_End (); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"TTGrp%s\" name=\"TTGrp\"" - " class=\"Tmt_GRP %s\"", + " class=\"Tmt_GRP INPUT_%s\"", CellStr, - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_OPTION (HTM_Type_STRING,"-1",GrpCod <= 0,false, "%s",Txt_All_groups); for (NumGrpTyp = 0; @@ -1653,8 +1652,8 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable, "", HTM_SUBMIT_ON_CHANGE, "id=\"TTInf%s\" size=\"1\"" - " class=\"Tmt_INF %s\"", - CellStr,The_ClassInput[Gbl.Prefs.Theme]); + " class=\"Tmt_INF INPUT_%s\"", + CellStr,The_Colors[Gbl.Prefs.Theme]); } else // TimeTableView == Tmt_TUT_EDIT { @@ -1668,8 +1667,8 @@ static void Tmt_TimeTableDrawCellEdit (const struct Tmt_Timetable *Timetable, HTM_INPUT_TEXT ("TTInf",Tmt_MAX_CHARS_INFO,Info, HTM_SUBMIT_ON_CHANGE, "id=\"TTInf%s\" size=\"12\"" - " class=\"Tmt_INF %s\"", - CellStr,The_ClassInput[Gbl.Prefs.Theme]); + " class=\"Tmt_INF INPUT_%s\"", + CellStr,The_Colors[Gbl.Prefs.Theme]); } /***** Free allocated unique string for this cell used in labels *****/ diff --git a/swad_user.c b/swad_user.c index 9d472813..51cbd4b3 100644 --- a/swad_user.c +++ b/swad_user.c @@ -1133,7 +1133,7 @@ void Usr_PutLinkToLogin (void) void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void)) { extern const char *Hlp_PROFILE_LogIn; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_Log_in; extern const char *Txt_User[Usr_NUM_SEXS]; extern const char *Txt_nick_email_or_ID; @@ -1168,10 +1168,10 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void)) HTM_INPUT_TEXT ("UsrId",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrIdLogin, HTM_DONT_SUBMIT_ON_CHANGE, "id=\"UsrId\" size=\"18\" placeholder=\"%s\"" - " class=\"%s\" autofocus=\"autofocus\"" + " class=\"INPUT_%s\" autofocus=\"autofocus\"" " required=\"required\"", Txt_nick_email_or_ID, - The_ClassInput[Gbl.Prefs.Theme]); + The_Colors[Gbl.Prefs.Theme]); HTM_DIV_End (); /***** User's password *****/ @@ -1181,8 +1181,8 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void)) Txt_Password,"CONTEXT_ICO16x16"); HTM_LABEL_End (); HTM_INPUT_PASSWORD ("UsrPwd",Txt_password,NULL,false, - "id=\"UsrPwd\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "id=\"UsrPwd\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); HTM_DIV_End (); /***** End table, send button and end box *****/ @@ -1348,7 +1348,6 @@ void Usr_PutFormLogIn (void) void Usr_WriteLoggedUsrHead (void) { extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Role; extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; static const char *ClassPhoto[PhoSha_NUM_SHAPES] = @@ -1376,7 +1375,8 @@ void Usr_WriteLoggedUsrHead (void) } else { - if (asprintf (&ClassSelect,"SEL_ROLE %s",The_ClassInput[Gbl.Prefs.Theme]) < 0) + if (asprintf (&ClassSelect,"SEL_ROLE INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) Err_NotEnoughMemoryExit (); Rol_PutFormToChangeMyRole (ClassSelect); free (ClassSelect); @@ -2045,13 +2045,13 @@ void Usr_ShowFormsLogoutAndRole (void) extern const char *Hlp_PROFILE_Session_role; extern const char *The_ClassFormInBox[The_NUM_THEMES]; extern const char *The_Colors[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; extern const char *Txt_Session; extern const char *Txt_Role; extern const char *Txt_You_are_now_LOGGED_IN_as_X; extern const char *Txt_logged[Usr_NUM_SEXS]; extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; + char *ClassSelect; /***** Write message with my new logged role *****/ if (Gbl.Usrs.Me.Role.HasChanged) @@ -2080,7 +2080,11 @@ void Usr_ShowFormsLogoutAndRole (void) { HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_Role); - Rol_PutFormToChangeMyRole (The_ClassInput[Gbl.Prefs.Theme]); + if (asprintf (&ClassSelect,"INPUT_%s", + The_Colors[Gbl.Prefs.Theme]) < 0) + Err_NotEnoughMemoryExit (); + Rol_PutFormToChangeMyRole (ClassSelect); + free (ClassSelect); HTM_LABEL_End (); } @@ -6247,7 +6251,7 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType, void Usr_PutSelectorNumColsClassPhoto (void) { extern const char *The_ClassFormInBox[The_NUM_THEMES]; - extern const char *The_ClassInput[The_NUM_THEMES]; + extern const char *The_Colors[The_NUM_THEMES]; extern const char *Txt_columns; unsigned Cols; @@ -6256,8 +6260,8 @@ void Usr_PutSelectorNumColsClassPhoto (void) /***** Begin selector *****/ HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, - "name=\"ColsClassPhoto\" class=\"%s\"", - The_ClassInput[Gbl.Prefs.Theme]); + "name=\"ColsClassPhoto\" class=\"INPUT_%s\"", + The_Colors[Gbl.Prefs.Theme]); /***** Put a row in selector for every number of columns *****/ for (Cols = 1;