diff --git a/swad_HTML.c b/swad_HTML.c index 6edb514c..a55b7431 100644 --- a/swad_HTML.c +++ b/swad_HTML.c @@ -1158,7 +1158,8 @@ void HTM_TEXTAREA_End (void) /********************************** Selectors ********************************/ /*****************************************************************************/ -void HTM_SELECT_Begin (const char *fmt,...) +void HTM_SELECT_Begin (bool SubmitOnChange, + const char *fmt,...) { va_list ap; int NumBytesPrinted; @@ -1178,7 +1179,7 @@ void HTM_SELECT_Begin (const char *fmt,...) Lay_NotEnoughMemoryExit (); /***** Print HTML *****/ - fprintf (Gbl.F.Out,""); // HTM_SELECT_NestingLevel++; } static void HTM_SELECT_BeginWithoutAttr (void) { - fprintf (Gbl.F.Out,"" - "" + " onchange=\"document.getElementById('%s').submit();return false;\">", + Gbl.Form.Id); + fprintf (Gbl.F.Out,"" "", - Gbl.Form.Id, (unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_PENDING), Txt_CENTRE_STATUS[Ctr_STATUS_PENDING], (unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_ACTIVE), @@ -2502,8 +2503,8 @@ static void Ctr_PutFormToCreateCentre (void) /***** Place *****/ HTM_TD_Begin ("class=\"LM\""); - fprintf (Gbl.F.Out,"" - "" + " onchange=\"document.getElementById('%s').submit();return false;\">", + Gbl.Form.Id); + fprintf (Gbl.F.Out,"" "", - Gbl.Form.Id, (unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_PENDING), Txt_COURSE_STATUS[Crs_STATUS_PENDING], (unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_ACTIVE), @@ -3289,9 +3289,9 @@ void Crs_AskRemoveOldCrss (void) /***** Form to request number of months without clicks *****/ HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"%s " - ""); 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_date.c b/swad_date.c index af867678..4119c121 100644 --- a/swad_date.c +++ b/swad_date.c @@ -835,8 +835,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear, fprintf (Gbl.F.Out,"\""); if (Disabled) fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out,">" - ""); + fprintf (Gbl.F.Out,">"); + fprintf (Gbl.F.Out,""); for (Year = FirstYear; Year <= LastYear; Year++) @@ -860,7 +860,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear, fprintf (Gbl.F.Out,"\""); if (Disabled) fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out,">"); + fprintf (Gbl.F.Out,">"); + fprintf (Gbl.F.Out,""); for (Month = 1; Month <= 12; Month++) @@ -881,7 +882,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear, Gbl.Form.Id); if (Disabled) fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out,">"); + fprintf (Gbl.F.Out,">"); + fprintf (Gbl.F.Out,""); NumDaysSelectedMonth = (DateSelected->Month == 0) ? 31 : ((DateSelected->Month == 2) ? Dat_GetNumDaysFebruary (DateSelected->Year) : Dat_NumDaysMonth[DateSelected->Month]); diff --git a/swad_degree.c b/swad_degree.c index 58c1386a..554f36b5 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -602,8 +602,8 @@ void Deg_WriteSelectorOfDegree (void) Gbl.Form.Id); else fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out,">" - "", @@ -838,10 +838,10 @@ static void Deg_ListDegreesForEdition (void) Frm_StartForm (ActChgDegSta); Deg_PutParamOtherDegCod (Deg->DegCod); fprintf (Gbl.F.Out,"" - "",Txt_Another_institution); @@ -918,8 +918,8 @@ static void Dpt_PutFormToCreateDepartment (void) /***** Institution *****/ HTM_TD_Begin ("class=\"CM\""); - fprintf (Gbl.F.Out,"" - ""); diff --git a/swad_figure.c b/swad_figure.c index 78c032f9..fe041935 100644 --- a/swad_figure.c +++ b/swad_figure.c @@ -221,9 +221,8 @@ void Fig_ReqShowFigures (void) /***** Type of statistic *****/ HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); - fprintf (Gbl.F.Out,"%s: " - ""); for (FigureType = (Fig_FigureType_t) 0; FigureType < Fig_NUM_FIGURES; FigureType++) diff --git a/swad_group.c b/swad_group.c index 127ea57b..3402d402 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1325,9 +1325,9 @@ static void Grp_ListGroupTypesForEdition (void) Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); fprintf (Gbl.F.Out,"" - "" @@ -2505,8 +2505,8 @@ static void Grp_PutFormToCreateGroupType (void) /***** Is it mandatory to register in any groups of this type? *****/ HTM_TD_Begin ("class=\"CM\""); fprintf (Gbl.F.Out,"" - "" diff --git a/swad_holiday.c b/swad_holiday.c index 19f89d02..e9e63a45 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -586,9 +586,9 @@ static void Hld_ListHolidaysForEdition (void) Frm_StartForm (ActChgHldPlc); Hld_PutParamHldCod (Hld->HldCod); fprintf (Gbl.F.Out,"" - "",Txt_All_places); diff --git a/swad_institution.c b/swad_institution.c index 730bbd10..c53b0aab 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -1377,7 +1377,8 @@ void Ins_WriteSelectorOfInstitution (void) Gbl.Form.Id); else fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out,">", @@ -1563,10 +1564,10 @@ static void Ins_ListInstitutionsForEdition (void) Frm_StartForm (ActChgInsSta); Ins_PutParamOtherInsCod (Ins->InsCod); fprintf (Gbl.F.Out,"" - "",Txt_any_course); diff --git a/swad_record.c b/swad_record.c index 5b6ff9b8..c91470ed 100644 --- a/swad_record.c +++ b/swad_record.c @@ -3036,8 +3036,8 @@ static void Rec_ShowRole (struct UsrData *UsrDat, Rol_GST; // If user don't belong to any course /***** Selector of role *****/ - fprintf (Gbl.F.Out,"" - "", (unsigned) Rol_GST,Txt_ROLES_SINGUL_Abc[Rol_GST][Usr_SEX_UNKNOWN]); HTM_SELECT_End (); @@ -3280,8 +3280,8 @@ static void Rec_ShowCountry (struct UsrData *UsrDat, /***** Selector of country *****/ fprintf (Gbl.F.Out,"" - ""); @@ -4062,9 +4062,9 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) Frm_StartFormAnchor (ActChgMyIns,Rec_MY_INS_CTR_DPT_ID); fprintf (Gbl.F.Out,"" - "" diff --git a/swad_statistic.c b/swad_statistic.c index a43ba226..b9681ba8 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -453,8 +453,8 @@ void Sta_AskShowCrsHits (void) /* Number of rows per page */ // To use getElementById in Firefox, it's necessary to have the id attribute HTM_LABEL_Begin (NULL); - fprintf (Gbl.F.Out,"(%s: ", - Txt_Color_of_the_graphic, Gbl.Form.Id); for (ColorType = (Sta_ColorType_t) 0; ColorType < Sta_NUM_COLOR_TYPES; diff --git a/swad_test.c b/swad_test.c index 03a0391e..833d2941 100644 --- a/swad_test.c +++ b/swad_test.c @@ -3515,11 +3515,10 @@ static void Tst_WriteTFAnsViewTest (unsigned NumQst) extern const char *Txt_TF_QST[2]; /***** Write selector for the answer *****/ - fprintf (Gbl.F.Out,"",NumQst); + fprintf (Gbl.F.Out,"" "" "", - NumQst, Txt_TF_QST[0], Txt_TF_QST[1]); HTM_SELECT_End ();