Version19.53

This commit is contained in:
Antonio Cañas Vargas 2019-11-05 15:47:35 +01:00
parent e823add14d
commit 90b9eef04a
29 changed files with 329 additions and 284 deletions

View File

@ -66,7 +66,7 @@ static unsigned HTM_A_NestingLevel = 0;
static unsigned HTM_SCRIPT_NestingLevel = 0; static unsigned HTM_SCRIPT_NestingLevel = 0;
static unsigned HTM_LABEL_NestingLevel = 0; static unsigned HTM_LABEL_NestingLevel = 0;
static unsigned HTM_TEXTAREA_NestingLevel = 0; static unsigned HTM_TEXTAREA_NestingLevel = 0;
// static unsigned HTM_SELECT_NestingLevel = 0; static unsigned HTM_SELECT_NestingLevel = 0;
/*****************************************************************************/ /*****************************************************************************/
/***************************** Private prototypes ****************************/ /***************************** Private prototypes ****************************/
@ -1195,7 +1195,7 @@ void HTM_SELECT_Begin (bool SubmitOnChange,
Gbl.Form.Id); Gbl.Form.Id);
fprintf (Gbl.F.Out," />"); fprintf (Gbl.F.Out," />");
// HTM_SELECT_NestingLevel++; HTM_SELECT_NestingLevel++;
} }
static void HTM_SELECT_BeginWithoutAttr (void) static void HTM_SELECT_BeginWithoutAttr (void)
@ -1205,12 +1205,12 @@ static void HTM_SELECT_BeginWithoutAttr (void)
void HTM_SELECT_End (void) void HTM_SELECT_End (void)
{ {
// if (HTM_SELECT_NestingLevel == 0) // No SELECT open if (HTM_SELECT_NestingLevel == 0) // No SELECT open
// Ale_ShowAlert (Ale_ERROR,"Trying to close unopened SELECT."); Ale_ShowAlert (Ale_ERROR,"Trying to close unopened SELECT.");
fprintf (Gbl.F.Out,"</select>"); fprintf (Gbl.F.Out,"</select>");
// HTM_SELECT_NestingLevel--; HTM_SELECT_NestingLevel--;
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1129,7 +1129,8 @@ void Att_RequestCreatOrEditAttEvent (void)
HTM_TD_End (); HTM_TD_End ();
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"LT\"");
fprintf (Gbl.F.Out,"<select id=\"ComTchVisible\" name=\"ComTchVisible\">"); HTM_SELECT_Begin (false,
"id=\"ComTchVisible\" name=\"ComTchVisible\"");
fprintf (Gbl.F.Out,"<option value=\"N\""); fprintf (Gbl.F.Out,"<option value=\"N\"");
if (!Att.CommentTchVisible) if (!Att.CommentTchVisible)

View File

@ -428,10 +428,9 @@ static void Ctr_Configuration (bool PrintView)
/* Put form to select institution */ /* Put form to select institution */
Frm_StartForm (ActChgCtrInsCfg); Frm_StartForm (ActChgCtrInsCfg);
fprintf (Gbl.F.Out,"<select id=\"OthInsCod\" name=\"OthInsCod\"" HTM_SELECT_Begin (true,
" class=\"INPUT_SHORT_NAME\"" "id=\"OthInsCod\" name=\"OthInsCod\""
" onchange=\"document.getElementById('%s').submit();return false;\">", " class=\"INPUT_SHORT_NAME\"");
Gbl.Form.Id);
for (NumIns = 0; for (NumIns = 0;
NumIns < Gbl.Hierarchy.Cty.Inss.Num; NumIns < Gbl.Hierarchy.Cty.Inss.Num;
NumIns++) NumIns++)
@ -525,9 +524,8 @@ static void Ctr_Configuration (bool PrintView)
/* Put form to select place */ /* Put form to select place */
Frm_StartForm (ActChgCtrPlcCfg); Frm_StartForm (ActChgCtrPlcCfg);
fprintf (Gbl.F.Out,"<select name=\"PlcCod\" class=\"INPUT_SHORT_NAME\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"PlcCod\" class=\"INPUT_SHORT_NAME\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"0\""); fprintf (Gbl.F.Out,"<option value=\"0\"");
if (Gbl.Hierarchy.Ctr.PlcCod == 0) if (Gbl.Hierarchy.Ctr.PlcCod == 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
@ -1400,13 +1398,14 @@ void Ctr_WriteSelectorOfCentre (void)
/***** Begin form *****/ /***** Begin form *****/
Frm_StartFormGoTo (ActSeeDeg); Frm_StartFormGoTo (ActSeeDeg);
fprintf (Gbl.F.Out,"<select id=\"ctr\" name=\"ctr\" class=\"HIE_SEL\"");
if (Gbl.Hierarchy.Ins.InsCod > 0) if (Gbl.Hierarchy.Ins.InsCod > 0)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();return false;\"", HTM_SELECT_Begin (true,
Gbl.Form.Id); "id=\"ctr\" name=\"ctr\" class=\"HIE_SEL\"");
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); HTM_SELECT_Begin (false,
fprintf (Gbl.F.Out,">"); "id=\"ctr\" name=\"ctr\" class=\"HIE_SEL\""
" disabled=\"disabled\"");
fprintf (Gbl.F.Out,"<option value=\"\""); 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\"");
@ -1517,9 +1516,8 @@ static void Ctr_ListCentresForEdition (void)
{ {
Frm_StartForm (ActChgCtrPlc); Frm_StartForm (ActChgCtrPlc);
Ctr_PutParamOtherCtrCod (Ctr->CtrCod); Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
fprintf (Gbl.F.Out,"<select name=\"PlcCod\" class=\"PLC_SEL\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"PlcCod\" class=\"PLC_SEL\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"0\""); fprintf (Gbl.F.Out,"<option value=\"0\"");
if (Ctr->PlcCod == 0) if (Ctr->PlcCod == 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
@ -1624,9 +1622,8 @@ 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\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"Status\" class=\"INPUT_STATUS\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>" fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>", "<option value=\"%u\">%s</option>",
(unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_PENDING), (unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_PENDING),
@ -2503,7 +2500,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\">"); HTM_SELECT_Begin (false,
"name=\"PlcCod\" class=\"PLC_SEL\">");
fprintf (Gbl.F.Out,"<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\"");

View File

@ -490,15 +490,15 @@ 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.1 (2019-11-05)" #define Log_PLATFORM_VERSION "SWAD 19.53 (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.53: Nov 05, 2019 Code refactoring in HTML selects. (246011 lines)
Version 19.52.1: Nov 05, 2019 Code refactoring in HTML selects. (245967 lines) 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)

View File

@ -1232,9 +1232,8 @@ 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\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "id=\"cty\" name=\"cty\" class=\"HIE_SEL\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"\""); 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\"");

View File

