Version19.52.1

This commit is contained in:
Antonio Cañas Vargas 2019-11-05 09:04:47 +01:00
parent f22eebe314
commit e823add14d
18 changed files with 88 additions and 78 deletions

View File

@ -1158,7 +1158,8 @@ void HTM_TEXTAREA_End (void)
/********************************** Selectors ********************************/ /********************************** Selectors ********************************/
/*****************************************************************************/ /*****************************************************************************/
void HTM_SELECT_Begin (const char *fmt,...) void HTM_SELECT_Begin (bool SubmitOnChange,
const char *fmt,...)
{ {
va_list ap; va_list ap;
int NumBytesPrinted; int NumBytesPrinted;
@ -1178,7 +1179,7 @@ void HTM_SELECT_Begin (const char *fmt,...)
Lay_NotEnoughMemoryExit (); Lay_NotEnoughMemoryExit ();
/***** Print HTML *****/ /***** Print HTML *****/
fprintf (Gbl.F.Out,"<select %s>",Attr); fprintf (Gbl.F.Out,"<select %s",Attr);
free ((void *) Attr); free ((void *) Attr);
} }
@ -1188,12 +1189,18 @@ void HTM_SELECT_Begin (const char *fmt,...)
else else
HTM_SELECT_BeginWithoutAttr (); HTM_SELECT_BeginWithoutAttr ();
if (SubmitOnChange)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();return false;\"",
Gbl.Form.Id);
fprintf (Gbl.F.Out," />");
// HTM_SELECT_NestingLevel++; // HTM_SELECT_NestingLevel++;
} }
static void HTM_SELECT_BeginWithoutAttr (void) static void HTM_SELECT_BeginWithoutAttr (void)
{ {
fprintf (Gbl.F.Out,"<select>"); fprintf (Gbl.F.Out,"<select");
} }
void HTM_SELECT_End (void) void HTM_SELECT_End (void)

View File