@ -253,10 +253,9 @@ static void Crs_Configuration (bool PrintView)
/* Put form to select degree */ /* Put form to select degree */
Frm_StartForm (ActChgCrsDegCfg); Frm_StartForm (ActChgCrsDegCfg);
fprintf (Gbl.F.Out,"<select id=\"OthDegCod\" name=\"OthDegCod\"" HTM_SELECT_Begin (true,
" class=\"INPUT_SHORT_NAME\"" "id=\"OthDegCod\" name=\"OthDegCod\""
" onchange=\"document.getElementById('%s').submit();return false;\">", " class=\"INPUT_SHORT_NAME\"");
Gbl.Form.Id);
for (NumDeg = 0; for (NumDeg = 0;
NumDeg < Gbl.Hierarchy.Ctr.Degs.Num; NumDeg < Gbl.Hierarchy.Ctr.Degs.Num;
NumDeg++) NumDeg++)
@ -344,9 +343,8 @@ static void Crs_Configuration (bool PrintView)
if (IsForm) if (IsForm)
{ {
Frm_StartForm (ActChgCrsYeaCfg); Frm_StartForm (ActChgCrsYeaCfg);
fprintf (Gbl.F.Out,"<select id=\"OthCrsYear\" name=\"OthCrsYear\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "id=\"OthCrsYear\" name=\"OthCrsYear\"");
Gbl.Form.Id);
for (Year = 0; for (Year = 0;
Year <= Deg_MAX_YEARS_PER_DEGREE; Year <= Deg_MAX_YEARS_PER_DEGREE;
Year++) Year++)
@ -886,13 +884,13 @@ void Crs_WriteSelectorOfCourse (void)
/***** Begin form *****/ /***** Begin form *****/
Frm_StartFormGoTo (ActSeeCrsInf); Frm_StartFormGoTo (ActSeeCrsInf);
fprintf (Gbl.F.Out,"<select id=\"crs\" name=\"crs\" class=\"HIE_SEL\"");
if (Gbl.Hierarchy.Deg.DegCod > 0) if (Gbl.Hierarchy.Deg.DegCod > 0)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();return false;\"", HTM_SELECT_Begin (true,
Gbl.Form.Id); "id=\"crs\" name=\"crs\" class=\"HIE_SEL\"");
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); HTM_SELECT_Begin (false,
fprintf (Gbl.F.Out,">"); "id=\"crs\" name=\"crs\" class=\"HIE_SEL\""
" disabled=\"disabled\"");
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\"");
@ -1059,9 +1057,8 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void)
ActReqSch); ActReqSch);
/***** Start selector of courses *****/ /***** Start selector of courses *****/
fprintf (Gbl.F.Out,"<select id=\"my_courses\" name=\"crs\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "id=\"my_courses\" name=\"crs\"");
Gbl.Form.Id);
/***** Write an option when no course selected *****/ /***** Write an option when no course selected *****/
if (Gbl.Hierarchy.Crs.CrsCod <= 0) // No course selected if (Gbl.Hierarchy.Crs.CrsCod <= 0) // No course selected
@ -1483,9 +1480,8 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
{ {
Frm_StartForm (ActChgCrsYea); Frm_StartForm (ActChgCrsYea);
Crs_PutParamOtherCrsCod (Crs->CrsCod); Crs_PutParamOtherCrsCod (Crs->CrsCod);
fprintf (Gbl.F.Out,"<select name=\"OthCrsYear\" class=\"HIE_SEL_NARROW\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"OthCrsYear\" class=\"HIE_SEL_NARROW\"");
Gbl.Form.Id);
for (YearAux = 0; for (YearAux = 0;
YearAux <= Deg_MAX_YEARS_PER_DEGREE; YearAux <= Deg_MAX_YEARS_PER_DEGREE;
YearAux++) // All the years are permitted because it's possible to move this course to another degree (with other active years) YearAux++) // All the years are permitted because it's possible to move this course to another degree (with other active years)
@ -1555,9 +1551,8 @@ 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\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"Status\" class=\"INPUT_STATUS\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>" fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>", "<option value=\"%u\">%s</option>",
(unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_PENDING), (unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_PENDING),
@ -1677,7 +1672,8 @@ static void Crs_PutFormToCreateCourse (void)
/***** Year *****/ /***** Year *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select name=\"OthCrsYear\" class=\"HIE_SEL_NARROW\">"); HTM_SELECT_Begin (false,
"name=\"OthCrsYear\" class=\"HIE_SEL_NARROW\"");
for (Year = 0; for (Year = 0;
Year <= Deg_MAX_YEARS_PER_DEGREE; Year <= Deg_MAX_YEARS_PER_DEGREE;
Year++) Year++)
@ -3291,7 +3287,8 @@ void Crs_AskRemoveOldCrss (void)
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_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\">"); HTM_SELECT_Begin (false,
"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

@ -562,15 +562,22 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
/***** Year *****/ /***** Year *****/
HTM_TD_Begin ("class=\"RM\""); HTM_TD_Begin ("class=\"RM\"");
fprintf (Gbl.F.Out,"<select id=\"%sYear\" name=\"%sYear\""
" onchange=\""
"adjustDateForm('%s');"
"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();return false;", HTM_SELECT_Begin (false,
Gbl.Form.Id); "id=\"%sYear\" name=\"%sYear\""
fprintf (Gbl.F.Out,"\">"); " onchange=\""
"adjustDateForm('%s');"
"setUTCFromLocalDateTimeForm('%s');"
"document.getElementById('%s').submit();return false;",
Id,ParamName,Id,Id,
Gbl.Form.Id);
else
HTM_SELECT_Begin (false,
"id=\"%sYear\" name=\"%sYear\""
" onchange=\""
"adjustDateForm('%s');"
"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id,Id);
for (Year = FirstYear; for (Year = FirstYear;
Year <= LastYear; Year <= LastYear;
Year++) Year++)
@ -581,15 +588,22 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
/***** Month *****/ /***** Month *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select id=\"%sMonth\" name=\"%sMonth\""
" onchange=\""
"adjustDateForm('%s');"
"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();return false;", HTM_SELECT_Begin (false,
Gbl.Form.Id); "id=\"%sMonth\" name=\"%sMonth\""
fprintf (Gbl.F.Out,"\">"); " onchange=\""
"adjustDateForm('%s');"
"setUTCFromLocalDateTimeForm('%s');"
"document.getElementById('%s').submit();return false;",
Id,ParamName,Id,Id,
Gbl.Form.Id);
else
HTM_SELECT_Begin (false,
"id=\"%sMonth\" name=\"%sMonth\""
" onchange=\""
"adjustDateForm('%s');"
"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id,Id);
for (Month = 1; for (Month = 1;
Month <= 12; Month <= 12;
Month++) Month++)
@ -600,13 +614,18 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
/***** Day *****/ /***** Day *****/
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
fprintf (Gbl.F.Out,"<select id=\"%sDay\" name=\"%sDay\""
" onchange=\"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();return false;", HTM_SELECT_Begin (false,
Gbl.Form.Id); "id=\"%sDay\" name=\"%sDay\""
fprintf (Gbl.F.Out,"\">"); " onchange=\"setUTCFromLocalDateTimeForm('%s');"
"document.getElementById('%s').submit();return false;",
Id,ParamName,Id,
Gbl.Form.Id);
else
HTM_SELECT_Begin (false,
"id=\"%sDay\" name=\"%sDay\""
" onchange=\"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id);
for (Day = 1; for (Day = 1;
Day <= 31; Day <= 31;
Day++) Day++)
@ -617,13 +636,18 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
/***** Hour *****/ /***** Hour *****/
HTM_TD_Begin ("class=\"RM\""); HTM_TD_Begin ("class=\"RM\"");
fprintf (Gbl.F.Out,"<select id=\"%sHour\" name=\"%sHour\""
" onchange=\"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();return false;", HTM_SELECT_Begin (false,
Gbl.Form.Id); "id=\"%sHour\" name=\"%sHour\""
fprintf (Gbl.F.Out,"\">"); " onchange=\"setUTCFromLocalDateTimeForm('%s');"
"document.getElementById('%s').submit();return false;",
Id,ParamName,Id,
Gbl.Form.Id);
else
HTM_SELECT_Begin (false,
"id=\"%sHour\" name=\"%sHour\""
" onchange=\"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id);
for (Hour = 0; for (Hour = 0;
Hour <= 23; Hour <= 23;
Hour++) Hour++)
@ -634,13 +658,18 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
/***** Minute *****/ /***** Minute *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select id=\"%sMinute\" name=\"%sMinute\""
" onchange=\"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();return false;", HTM_SELECT_Begin (false,
Gbl.Form.Id); "id=\"%sMinute\" name=\"%sMinute\""
fprintf (Gbl.F.Out,"\">"); " onchange=\"setUTCFromLocalDateTimeForm('%s');"
"document.getElementById('%s').submit();return false;",
Id,ParamName,Id,
Gbl.Form.Id);
else
HTM_SELECT_Begin (false,
"id=\"%sMinute\" name=\"%sMinute\""
" onchange=\"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id);
for (Minute = 0; for (Minute = 0;
Minute < 60; Minute < 60;
@ -655,13 +684,18 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
if (FormSeconds == Dat_FORM_SECONDS_ON) if (FormSeconds == Dat_FORM_SECONDS_ON)
{ {
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
fprintf (Gbl.F.Out,"<select id=\"%sSecond\" name=\"%sSecond\""
" onchange=\"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();return false;", HTM_SELECT_Begin (false,
Gbl.Form.Id); "id=\"%sSecond\" name=\"%sSecond\""
fprintf (Gbl.F.Out,"\">"); " onchange=\"setUTCFromLocalDateTimeForm('%s');"
"document.getElementById('%s').submit();return false;",
Id,ParamName,Id,
Gbl.Form.Id);
else
HTM_SELECT_Begin (false,
"id=\"%sSecond\" name=\"%sSecond\""
" onchange=\"setUTCFromLocalDateTimeForm('%s');",
Id,ParamName,Id);
for (Second = 0; for (Second = 0;
Second <= 59; Second <= 59;
Second++) Second++)
@ -826,16 +860,22 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
/***** Year *****/ /***** Year *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select id=\"%sYear\" name=\"%sYear\""
" onchange=\"adjustDateForm('%s');",
Id,Id,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();return false;", HTM_SELECT_Begin (false,
Gbl.Form.Id); "id=\"%sYear\" name=\"%sYear\"%s"
fprintf (Gbl.F.Out,"\""); " onchange=\"adjustDateForm('%s');",
if (Disabled) "document.getElementById('%s').submit();return false;",
fprintf (Gbl.F.Out," disabled=\"disabled\""); Id,Id,
fprintf (Gbl.F.Out,">"); Disabled ? " disabled=\"disabled\"" : "",
Id,
Gbl.Form.Id);
else
HTM_SELECT_Begin (false,
"id=\"%sYear\" name=\"%sYear\"%s"
" onchange=\"adjustDateForm('%s');",
Id,Id,
Disabled ? " disabled=\"disabled\"" : "",
Id);
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;
@ -851,16 +891,22 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
/***** Month *****/ /***** Month *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select id=\"%sMonth\" name=\"%sMonth\""
" onchange=\"adjustDateForm('%s');",
Id,Id,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();return false;", HTM_SELECT_Begin (false,
Gbl.Form.Id); "id=\"%sMonth\" name=\"%sMonth\"%s"
fprintf (Gbl.F.Out,"\""); " onchange=\"adjustDateForm('%s');"
if (Disabled) "document.getElementById('%s').submit();return false;",
fprintf (Gbl.F.Out," disabled=\"disabled\""); Id,Id,
fprintf (Gbl.F.Out,">"); Disabled ? " disabled=\"disabled\"" : "",
Id,
Gbl.Form.Id);
else
HTM_SELECT_Begin (false,
"id=\"%sMonth\" name=\"%sMonth\"%s"
" onchange=\"adjustDateForm('%s');",
Id,Id,
Disabled ? " disabled=\"disabled\"" : "",
Id);
fprintf (Gbl.F.Out,"<option value=\"0\">-</option>"); fprintf (Gbl.F.Out,"<option value=\"0\">-</option>");
for (Month = 1; for (Month = 1;
Month <= 12; Month <= 12;
@ -876,13 +922,10 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
/***** Day *****/ /***** Day *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select id=\"%sDay\" name=\"%sDay\"",Id,Id); HTM_SELECT_Begin (SubmitFormOnChange,
if (SubmitFormOnChange) "id=\"%sDay\" name=\"%sDay\"%s",
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();return false;\"", Id,Id,
Gbl.Form.Id); Disabled ? " disabled=\"disabled\"" : "");
if (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>");
NumDaysSelectedMonth = (DateSelected->Month == 0) ? 31 : NumDaysSelectedMonth = (DateSelected->Month == 0) ? 31 :
((DateSelected->Month == 2) ? Dat_GetNumDaysFebruary (DateSelected->Year) : ((DateSelected->Month == 2) ? Dat_GetNumDaysFebruary (DateSelected->Year) :

View File

@ -357,10 +357,9 @@ static void Deg_Configuration (bool PrintView)
/* Put form to select centre */ /* Put form to select centre */
Frm_StartForm (ActChgDegCtrCfg); Frm_StartForm (ActChgDegCtrCfg);
fprintf (Gbl.F.Out,"<select id=\"OthCtrCod\" name=\"OthCtrCod\"" HTM_SELECT_Begin (true,
" class=\"INPUT_SHORT_NAME\"" "id=\"OthCtrCod\" name=\"OthCtrCod\""
" onchange=\"document.getElementById('%s').submit();return false;\">", " class=\"INPUT_SHORT_NAME\"");
Gbl.Form.Id);
for (NumCtr = 0; for (NumCtr = 0;
NumCtr < Gbl.Hierarchy.Ins.Ctrs.Num; NumCtr < Gbl.Hierarchy.Ins.Ctrs.Num;
NumCtr++) NumCtr++)
@ -596,13 +595,13 @@ void Deg_WriteSelectorOfDegree (void)
/***** Begin form *****/ /***** Begin form *****/
Frm_StartFormGoTo (ActSeeCrs); Frm_StartFormGoTo (ActSeeCrs);
fprintf (Gbl.F.Out,"<select id=\"deg\" name=\"deg\" class=\"HIE_SEL\"");
if (Gbl.Hierarchy.Ctr.CtrCod > 0) if (Gbl.Hierarchy.Ctr.CtrCod > 0)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();return false;\"", HTM_SELECT_Begin (true,
Gbl.Form.Id); "id=\"deg\" name=\"deg\" class=\"HIE_SEL\"");
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); HTM_SELECT_Begin (false,
fprintf (Gbl.F.Out,">"); "id=\"deg\" name=\"deg\" class=\"HIE_SEL\""
" disabled=\"disabled\"");
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\"");
@ -769,9 +768,8 @@ static void Deg_ListDegreesForEdition (void)
{ {
Frm_StartForm (ActChgDegTyp); Frm_StartForm (ActChgDegTyp);
Deg_PutParamOtherDegCod (Deg->DegCod); Deg_PutParamOtherDegCod (Deg->DegCod);
fprintf (Gbl.F.Out,"<select name=\"OthDegTypCod\" class=\"HIE_SEL_NARROW\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"OthDegTypCod\" class=\"HIE_SEL_NARROW\"");
Gbl.Form.Id);
for (NumDegTyp = 0; for (NumDegTyp = 0;
NumDegTyp < Gbl.DegTypes.Num; NumDegTyp < Gbl.DegTypes.Num;
NumDegTyp++) NumDegTyp++)
@ -837,9 +835,8 @@ 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\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"Status\" class=\"INPUT_STATUS\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>" fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>", "<option value=\"%u\">%s</option>",
(unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_PENDING), (unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_PENDING),
@ -970,7 +967,8 @@ static void Deg_PutFormToCreateDegree (void)
/***** Degree type *****/ /***** Degree type *****/
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
fprintf (Gbl.F.Out,"<select name=\"OthDegTypCod\" class=\"HIE_SEL_NARROW\">"); HTM_SELECT_Begin (false,
"name=\"OthDegTypCod\" class=\"HIE_SEL_NARROW\"");
for (NumDegTyp = 0; for (NumDegTyp = 0;
NumDegTyp < Gbl.DegTypes.Num; NumDegTyp < Gbl.DegTypes.Num;
NumDegTyp++) NumDegTyp++)

View File

@ -110,9 +110,8 @@ void DT_WriteSelectorDegreeTypes (void)
DT_GetListDegreeTypes (Hie_SYS,DT_ORDER_BY_DEGREE_TYPE); DT_GetListDegreeTypes (Hie_SYS,DT_ORDER_BY_DEGREE_TYPE);
/* List degree types */ /* List degree types */
fprintf (Gbl.F.Out,"<select id=\"OthDegTypCod\" name=\"OthDegTypCod\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "id=\"OthDegTypCod\" name=\"OthDegTypCod\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\""); fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (Gbl.Stat.DegTypCod == -1L) if (Gbl.Stat.DegTypCod == -1L)

View File

@ -539,9 +539,8 @@ static void Dpt_ListDepartmentsForEdition (void)
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
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\"" HTM_SELECT_Begin (true,
"onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"OthInsCod\" class=\"HIE_SEL_NARROW\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"0\""); 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\"");
@ -918,7 +917,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\">"); HTM_SELECT_Begin (false,
"name=\"OthInsCod\" class=\"HIE_SEL_NARROW\"");
fprintf (Gbl.F.Out,"<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\"");
@ -1104,14 +1104,9 @@ void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
/***** Selector to select department *****/ /***** Selector to select department *****/
/* Start selector */ /* Start selector */
fprintf (Gbl.F.Out,"<select id=\"%s\" name=\"%s\"" HTM_SELECT_Begin (SubmitFormOnChange,
" class=\"%s\"", "id=\"%s\" name=\"%s\" class=\"%s\"",
Dpt_PARAM_DPT_COD_NAME,Dpt_PARAM_DPT_COD_NAME, Dpt_PARAM_DPT_COD_NAME,Dpt_PARAM_DPT_COD_NAME,SelectClass);
SelectClass);
if (SubmitFormOnChange)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();return false;\"",
Gbl.Form.Id);
fprintf (Gbl.F.Out,"\">");
if (FirstOption <= 0) if (FirstOption <= 0)
{ {

View File

@ -805,7 +805,8 @@ void Enr_AskRemoveOldUsrs (void)
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_Eliminate_all_users_who_are_not_enroled_on_any_courses_PART_1_OF_2); Txt_Eliminate_all_users_who_are_not_enroled_on_any_courses_PART_1_OF_2);
fprintf (Gbl.F.Out,"<select name=\"Months\">"); HTM_SELECT_Begin (false,
"name=\"Months\"");
for (Months = Usr_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS; for (Months = Usr_MIN_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS;
Months <= Usr_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS; Months <= Usr_MAX_MONTHS_WITHOUT_ACCESS_TO_REMOVE_OLD_USRS;
Months++) Months++)

View File

@ -1119,7 +1119,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 id=\"Year\" name=\"Year\">"); HTM_SELECT_Begin (false,
"id=\"Year\" name=\"Year\"");
for (Year = 0; for (Year = 0;
Year <= Deg_MAX_YEARS_PER_DEGREE; Year <= Deg_MAX_YEARS_PER_DEGREE;
Year++) Year++)
@ -1197,7 +1198,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\">"); HTM_SELECT_Begin (false,
"name=\"ExamHour\"");
fprintf (Gbl.F.Out,"<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\"");
@ -1213,7 +1215,9 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
Hour,Txt_hours_ABBREVIATION); Hour,Txt_hours_ABBREVIATION);
} }
HTM_SELECT_End (); HTM_SELECT_End ();
fprintf (Gbl.F.Out,"<select name=\"ExamMinute\">");
HTM_SELECT_Begin (false,
"name=\"ExamMinute\">");
for (Minute = 0; for (Minute = 0;
Minute <= 59; Minute <= 59;
Minute++) Minute++)
@ -1243,7 +1247,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=\"DurationHour\">"); HTM_SELECT_Begin (false,
"name=\"DurationHour\">");
for (Hour = 0; for (Hour = 0;
Hour <= 8; Hour <= 8;
Hour++) Hour++)
@ -1255,7 +1260,9 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
Hour,Txt_hours_ABBREVIATION); Hour,Txt_hours_ABBREVIATION);
} }
HTM_SELECT_End (); HTM_SELECT_End ();
fprintf (Gbl.F.Out,"<select name=\"DurationMinute\">");
HTM_SELECT_Begin (false,
"name=\"DurationMinute\">");
for (Minute = 0; for (Minute = 0;
Minute <= 59; Minute <= 59;
Minute++) Minute++)