@ -113,7 +113,8 @@ void HTM_INPUT_CHECKBOX (const char *Name,bool SubmitOnChange,
void HTM_TEXTAREA_Begin (const char *fmt,...); void HTM_TEXTAREA_Begin (const char *fmt,...);
void HTM_TEXTAREA_End (void); void HTM_TEXTAREA_End (void);
void HTM_SELECT_Begin (const char *fmt,...); void HTM_SELECT_Begin (bool SubmitOnChange,
const char *fmt,...);
void HTM_SELECT_End (void); void HTM_SELECT_End (void);
void HTM_IMG (const char *URL,const char *Icon,const char *Title, void HTM_IMG (const char *URL,const char *Icon,const char *Title,

View File

@ -1406,7 +1406,8 @@ void Ctr_WriteSelectorOfCentre (void)
Gbl.Form.Id); Gbl.Form.Id);
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,"><option value=\"\""); fprintf (Gbl.F.Out,">");
fprintf (Gbl.F.Out,"<option value=\"\"");
if (Gbl.Hierarchy.Ctr.CtrCod < 0) if (Gbl.Hierarchy.Ctr.CtrCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>", fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>",
@ -1624,10 +1625,10 @@ static void Ctr_ListCentresForEdition (void)
Frm_StartForm (ActChgCtrSta); Frm_StartForm (ActChgCtrSta);
Ctr_PutParamOtherCtrCod (Ctr->CtrCod); Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
fprintf (Gbl.F.Out,"<select name=\"Status\" class=\"INPUT_STATUS\"" fprintf (Gbl.F.Out,"<select name=\"Status\" class=\"INPUT_STATUS\""
" onchange=\"document.getElementById('%s').submit();return false;\">" " onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"%u\" selected=\"selected\">%s</option>" Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>", "<option value=\"%u\">%s</option>",
Gbl.Form.Id,
(unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_PENDING), (unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_PENDING),
Txt_CENTRE_STATUS[Ctr_STATUS_PENDING], Txt_CENTRE_STATUS[Ctr_STATUS_PENDING],
(unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_ACTIVE), (unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_ACTIVE),
@ -2502,8 +2503,8 @@ static void Ctr_PutFormToCreateCentre (void)
/***** Place *****/ /***** Place *****/
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
fprintf (Gbl.F.Out,"<select name=\"PlcCod\" class=\"PLC_SEL\">" fprintf (Gbl.F.Out,"<select name=\"PlcCod\" class=\"PLC_SEL\">");
"<option value=\"0\""); fprintf (Gbl.F.Out,"<option value=\"0\"");
if (Ctr_EditingCtr->PlcCod == 0) if (Ctr_EditingCtr->PlcCod == 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Txt_Another_place); fprintf (Gbl.F.Out,">%s</option>",Txt_Another_place);

View File

@ -490,14 +490,16 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD: En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 19.52 (2019-11-05)" #define Log_PLATFORM_VERSION "SWAD 19.52.1 (2019-11-05)"
#define CSS_FILE "swad19.47.css" #define CSS_FILE "swad19.47.css"
#define JS_FILE "swad19.39.js" #define JS_FILE "swad19.39.js"
/* /*
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
// TODO: Impedir la creación y edición de proyectos si no son editables. // TODO: Impedir la creación y edición de proyectos si no son editables.
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia) // TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
// TODO: Replace <select... by HTML_SELECT_Begin ()
Version 19.52.1: Nov 05, 2019 Code refactoring in HTML selects. (245967 lines)
Version 19.52: Nov 05, 2019 Code refactoring in HTML selects. (245959 lines) Version 19.52: Nov 05, 2019 Code refactoring in HTML selects. (245959 lines)
Version 19.51.25: Nov 05, 2019 Fixed bug in file browser. (245909 lines) Version 19.51.25: Nov 05, 2019 Fixed bug in file browser. (245909 lines)
Version 19.51.24: Nov 05, 2019 Fixed bug in tests. (245908 lines) Version 19.51.24: Nov 05, 2019 Fixed bug in tests. (245908 lines)

View File

@ -1233,9 +1233,9 @@ void Cty_WriteSelectorOfCountry (void)
/***** Begin form *****/ /***** Begin form *****/
Frm_StartFormGoTo (ActSeeIns); Frm_StartFormGoTo (ActSeeIns);
fprintf (Gbl.F.Out,"<select id=\"cty\" name=\"cty\" class=\"HIE_SEL\"" fprintf (Gbl.F.Out,"<select id=\"cty\" name=\"cty\" class=\"HIE_SEL\""
" onchange=\"document.getElementById('%s').submit();return false;\">" " onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"\"",
Gbl.Form.Id); Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"\"");
if (Gbl.Hierarchy.Cty.CtyCod < 0) if (Gbl.Hierarchy.Cty.CtyCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>", fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>",

View File

@ -892,8 +892,8 @@ void Crs_WriteSelectorOfCourse (void)
Gbl.Form.Id); Gbl.Form.Id);
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,">" fprintf (Gbl.F.Out,">");
"<option value=\"\""); fprintf (Gbl.F.Out,"<option value=\"\"");
if (Gbl.Hierarchy.Crs.CrsCod < 0) if (Gbl.Hierarchy.Crs.CrsCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>", fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>",
@ -1556,10 +1556,10 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
Frm_StartForm (ActChgCrsSta); Frm_StartForm (ActChgCrsSta);
Crs_PutParamOtherCrsCod (Crs->CrsCod); Crs_PutParamOtherCrsCod (Crs->CrsCod);
fprintf (Gbl.F.Out,"<select name=\"Status\" class=\"INPUT_STATUS\"" fprintf (Gbl.F.Out,"<select name=\"Status\" class=\"INPUT_STATUS\""
" onchange=\"document.getElementById('%s').submit();return false;\">" " onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"%u\" selected=\"selected\">%s</option>" Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>", "<option value=\"%u\">%s</option>",
Gbl.Form.Id,
(unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_PENDING), (unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_PENDING),
Txt_COURSE_STATUS[Crs_STATUS_PENDING], Txt_COURSE_STATUS[Crs_STATUS_PENDING],
(unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_ACTIVE), (unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_ACTIVE),
@ -3289,9 +3289,9 @@ void Crs_AskRemoveOldCrss (void)
/***** Form to request number of months without clicks *****/ /***** Form to request number of months without clicks *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s&nbsp;" fprintf (Gbl.F.Out,"%s&nbsp;",
"<select name=\"Months\">",
Txt_Eliminate_all_courses_whithout_users_PART_1_OF_2); Txt_Eliminate_all_courses_whithout_users_PART_1_OF_2);
fprintf (Gbl.F.Out,"<select name=\"Months\">");
for (i = Crs_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS; for (i = Crs_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS;
i <= Crs_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS; i <= Crs_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_CRSS;
i++) i++)

View File

@ -835,8 +835,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
fprintf (Gbl.F.Out,"\""); fprintf (Gbl.F.Out,"\"");
if (Disabled) if (Disabled)
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,">" fprintf (Gbl.F.Out,">");
"<option value=\"0\">-</option>"); fprintf (Gbl.F.Out,"<option value=\"0\">-</option>");
for (Year = FirstYear; for (Year = FirstYear;
Year <= LastYear; Year <= LastYear;
Year++) Year++)
@ -860,7 +860,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
fprintf (Gbl.F.Out,"\""); fprintf (Gbl.F.Out,"\"");
if (Disabled) if (Disabled)
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,"><option value=\"0\">-</option>"); fprintf (Gbl.F.Out,">");
fprintf (Gbl.F.Out,"<option value=\"0\">-</option>");
for (Month = 1; for (Month = 1;
Month <= 12; Month <= 12;
Month++) Month++)
@ -881,7 +882,8 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
Gbl.Form.Id); Gbl.Form.Id);
if (Disabled) if (Disabled)
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,"><option value=\"0\">-</option>"); fprintf (Gbl.F.Out,">");
fprintf (Gbl.F.Out,"<option value=\"0\">-</option>");
NumDaysSelectedMonth = (DateSelected->Month == 0) ? 31 : NumDaysSelectedMonth = (DateSelected->Month == 0) ? 31 :
((DateSelected->Month == 2) ? Dat_GetNumDaysFebruary (DateSelected->Year) : ((DateSelected->Month == 2) ? Dat_GetNumDaysFebruary (DateSelected->Year) :
Dat_NumDaysMonth[DateSelected->Month]); Dat_NumDaysMonth[DateSelected->Month]);

View File

@ -602,8 +602,8 @@ void Deg_WriteSelectorOfDegree (void)
Gbl.Form.Id); Gbl.Form.Id);
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,">" fprintf (Gbl.F.Out,">");
"<option value=\"\""); fprintf (Gbl.F.Out,"<option value=\"\"");
if (Gbl.Hierarchy.Deg.DegCod < 0) if (Gbl.Hierarchy.Deg.DegCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>", fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>",
@ -838,10 +838,10 @@ static void Deg_ListDegreesForEdition (void)
Frm_StartForm (ActChgDegSta); Frm_StartForm (ActChgDegSta);
Deg_PutParamOtherDegCod (Deg->DegCod); Deg_PutParamOtherDegCod (Deg->DegCod);
fprintf (Gbl.F.Out,"<select name=\"Status\" class=\"INPUT_STATUS\"" fprintf (Gbl.F.Out,"<select name=\"Status\" class=\"INPUT_STATUS\""
" onchange=\"document.getElementById('%s').submit();return false;\">" " onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"%u\" selected=\"selected\">%s</option>" Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>", "<option value=\"%u\">%s</option>",
Gbl.Form.Id,
(unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_PENDING), (unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_PENDING),
Txt_DEGREE_STATUS[Deg_STATUS_PENDING], Txt_DEGREE_STATUS[Deg_STATUS_PENDING],
(unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_ACTIVE), (unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_ACTIVE),

View File

@ -540,9 +540,9 @@ static void Dpt_ListDepartmentsForEdition (void)
Frm_StartForm (ActChgDptIns); Frm_StartForm (ActChgDptIns);
Dpt_PutParamDptCod (Dpt->DptCod); Dpt_PutParamDptCod (Dpt->DptCod);
fprintf (Gbl.F.Out,"<select name=\"OthInsCod\" class=\"HIE_SEL_NARROW\"" fprintf (Gbl.F.Out,"<select name=\"OthInsCod\" class=\"HIE_SEL_NARROW\""
"onchange=\"document.getElementById('%s').submit();return false;\">" "onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"0\"",
Gbl.Form.Id); Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"0\"");
if (Dpt->InsCod == 0) if (Dpt->InsCod == 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Txt_Another_institution); fprintf (Gbl.F.Out,">%s</option>",Txt_Another_institution);
@ -918,8 +918,8 @@ static void Dpt_PutFormToCreateDepartment (void)
/***** Institution *****/ /***** Institution *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select name=\"OthInsCod\" class=\"HIE_SEL_NARROW\">" fprintf (Gbl.F.Out,"<select name=\"OthInsCod\" class=\"HIE_SEL_NARROW\">");
"<option value=\"0\""); fprintf (Gbl.F.Out,"<option value=\"0\"");
if (Dpt_EditingDpt->InsCod == 0) if (Dpt_EditingDpt->InsCod == 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Txt_Another_institution); fprintf (Gbl.F.Out,">%s</option>",Txt_Another_institution);

View File

@ -1197,8 +1197,8 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal); HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
if (TypeViewExamAnnouncement == Exa_FORM_VIEW) if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
{ {
fprintf (Gbl.F.Out,"<select name=\"ExamHour\">" fprintf (Gbl.F.Out,"<select name=\"ExamHour\">");
"<option value=\"0\""); fprintf (Gbl.F.Out,"<option value=\"0\"");
if (Gbl.ExamAnns.ExaDat.StartTime.Hour == 0) if (Gbl.ExamAnns.ExaDat.StartTime.Hour == 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">-</option>"); fprintf (Gbl.F.Out,">-</option>");

View File

@ -221,9 +221,8 @@ void Fig_ReqShowFigures (void)
/***** Type of statistic *****/ /***** Type of statistic *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;" fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_Statistic);
"<select name=\"FigureType\">", fprintf (Gbl.F.Out,"<select name=\"FigureType\">");
Txt_Statistic);
for (FigureType = (Fig_FigureType_t) 0; for (FigureType = (Fig_FigureType_t) 0;
FigureType < Fig_NUM_FIGURES; FigureType < Fig_NUM_FIGURES;
FigureType++) FigureType++)

View File

@ -1325,9 +1325,9 @@ static void Grp_ListGroupTypesForEdition (void)
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
fprintf (Gbl.F.Out,"<select name=\"MandatoryEnrolment\"" fprintf (Gbl.F.Out,"<select name=\"MandatoryEnrolment\""
" style=\"width:150px;\"" " style=\"width:150px;\""
" onchange=\"document.getElementById('%s').submit();return false;\">" " onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"N\"",
Gbl.Form.Id); Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"N\"");
if (!Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrolment) if (!Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrolment)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>" fprintf (Gbl.F.Out,">%s</option>"
@ -1347,9 +1347,9 @@ static void Grp_ListGroupTypesForEdition (void)
Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
fprintf (Gbl.F.Out,"<select name=\"MultipleEnrolment\"" fprintf (Gbl.F.Out,"<select name=\"MultipleEnrolment\""
" style=\"width:150px;\"" " style=\"width:150px;\""
" onchange=\"document.getElementById('%s').submit();return false;\">" " onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"N\"",
Gbl.Form.Id); Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"N\"");
if (!Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrolment) if (!Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrolment)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>" fprintf (Gbl.F.Out,">%s</option>"
@ -2505,8 +2505,8 @@ static void Grp_PutFormToCreateGroupType (void)
/***** Is it mandatory to register in any groups of this type? *****/ /***** Is it mandatory to register in any groups of this type? *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select name=\"MandatoryEnrolment\"" fprintf (Gbl.F.Out,"<select name=\"MandatoryEnrolment\""
" style=\"width:150px;\">" " style=\"width:150px;\">");
"<option value=\"N\""); fprintf (Gbl.F.Out,"<option value=\"N\"");
if (!Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment) if (!Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>" fprintf (Gbl.F.Out,">%s</option>"
@ -2522,8 +2522,8 @@ static void Grp_PutFormToCreateGroupType (void)
/***** Is it possible to register in multiple groups of this type? *****/ /***** Is it possible to register in multiple groups of this type? *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select name=\"MultipleEnrolment\"" fprintf (Gbl.F.Out,"<select name=\"MultipleEnrolment\""
" style=\"width:150px;\">" " style=\"width:150px;\">");
"<option value=\"N\""); fprintf (Gbl.F.Out,"<option value=\"N\"");
if (!Gbl.Crs.Grps.GrpTyp.MultipleEnrolment) if (!Gbl.Crs.Grps.GrpTyp.MultipleEnrolment)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>" fprintf (Gbl.F.Out,">%s</option>"

View File

@ -586,9 +586,9 @@ static void Hld_ListHolidaysForEdition (void)
Frm_StartForm (ActChgHldPlc); Frm_StartForm (ActChgHldPlc);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (Hld->HldCod);
fprintf (Gbl.F.Out,"<select name=\"PlcCod\" class=\"PLC_COD\"" fprintf (Gbl.F.Out,"<select name=\"PlcCod\" class=\"PLC_COD\""
" onchange=\"document.getElementById('%s').submit();return false;\">" " onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"-1\"",
Gbl.Form.Id); Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (Hld->PlcCod <= 0) if (Hld->PlcCod <= 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Txt_All_places); fprintf (Gbl.F.Out,">%s</option>",Txt_All_places);
@ -986,8 +986,8 @@ static void Hld_PutFormToCreateHoliday (void)
/***** Holiday place *****/ /***** Holiday place *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select name=\"PlcCod\" class=\"PLC_COD\">" fprintf (Gbl.F.Out,"<select name=\"PlcCod\" class=\"PLC_COD\">");
"<option value=\"-1\""); fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (Hld_EditingHld->PlcCod <= 0) if (Hld_EditingHld->PlcCod <= 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Txt_All_places); fprintf (Gbl.F.Out,">%s</option>",Txt_All_places);

View File

@ -1377,7 +1377,8 @@ void Ins_WriteSelectorOfInstitution (void)
Gbl.Form.Id); Gbl.Form.Id);
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,"><option value=\"\""); fprintf (Gbl.F.Out,">");
fprintf (Gbl.F.Out,"<option value=\"\"");
if (Gbl.Hierarchy.Ins.InsCod < 0) if (Gbl.Hierarchy.Ins.InsCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>", fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>",
@ -1563,10 +1564,10 @@ static void Ins_ListInstitutionsForEdition (void)
Frm_StartForm (ActChgInsSta); Frm_StartForm (ActChgInsSta);
Ins_PutParamOtherInsCod (Ins->InsCod); Ins_PutParamOtherInsCod (Ins->InsCod);
fprintf (Gbl.F.Out,"<select name=\"Status\" class=\"INPUT_STATUS\"" fprintf (Gbl.F.Out,"<select name=\"Status\" class=\"INPUT_STATUS\""
" onchange=\"document.getElementById('%s').submit();return false;\">" " onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"%u\" selected=\"selected\">%s</option>" Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>", "<option value=\"%u\">%s</option>",
Gbl.Form.Id,
(unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_PENDING), (unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_PENDING),
Txt_INSTITUTION_STATUS[Ins_STATUS_PENDING], Txt_INSTITUTION_STATUS[Ins_STATUS_PENDING],
(unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_ACTIVE), (unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_ACTIVE),

View File

@ -2615,10 +2615,9 @@ void Msg_ShowFormSelectCourseSentOrRecMsgs (void)
/***** Course selection *****/ /***** Course selection *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s&nbsp;" fprintf (Gbl.F.Out,"%s&nbsp;",TxtSelector[Gbl.Msg.TypeOfMessages]);
"<select name=\"FilterCrsCod\">" fprintf (Gbl.F.Out,"<select name=\"FilterCrsCod\">");
"<option value=\"\"", fprintf (Gbl.F.Out,"<option value=\"\"");
TxtSelector[Gbl.Msg.TypeOfMessages]);
if (Gbl.Msg.FilterCrsCod < 0) if (Gbl.Msg.FilterCrsCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Txt_any_course); fprintf (Gbl.F.Out,">%s</option>",Txt_any_course);

View File

@ -3036,8 +3036,8 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
Rol_GST; // If user don't belong to any course Rol_GST; // If user don't belong to any course
/***** Selector of role *****/ /***** Selector of role *****/
fprintf (Gbl.F.Out,"<select id=\"Role\" name=\"Role\">" fprintf (Gbl.F.Out,"<select id=\"Role\" name=\"Role\">");
"<option value=\"%u\" selected=\"selected\"" fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\""
" disabled=\"disabled\">%s</option>", " disabled=\"disabled\">%s</option>",
(unsigned) DefaultRoleInForm, (unsigned) DefaultRoleInForm,
Txt_ROLES_SINGUL_Abc[DefaultRoleInForm][UsrDat->Sex]); Txt_ROLES_SINGUL_Abc[DefaultRoleInForm][UsrDat->Sex]);
@ -3092,8 +3092,8 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
{ {
case Rol_SYS_ADM: case Rol_SYS_ADM:
/***** Selector of role *****/ /***** Selector of role *****/
fprintf (Gbl.F.Out,"<select id=\"Role\" name=\"Role\">" fprintf (Gbl.F.Out,"<select id=\"Role\" name=\"Role\">");
"<option value=\"%u\"" fprintf (Gbl.F.Out,"<option value=\"%u\""
" selected=\"selected\">%s</option>", " selected=\"selected\">%s</option>",
(unsigned) Rol_GST,Txt_ROLES_SINGUL_Abc[Rol_GST][Usr_SEX_UNKNOWN]); (unsigned) Rol_GST,Txt_ROLES_SINGUL_Abc[Rol_GST][Usr_SEX_UNKNOWN]);
HTM_SELECT_End (); HTM_SELECT_End ();
@ -3280,8 +3280,8 @@ static void Rec_ShowCountry (struct UsrData *UsrDat,
/***** Selector of country *****/ /***** Selector of country *****/
fprintf (Gbl.F.Out,"<select id=\"OthCtyCod\" name=\"OthCtyCod\"" fprintf (Gbl.F.Out,"<select id=\"OthCtyCod\" name=\"OthCtyCod\""
" class=\"REC_C2_BOT_INPUT\" required=\"required\">" " class=\"REC_C2_BOT_INPUT\" required=\"required\">");
"<option value=\"\">%s</option>" fprintf (Gbl.F.Out,"<option value=\"\">%s</option>"
"<option value=\"0\"", "<option value=\"0\"",
Txt_Country); Txt_Country);
if (UsrDat->CtyCod == 0) if (UsrDat->CtyCod == 0)
@ -4019,9 +4019,9 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
Frm_StartFormAnchor (ActChgCtyMyIns,Rec_MY_INS_CTR_DPT_ID); Frm_StartFormAnchor (ActChgCtyMyIns,Rec_MY_INS_CTR_DPT_ID);
fprintf (Gbl.F.Out,"<select id=\"OthCtyCod\" name=\"OthCtyCod\"" fprintf (Gbl.F.Out,"<select id=\"OthCtyCod\" name=\"OthCtyCod\""
" class=\"REC_C2_BOT_INPUT\"" " class=\"REC_C2_BOT_INPUT\""
" onchange=\"document.getElementById('%s').submit();return false;\">" " onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"-1\"",
Gbl.Form.Id); Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (Gbl.Usrs.Me.UsrDat.InsCtyCod <= 0) if (Gbl.Usrs.Me.UsrDat.InsCtyCod <= 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\"></option>"); fprintf (Gbl.F.Out," disabled=\"disabled\"></option>");
@ -4062,9 +4062,9 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
Frm_StartFormAnchor (ActChgMyIns,Rec_MY_INS_CTR_DPT_ID); Frm_StartFormAnchor (ActChgMyIns,Rec_MY_INS_CTR_DPT_ID);
fprintf (Gbl.F.Out,"<select id=\"OthInsCod\" name=\"OthInsCod\"" fprintf (Gbl.F.Out,"<select id=\"OthInsCod\" name=\"OthInsCod\""
" class=\"REC_C2_BOT_INPUT\"" " class=\"REC_C2_BOT_INPUT\""
" onchange=\"document.getElementById('%s').submit();return false;\">" " onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"-1\"",
Gbl.Form.Id); Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (Gbl.Usrs.Me.UsrDat.InsCod < 0) if (Gbl.Usrs.Me.UsrDat.InsCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\"></option>" fprintf (Gbl.F.Out," disabled=\"disabled\"></option>"
@ -4112,9 +4112,9 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
Frm_StartFormAnchor (ActChgMyCtr,Rec_MY_INS_CTR_DPT_ID); Frm_StartFormAnchor (ActChgMyCtr,Rec_MY_INS_CTR_DPT_ID);
fprintf (Gbl.F.Out,"<select id=\"OthCtrCod\" name=\"OthCtrCod\"" fprintf (Gbl.F.Out,"<select id=\"OthCtrCod\" name=\"OthCtrCod\""
" class=\"REC_C2_BOT_INPUT\"" " class=\"REC_C2_BOT_INPUT\""
" onchange=\"document.getElementById('%s').submit();return false;\">" " onchange=\"document.getElementById('%s').submit();return false;\">",
"<option value=\"-1\"",
Gbl.Form.Id); Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0) if (Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\"></option>" fprintf (Gbl.F.Out," disabled=\"disabled\"></option>"

View File

@ -453,8 +453,8 @@ void Sta_AskShowCrsHits (void)
/* Number of rows per page */ /* Number of rows per page */
// To use getElementById in Firefox, it's necessary to have the id attribute // To use getElementById in Firefox, it's necessary to have the id attribute
HTM_LABEL_Begin (NULL); HTM_LABEL_Begin (NULL);
fprintf (Gbl.F.Out,"(%s: <select id=\"RowsPage\" name=\"RowsPage\"", fprintf (Gbl.F.Out,"(%s: ",Txt_results_per_page);
Txt_results_per_page); fprintf (Gbl.F.Out,"<select id=\"RowsPage\" name=\"RowsPage\"");
if (Gbl.Stat.ClicksGroupedBy != Sta_CLICKS_CRS_DETAILED_LIST) if (Gbl.Stat.ClicksGroupedBy != Sta_CLICKS_CRS_DETAILED_LIST)
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,">"); fprintf (Gbl.F.Out,">");
@ -2077,10 +2077,9 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
} }
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;" fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_Color_of_the_graphic);
"<select name=\"ColorType\"" fprintf (Gbl.F.Out,"<select name=\"ColorType\""
" onchange=\"document.getElementById('%s').submit();return false;\">", " onchange=\"document.getElementById('%s').submit();return false;\">",
Txt_Color_of_the_graphic,
Gbl.Form.Id); Gbl.Form.Id);
for (ColorType = (Sta_ColorType_t) 0; for (ColorType = (Sta_ColorType_t) 0;
ColorType < Sta_NUM_COLOR_TYPES; ColorType < Sta_NUM_COLOR_TYPES;

View File

@ -3515,11 +3515,10 @@ static void Tst_WriteTFAnsViewTest (unsigned NumQst)
extern const char *Txt_TF_QST[2]; extern const char *Txt_TF_QST[2];
/***** Write selector for the answer *****/ /***** Write selector for the answer *****/
fprintf (Gbl.F.Out,"<select name=\"Ans%06u\">" fprintf (Gbl.F.Out,"<select name=\"Ans%06u\">",NumQst);
"<option value=\"\" selected=\"selected\">&nbsp;</option>" fprintf (Gbl.F.Out,"<option value=\"\" selected=\"selected\">&nbsp;</option>"
"<option value=\"T\">%s</option>" "<option value=\"T\">%s</option>"
"<option value=\"F\">%s</option>", "<option value=\"F\">%s</option>",
NumQst,
Txt_TF_QST[0], Txt_TF_QST[0],
Txt_TF_QST[1]); Txt_TF_QST[1]);
HTM_SELECT_End (); HTM_SELECT_End ();