View File

@ -222,7 +222,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;",Txt_Statistic); fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_Statistic);
fprintf (Gbl.F.Out,"<select name=\"FigureType\">"); HTM_SELECT_Begin (false,
"name=\"FigureType\"");
for (FigureType = (Fig_FigureType_t) 0; for (FigureType = (Fig_FigureType_t) 0;
FigureType < Fig_NUM_FIGURES; FigureType < Fig_NUM_FIGURES;
FigureType++) FigureType++)

View File

@ -9575,7 +9575,8 @@ void Brw_ShowFileMetadata (void)
HTM_TD_Begin ("class=\"DAT LM\""); HTM_TD_Begin ("class=\"DAT LM\"");
if (ICanChangePublic) // I can change file to public if (ICanChangePublic) // I can change file to public
{ {
fprintf (Gbl.F.Out,"<select id=\"PublicFile\" name=\"PublicFile\">"); HTM_SELECT_Begin (false,
"id=\"PublicFile\" name=\"PublicFile\"");
fprintf (Gbl.F.Out,"<option value=\"N\""); fprintf (Gbl.F.Out,"<option value=\"N\"");
if (!FileMetadata.IsPublic) if (!FileMetadata.IsPublic)
@ -9610,8 +9611,8 @@ void Brw_ShowFileMetadata (void)
HTM_TD_Begin ("class=\"DAT LM\""); HTM_TD_Begin ("class=\"DAT LM\"");
if (ICanEdit) // I can edit file properties if (ICanEdit) // I can edit file properties
{ {
fprintf (Gbl.F.Out,"<select id=\"License\" name=\"License\">"); HTM_SELECT_Begin (false,
"id=\"License\" name=\"License\">");
for (License = 0; for (License = 0;
License < Brw_NUM_LICENSES; License < Brw_NUM_LICENSES;
License++) License++)
@ -12134,7 +12135,8 @@ void Brw_AskRemoveOldFiles (void)
/***** Form to request number of months (to remove files older) *****/ /***** Form to request number of months (to remove files older) *****/
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;",Txt_Remove_files_older_than_PART_1_OF_2); fprintf (Gbl.F.Out,"%s&nbsp;",Txt_Remove_files_older_than_PART_1_OF_2);
fprintf (Gbl.F.Out,"<select name=\"Months\">"); HTM_SELECT_Begin (false,
"name=\"Months\"");
for (Months = Brw_MIN_MONTHS_TO_REMOVE_OLD_FILES; for (Months = Brw_MIN_MONTHS_TO_REMOVE_OLD_FILES;
Months <= Brw_MAX_MONTHS_IN_BRIEFCASE; Months <= Brw_MAX_MONTHS_IN_BRIEFCASE;
Months++) Months++)

View File

@ -1323,10 +1323,9 @@ static void Grp_ListGroupTypesForEdition (void)
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Frm_StartFormAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
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\"" HTM_SELECT_Begin (true,
" style=\"width:150px;\"" "name=\"MandatoryEnrolment\""
" onchange=\"document.getElementById('%s').submit();return false;\">", " style=\"width:150px;\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"N\""); 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\"");
@ -1345,10 +1344,9 @@ static void Grp_ListGroupTypesForEdition (void)
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Frm_StartFormAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
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\"" HTM_SELECT_Begin (true,
" style=\"width:150px;\"" "name=\"MultipleEnrolment\""
" onchange=\"document.getElementById('%s').submit();return false;\">", " style=\"width:150px;\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"N\""); 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\"");
@ -1548,9 +1546,8 @@ static void Grp_ListGroupsForEdition (void)
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID); Frm_StartFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (Grp->GrpCod);
fprintf (Gbl.F.Out,"<select name=\"GrpTypCod\" style=\"width:100px;\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"GrpTypCod\" style=\"width:100px;\"");
Gbl.Form.Id);
/* Options for group types */ /* Options for group types */
for (NumTipGrpAux = 0; for (NumTipGrpAux = 0;
@ -1583,9 +1580,8 @@ static void Grp_ListGroupsForEdition (void)
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartFormAnchor (ActChgGrpCla,Grp_GROUPS_SECTION_ID); Frm_StartFormAnchor (ActChgGrpCla,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (Grp->GrpCod);
fprintf (Gbl.F.Out,"<select name=\"ClaCod\" style=\"width:100px;\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"ClaCod\" style=\"width:100px;\"");
Gbl.Form.Id);
/* Option for no assigned classroom */ /* Option for no assigned classroom */
fprintf (Gbl.F.Out,"<option value=\"-1\""); fprintf (Gbl.F.Out,"<option value=\"-1\"");
@ -2504,8 +2500,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\"" HTM_SELECT_Begin (false,
" style=\"width:150px;\">"); "name=\"MandatoryEnrolment\" style=\"width:150px;\"");
fprintf (Gbl.F.Out,"<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\"");
@ -2521,8 +2517,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\"" HTM_SELECT_Begin (false,
" style=\"width:150px;\">"); "name=\"MultipleEnrolment\" style=\"width:150px;\"");
fprintf (Gbl.F.Out,"<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\"");
@ -2626,7 +2622,8 @@ static void Grp_PutFormToCreateGroup (void)
/***** Group type *****/ /***** Group type *****/
/* Start selector */ /* Start selector */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select name=\"GrpTypCod\" style=\"width:100px;\">"); HTM_SELECT_Begin (false,
"name=\"GrpTypCod\" style=\"width:100px;\"");
/* Options for group types */ /* Options for group types */
for (NumGrpTyp = 0; for (NumGrpTyp = 0;
@ -2655,7 +2652,8 @@ static void Grp_PutFormToCreateGroup (void)
/***** Classroom *****/ /***** Classroom *****/
/* Start selector */ /* Start selector */
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select name=\"ClaCod\" style=\"width:100px;\">"); HTM_SELECT_Begin (false,
"name=\"ClaCod\" style=\"width:100px;\"");
/* Option for no assigned classroom */ /* Option for no assigned classroom */
fprintf (Gbl.F.Out,"<option value=\"-1\""); fprintf (Gbl.F.Out,"<option value=\"-1\"");

View File

@ -585,9 +585,8 @@ static void Hld_ListHolidaysForEdition (void)
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgHldPlc); Frm_StartForm (ActChgHldPlc);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (Hld->HldCod);
fprintf (Gbl.F.Out,"<select name=\"PlcCod\" class=\"PLC_COD\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"PlcCod\" class=\"PLC_COD\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\""); 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\"");
@ -608,9 +607,8 @@ static void Hld_ListHolidaysForEdition (void)
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgHldTyp); Frm_StartForm (ActChgHldTyp);
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (Hld->HldCod);
fprintf (Gbl.F.Out,"<select name=\"HldTyp\" style=\"width:62px;\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"HldTyp\" style=\"width:62px;\"");
Gbl.Form.Id);
for (HolidayType = (Hld_HolidayType_t) 0; for (HolidayType = (Hld_HolidayType_t) 0;
HolidayType < Hld_NUM_TYPES_HOLIDAY; HolidayType < Hld_NUM_TYPES_HOLIDAY;
HolidayType++) HolidayType++)
@ -986,7 +984,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\">"); HTM_SELECT_Begin (false,
"name=\"PlcCod\" class=\"PLC_COD\"");
fprintf (Gbl.F.Out,"<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\"");
@ -1004,7 +1003,8 @@ static void Hld_PutFormToCreateHoliday (void)
/***** Holiday type *****/ /***** Holiday type *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select name=\"HldTyp\" style=\"width:62px;\">"); HTM_SELECT_Begin (false,
"name=\"HldTyp\" style=\"width:62px;\"");
for (HolidayType = (Hld_HolidayType_t) 0; for (HolidayType = (Hld_HolidayType_t) 0;
HolidayType < Hld_NUM_TYPES_HOLIDAY; HolidayType < Hld_NUM_TYPES_HOLIDAY;
HolidayType++) HolidayType++)

View File

@ -369,10 +369,9 @@ static void Ins_Configuration (bool PrintView)
/* Put form to select country */ /* Put form to select country */
Frm_StartForm (ActChgInsCtyCfg); Frm_StartForm (ActChgInsCtyCfg);
fprintf (Gbl.F.Out,"<select id=\"OthCtyCod\" name=\"OthCtyCod\"" HTM_SELECT_Begin (true,
" class=\"INPUT_SHORT_NAME\"" "id=\"OthCtyCod\" name=\"OthCtyCod\""
" onchange=\"document.getElementById('%s').submit();return false;\">", " class=\"INPUT_SHORT_NAME\"");
Gbl.Form.Id);
for (NumCty = 0; for (NumCty = 0;
NumCty < Gbl.Hierarchy.Sys.Ctys.Num; NumCty < Gbl.Hierarchy.Sys.Ctys.Num;
NumCty++) NumCty++)
@ -1371,13 +1370,13 @@ void Ins_WriteSelectorOfInstitution (void)
/***** Begin form *****/ /***** Begin form *****/
Frm_StartFormGoTo (ActSeeCtr); Frm_StartFormGoTo (ActSeeCtr);
fprintf (Gbl.F.Out,"<select id=\"ins\" name=\"ins\" class=\"HIE_SEL\"");
if (Gbl.Hierarchy.Cty.CtyCod > 0) if (Gbl.Hierarchy.Cty.CtyCod > 0)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();return false;\"", HTM_SELECT_Begin (true,
Gbl.Form.Id); "id=\"ins\" name=\"ins\" class=\"HIE_SEL\"");
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); HTM_SELECT_Begin (false,
fprintf (Gbl.F.Out,">"); "id=\"ins\" name=\"ins\" class=\"HIE_SEL\""
" disabled=\"disabled\"");
fprintf (Gbl.F.Out,"<option value=\"\""); 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\"");
@ -1563,9 +1562,8 @@ 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\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"Status\" class=\"INPUT_STATUS\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>" fprintf (Gbl.F.Out,"<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>", "<option value=\"%u\">%s</option>",
(unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_PENDING), (unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_PENDING),

View File

@ -116,10 +116,8 @@ void Lan_PutSelectorToSelectLanguage (void)
Lan_Language_t Lan; Lan_Language_t Lan;
Frm_StartForm (ActReqChgLan); Frm_StartForm (ActReqChgLan);
fprintf (Gbl.F.Out,"<select name=\"Lan\"" HTM_SELECT_Begin (true,
" style=\"width:112px; margin:0;\"" "name=\"Lan\" style=\"width:112px; margin:0;\"");
" onchange=\"document.getElementById('%s').submit();return false;\">",
Gbl.Form.Id);
for (Lan = (Lan_Language_t) 1; for (Lan = (Lan_Language_t) 1;
Lan <= Lan_NUM_LANGUAGES; Lan <= Lan_NUM_LANGUAGES;
Lan++) Lan++)

View File

@ -2616,7 +2616,8 @@ 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;",TxtSelector[Gbl.Msg.TypeOfMessages]); fprintf (Gbl.F.Out,"%s&nbsp;",TxtSelector[Gbl.Msg.TypeOfMessages]);
fprintf (Gbl.F.Out,"<select name=\"FilterCrsCod\">"); HTM_SELECT_Begin (false,
"name=\"FilterCrsCod\"");
fprintf (Gbl.F.Out,"<option value=\"\""); fprintf (Gbl.F.Out,"<option value=\"\"");
if (Gbl.Msg.FilterCrsCod < 0) if (Gbl.Msg.FilterCrsCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");

View File

@ -1797,9 +1797,8 @@ static void Pho_PutSelectorForTypeOfAvg (void)
Pho_PutHiddenParamPhotoSize (); Pho_PutHiddenParamPhotoSize ();
Pho_PutHiddenParamOrderDegrees (); Pho_PutHiddenParamOrderDegrees ();
Usr_PutParamsPrefsAboutUsrList (); Usr_PutParamsPrefsAboutUsrList ();
fprintf (Gbl.F.Out,"<select id=\"AvgType\" name=\"AvgType\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "id=\"AvgType\" name=\"AvgType\"");
Gbl.Form.Id);
for (TypeOfAvg = (Pho_AvgPhotoTypeOfAverage_t) 0; for (TypeOfAvg = (Pho_AvgPhotoTypeOfAverage_t) 0;
TypeOfAvg < Pho_NUM_AVERAGE_PHOTO_TYPES; TypeOfAvg < Pho_NUM_AVERAGE_PHOTO_TYPES;
TypeOfAvg++) TypeOfAvg++)
@ -1862,9 +1861,8 @@ static void Pho_PutSelectorForHowComputePhotoSize (void)
Pho_PutHiddenParamTypeOfAvg (); Pho_PutHiddenParamTypeOfAvg ();
Pho_PutHiddenParamOrderDegrees (); Pho_PutHiddenParamOrderDegrees ();
Usr_PutParamsPrefsAboutUsrList (); Usr_PutParamsPrefsAboutUsrList ();
fprintf (Gbl.F.Out,"<select id=\"PhotoSize\" name=\"PhotoSize\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "id=\"PhotoSize\" name=\"PhotoSize\"");
Gbl.Form.Id);
for (PhoSi = (Pho_HowComputePhotoSize_t) 0; for (PhoSi = (Pho_HowComputePhotoSize_t) 0;
PhoSi < Pho_NUM_HOW_COMPUTE_PHOTO_SIZES; PhoSi < Pho_NUM_HOW_COMPUTE_PHOTO_SIZES;
PhoSi++) PhoSi++)
@ -1927,9 +1925,8 @@ static void Pho_PutSelectorForHowOrderDegrees (void)
Pho_PutHiddenParamTypeOfAvg (); Pho_PutHiddenParamTypeOfAvg ();
Pho_PutHiddenParamPhotoSize (); Pho_PutHiddenParamPhotoSize ();
Usr_PutParamsPrefsAboutUsrList (); Usr_PutParamsPrefsAboutUsrList ();
fprintf (Gbl.F.Out,"<select id=\"Order\" name=\"Order\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "id=\"Order\" name=\"Order\"");
Gbl.Form.Id);
for (Order = (Pho_HowOrderDegrees_t) 0; for (Order = (Pho_HowOrderDegrees_t) 0;
Order < Pho_NUM_HOW_ORDER_DEGREES; Order < Pho_NUM_HOW_ORDER_DEGREES;
Order++) Order++)
@ -2025,7 +2022,8 @@ static void Pho_PutLinkToCalculateDegreeStats (void)
Frm_LinkFormEnd (); Frm_LinkFormEnd ();
/* Selector with all the degrees with students */ /* Selector with all the degrees with students */
fprintf (Gbl.F.Out,"<select name=\"OthDegCod\">"); HTM_SELECT_Begin (false,
"name=\"OthDegCod\"");
for (NumDeg = 0; for (NumDeg = 0;
NumDeg < Degs.Num; NumDeg < Degs.Num;
NumDeg++) NumDeg++)

View File

@ -3341,7 +3341,8 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
HTM_TD_End (); HTM_TD_End ();
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
fprintf (Gbl.F.Out,"<select name=\"Assigned\">"); HTM_SELECT_Begin (false,
"name=\"Assigned\"");
fprintf (Gbl.F.Out,"<option value=\"Y\""); fprintf (Gbl.F.Out,"<option value=\"Y\"");
if (Prj->Assigned == Prj_ASSIGNED) if (Prj->Assigned == Prj_ASSIGNED)
@ -3379,7 +3380,8 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
HTM_TD_End (); HTM_TD_End ();
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
fprintf (Gbl.F.Out,"<select name=\"Proposal\">"); HTM_SELECT_Begin (false,
"name=\"Proposal\"");
for (Proposal = (Prj_Proposal_t) 0; for (Proposal = (Prj_Proposal_t) 0;
Proposal <= (Prj_Proposal_t) (Prj_NUM_PROPOSAL_TYPES - 1); Proposal <= (Prj_Proposal_t) (Prj_NUM_PROPOSAL_TYPES - 1);
Proposal++) Proposal++)

View File

@ -332,9 +332,8 @@ void Rec_ListFieldsRecordsForEdition (void)
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgVisFie); Frm_StartForm (ActChgVisFie);
Par_PutHiddenParamLong (NULL,"FieldCod",Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod); Par_PutHiddenParamLong (NULL,"FieldCod",Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
fprintf (Gbl.F.Out,"<select name=\"Visibility\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"Visibility\"");
Gbl.Form.Id);
for (Vis = (Rec_VisibilityRecordFields_t) 0; for (Vis = (Rec_VisibilityRecordFields_t) 0;
Vis < (Rec_VisibilityRecordFields_t) Rec_NUM_TYPES_VISIBILITY; Vis < (Rec_VisibilityRecordFields_t) Rec_NUM_TYPES_VISIBILITY;
Vis++) Vis++)
@ -398,7 +397,8 @@ void Rec_ShowFormCreateRecordField (void)
/***** Visibility to students *****/ /***** Visibility to students *****/
HTM_TD_Begin ("class=\"CM\""); HTM_TD_Begin ("class=\"CM\"");
fprintf (Gbl.F.Out,"<select name=\"Visibility\">"); HTM_SELECT_Begin (false,
"name=\"Visibility\"");
for (Vis = (Rec_VisibilityRecordFields_t) 0; for (Vis = (Rec_VisibilityRecordFields_t) 0;
Vis < (Rec_VisibilityRecordFields_t) Rec_NUM_TYPES_VISIBILITY; Vis < (Rec_VisibilityRecordFields_t) Rec_NUM_TYPES_VISIBILITY;
Vis++) Vis++)
@ -409,7 +409,6 @@ void Rec_ShowFormCreateRecordField (void)
fprintf (Gbl.F.Out,">%s</option>", fprintf (Gbl.F.Out,">%s</option>",
Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]); Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
} }
HTM_SELECT_End (); HTM_SELECT_End ();
HTM_TD_End (); HTM_TD_End ();
@ -1494,7 +1493,9 @@ static void Rec_ShowLinkToPrintPreviewOfRecords (void)
Txt_Print); Txt_Print);
Frm_LinkFormEnd (); Frm_LinkFormEnd ();
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"(<select name=\"RecsPerPag\">"); fprintf (Gbl.F.Out,"(");
HTM_SELECT_Begin (false,
"name=\"RecsPerPag\"");
for (i = Rec_MIN_RECORDS_PER_PAGE; for (i = Rec_MIN_RECORDS_PER_PAGE;
i <= Rec_MAX_RECORDS_PER_PAGE; i <= Rec_MAX_RECORDS_PER_PAGE;
i++) i++)
@ -2931,7 +2932,8 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
DefaultRoleInForm = Rol_STD; // Request sign up as a student DefaultRoleInForm = Rol_STD; // Request sign up as a student
/***** Selector of role *****/ /***** Selector of role *****/
fprintf (Gbl.F.Out,"<select id=\"Role\" name=\"Role\">"); HTM_SELECT_Begin (false,
"id=\"Role\" name=\"Role\"");
for (Role = Rol_STD; for (Role = Rol_STD;
Role <= Rol_TCH; Role <= Rol_TCH;
Role++) Role++)
@ -2992,7 +2994,8 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
} }
/***** Selector of role *****/ /***** Selector of role *****/
fprintf (Gbl.F.Out,"<select id=\"Role\" name=\"Role\">"); HTM_SELECT_Begin (false,
"id=\"Role\" name=\"Role\"");
switch (Gbl.Usrs.Me.Role.Logged) switch (Gbl.Usrs.Me.Role.Logged)
{ {
case Rol_GST: case Rol_GST:
@ -3036,7 +3039,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\">"); HTM_SELECT_Begin (false,
"id=\"Role\" name=\"Role\"");
fprintf (Gbl.F.Out,"<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,
@ -3071,7 +3075,8 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
} }
/***** Selector of role *****/ /***** Selector of role *****/
fprintf (Gbl.F.Out,"<select id=\"Role\" name=\"Role\">"); HTM_SELECT_Begin (false,
"id=\"Role\" name=\"Role\"");
for (Role = Rol_STD; for (Role = Rol_STD;
Role <= Rol_TCH; Role <= Rol_TCH;
Role++) Role++)
@ -3092,7 +3097,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\">"); HTM_SELECT_Begin (false,
"id=\"Role\" name=\"Role\"");
fprintf (Gbl.F.Out,"<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]);
@ -3279,8 +3285,9 @@ static void Rec_ShowCountry (struct UsrData *UsrDat,
HTM_TD_Begin ("colspan=\"2\" class=\"REC_C2_BOT LM\""); HTM_TD_Begin ("colspan=\"2\" class=\"REC_C2_BOT LM\"");
/***** Selector of country *****/ /***** Selector of country *****/
fprintf (Gbl.F.Out,"<select id=\"OthCtyCod\" name=\"OthCtyCod\"" HTM_SELECT_Begin (false,
" class=\"REC_C2_BOT_INPUT\" required=\"required\">"); "id=\"OthCtyCod\" name=\"OthCtyCod\""
" class=\"REC_C2_BOT_INPUT\" required=\"required\"");
fprintf (Gbl.F.Out,"<option value=\"\">%s</option>" fprintf (Gbl.F.Out,"<option value=\"\">%s</option>"
"<option value=\"0\"", "<option value=\"0\"",
Txt_Country); Txt_Country);
@ -4017,10 +4024,9 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/* Begin form to select the country of my institution */ /* Begin form to select the country of my institution */
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\"" HTM_SELECT_Begin (true,
" class=\"REC_C2_BOT_INPUT\"" "id=\"OthCtyCod\" name=\"OthCtyCod\""
" onchange=\"document.getElementById('%s').submit();return false;\">", " class=\"REC_C2_BOT_INPUT\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\""); 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\"");
@ -4060,10 +4066,9 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/* Begin form to select institution */ /* Begin form to select institution */
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\"" HTM_SELECT_Begin (true,
" class=\"REC_C2_BOT_INPUT\"" "id=\"OthInsCod\" name=\"OthInsCod\""
" onchange=\"document.getElementById('%s').submit();return false;\">", " class=\"REC_C2_BOT_INPUT\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\""); 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\"");
@ -4110,10 +4115,9 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/* Begin form to select centre */ /* Begin form to select centre */
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\"" HTM_SELECT_Begin (true,
" class=\"REC_C2_BOT_INPUT\"" "id=\"OthCtrCod\" name=\"OthCtrCod\""
" onchange=\"document.getElementById('%s').submit();return false;\">", " class=\"REC_C2_BOT_INPUT\"");
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\""); 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\"");

View File

@ -471,14 +471,21 @@ void Rol_PutFormToChangeMyRole (const char *ClassSelect)
{ {
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];
Rol_Role_t Role; Rol_Role_t Role;
bool PutClassSelect;
Frm_StartForm (ActChgMyRol); Frm_StartForm (ActChgMyRol);
fprintf (Gbl.F.Out,"<select name=\"MyRole\""); HTM_SELECT_Begin (true,
"name=\"MyRole\"%s");
PutClassSelect = false;
if (ClassSelect) if (ClassSelect)
if (ClassSelect[0]) if (ClassSelect[0])
fprintf (Gbl.F.Out," class=\"%s\"",ClassSelect); PutClassSelect = true;
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();return false;\">", if (PutClassSelect)
Gbl.Form.Id); HTM_SELECT_Begin (true,
"name=\"MyRole\" class=\"%s\"",ClassSelect);
else
HTM_SELECT_Begin (true,
"name=\"MyRole\"");
for (Role = Rol_GST; for (Role = Rol_GST;
Role < Rol_NUM_ROLES; Role < Rol_NUM_ROLES;
Role++) Role++)

View File

@ -74,11 +74,8 @@ void Sco_PutSelectorScope (const char *ParamName,bool SendOnChange)
Hie_Level_t Scope; Hie_Level_t Scope;
bool WriteScope; bool WriteScope;
fprintf (Gbl.F.Out,"<select id=\"%s\" name=\"%s\"",ParamName,ParamName); HTM_SELECT_Begin (SendOnChange,
if (SendOnChange) "id=\"%s\" name=\"%s\"",ParamName,ParamName);
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();return false;\"",
Gbl.Form.Id);
fprintf (Gbl.F.Out,">");
for (Scope = (Hie_Level_t) 0; for (Scope = (Hie_Level_t) 0;
Scope < Hie_NUM_LEVELS; Scope < Hie_NUM_LEVELS;

View File

@ -164,7 +164,8 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie
/***** What to search? *****/ /***** What to search? *****/
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;",Txt_SEARCH_X_in_Y); fprintf (Gbl.F.Out," %s&nbsp;",Txt_SEARCH_X_in_Y);
fprintf (Gbl.F.Out,"<select name=\"WhatToSearch\" class=\"WHAT_TO_SEARCH\">"); HTM_SELECT_Begin (false,
"name=\"WhatToSearch\" class=\"WHAT_TO_SEARCH\"");
for (WhatToSearch = (Sch_WhatToSearch_t) 0; for (WhatToSearch = (Sch_WhatToSearch_t) 0;
WhatToSearch < Sch_NUM_WHAT_TO_SEARCH; WhatToSearch < Sch_NUM_WHAT_TO_SEARCH;
WhatToSearch++) WhatToSearch++)

View File

@ -418,9 +418,9 @@ void Sta_AskShowCrsHits (void)
Sta_WriteSelectorCountType (); Sta_WriteSelectorCountType ();
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;" fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;",Txt_distributed_by);
"<select id=\"GroupedBy\" name=\"GroupedBy\">", HTM_SELECT_Begin (false,
Txt_distributed_by); "id=\"GroupedBy\" name=\"GroupedBy\"");
for (ClicksGroupedBy = Sta_CLICKS_CRS_PER_USR; for (ClicksGroupedBy = Sta_CLICKS_CRS_PER_USR;
ClicksGroupedBy <= Sta_CLICKS_CRS_PER_ACTION; ClicksGroupedBy <= Sta_CLICKS_CRS_PER_ACTION;
ClicksGroupedBy++) ClicksGroupedBy++)
@ -454,10 +454,9 @@ void Sta_AskShowCrsHits (void)
// 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: ",Txt_results_per_page); fprintf (Gbl.F.Out,"(%s: ",Txt_results_per_page);
fprintf (Gbl.F.Out,"<select id=\"RowsPage\" name=\"RowsPage\""); HTM_SELECT_Begin (false,
if (Gbl.Stat.ClicksGroupedBy != Sta_CLICKS_CRS_DETAILED_LIST) "id=\"RowsPage\" name=\"RowsPage\"%s",
fprintf (Gbl.F.Out," disabled=\"disabled\""); Gbl.Stat.ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST ? "" : " disabled=\"disabled\"");
fprintf (Gbl.F.Out,">");
for (i = 0; for (i = 0;
i < NUM_OPTIONS_ROWS_PER_PAGE; i < NUM_OPTIONS_ROWS_PER_PAGE;
i++) i++)
@ -548,7 +547,8 @@ void Sta_AskShowGblHits (void)
HTM_TD_End (); HTM_TD_End ();
HTM_TD_Begin ("colspan=\"2\" class=\"LM\""); HTM_TD_Begin ("colspan=\"2\" class=\"LM\"");
fprintf (Gbl.F.Out,"<select id=\"Role\" name=\"Role\" class=\"STAT_SEL\">"); HTM_SELECT_Begin (false,
"id=\"Role\" name=\"Role\" class=\"STAT_SEL\"");
for (RoleStat = (Sta_Role_t) 0; for (RoleStat = (Sta_Role_t) 0;
RoleStat < Sta_NUM_ROLES_STAT; RoleStat < Sta_NUM_ROLES_STAT;
RoleStat++) RoleStat++)
@ -609,7 +609,8 @@ void Sta_AskShowGblHits (void)
Gbl.Stat.ClicksGroupedBy > Sta_CLICKS_GBL_PER_COURSE) Gbl.Stat.ClicksGroupedBy > Sta_CLICKS_GBL_PER_COURSE)
Gbl.Stat.ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAY; Gbl.Stat.ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAY;
fprintf (Gbl.F.Out,"<select name=\"GroupedBy\">"); HTM_SELECT_Begin (false,
"name=\"GroupedBy\"");
for (ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAY; for (ClicksGroupedBy = Sta_CLICKS_GBL_PER_DAY;
ClicksGroupedBy <= Sta_CLICKS_GBL_PER_COURSE; ClicksGroupedBy <= Sta_CLICKS_GBL_PER_COURSE;
ClicksGroupedBy++) ClicksGroupedBy++)
@ -685,7 +686,8 @@ static void Sta_WriteSelectorCountType (void)
Sta_CountType_t StatCountType; Sta_CountType_t StatCountType;
/**** Count type *****/ /**** Count type *****/
fprintf (Gbl.F.Out,"<select id=\"CountType\" name=\"CountType\">"); HTM_SELECT_Begin (false,
"id=\"CountType\" name=\"CountType\"");
for (StatCountType = (Sta_CountType_t) 0; for (StatCountType = (Sta_CountType_t) 0;
StatCountType < Sta_NUM_COUNT_TYPES; StatCountType < Sta_NUM_COUNT_TYPES;
StatCountType++) StatCountType++)
@ -720,7 +722,8 @@ static void Sta_WriteSelectorAction (void)
HTM_TD_End (); HTM_TD_End ();
HTM_TD_Begin ("colspan=\"2\" class=\"LM\""); HTM_TD_Begin ("colspan=\"2\" class=\"LM\"");
fprintf (Gbl.F.Out,"<select id=\"StatAct\" name=\"StatAct\" class=\"STAT_SEL\">"); HTM_SELECT_Begin (false,
"id=\"StatAct\" name=\"StatAct\" class=\"STAT_SEL\"");
for (Action = (Act_Action_t) 0; for (Action = (Act_Action_t) 0;
Action < Act_NUM_ACTIONS; Action < Act_NUM_ACTIONS;
Action++) Action++)
@ -2078,9 +2081,8 @@ 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;",Txt_Color_of_the_graphic); fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_Color_of_the_graphic);
fprintf (Gbl.F.Out,"<select name=\"ColorType\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"ColorType\"");
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;
ColorType++) ColorType++)

View File

@ -3515,7 +3515,8 @@ 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\">",NumQst); HTM_SELECT_Begin (false,
"name=\"Ans%06u\"",NumQst);
fprintf (Gbl.F.Out,"<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>",
@ -5087,9 +5088,10 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
/***** Write the tags already existing in a selector *****/ /***** Write the tags already existing in a selector *****/
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
fprintf (Gbl.F.Out,"<select id=\"SelDesc%u\" name=\"SelDesc%u\"" HTM_SELECT_Begin (false,
" class=\"TAG_SEL\" onchange=\"changeTxtTag('%u')\">", "id=\"SelDesc%u\" name=\"SelDesc%u\""
NumTag,NumTag,NumTag); " class=\"TAG_SEL\" onchange=\"changeTxtTag('%u')\"",
NumTag,NumTag,NumTag);
fprintf (Gbl.F.Out,"<option value=\"\">&nbsp;</option>"); fprintf (Gbl.F.Out,"<option value=\"\">&nbsp;</option>");
mysql_data_seek (mysql_res,0); mysql_data_seek (mysql_res,0);
TagNotFound = true; TagNotFound = true;

View File

@ -1596,9 +1596,8 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
Par_PutHiddenParamUnsigned (NULL,"TTCol",Column); Par_PutHiddenParamUnsigned (NULL,"TTCol",Column);
/***** Class type *****/ /***** Class type *****/
fprintf (Gbl.F.Out,"<select name=\"TTTyp\" class=\"TT_TYP\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"TTTyp\" class=\"TT_TYP\"");
Gbl.Form.Id);
for (CT = (TT_ClassType_t) 0; for (CT = (TT_ClassType_t) 0;
CT < (TT_ClassType_t) TT_NUM_CLASS_TYPES; CT < (TT_ClassType_t) TT_NUM_CLASS_TYPES;
CT++) CT++)
@ -1636,9 +1635,8 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
else else
{ {
/***** Class duration *****/ /***** Class duration *****/
fprintf (Gbl.F.Out,"<select name=\"TTDur\" class=\"TT_DUR\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"TTDur\" class=\"TT_DUR\"");
Gbl.Form.Id);
for (i = Interval + TT_TimeTable[Weekday][Interval].Columns[Column].DurationIntervals; for (i = Interval + TT_TimeTable[Weekday][Interval].Columns[Column].DurationIntervals;
i < Gbl.TimeTable.Config.IntervalsPerDay; i < Gbl.TimeTable.Config.IntervalsPerDay;
i++) i++)
@ -1668,11 +1666,10 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
HTM_LABEL_Begin ("for=\"TTGrp%s\"",CellStr); HTM_LABEL_Begin ("for=\"TTGrp%s\"",CellStr);
fprintf (Gbl.F.Out,"%s",Txt_Group); fprintf (Gbl.F.Out,"%s",Txt_Group);
HTM_LABEL_End (); HTM_LABEL_End ();
fprintf (Gbl.F.Out,"<select id=\"TTGrp%s\" name=\"TTGrp\"" HTM_SELECT_Begin (true,
" class=\"TT_GRP\"" "id=\"TTGrp%s\" name=\"TTGrp\""
" onchange=\"document.getElementById('%s').submit();return false;\">", " class=\"TT_GRP\"",
CellStr, CellStr);
Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\""); fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (GrpCod <= 0) if (GrpCod <= 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");

View File

@ -8938,9 +8938,8 @@ void Usr_PutSelectorNumColsClassPhoto (void)
/***** Start selector *****/ /***** Start selector *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"<select name=\"ColsClassPhoto\"" HTM_SELECT_Begin (true,
" onchange=\"document.getElementById('%s').submit();return false;\">", "name=\"ColsClassPhoto\"");
Gbl.Form.Id);
/***** Put a row in selector for every number from 1 to Usr_CLASS_PHOTO_COLS_MAX *****/ /***** Put a row in selector for every number from 1 to Usr_CLASS_PHOTO_COLS_MAX *****/
for (Cols = 1; for (Cols = 1;