mirror of https://github.com/acanas/swad-core.git
Version 23.31: Oct 10, 2023 Code refactoring in short and full names.
This commit is contained in:
parent
64e6b79510
commit
8e0f439181
|
@ -383,9 +383,6 @@ void Ban_PutIconToViewBanners (void)
|
||||||
|
|
||||||
static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
|
static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *HidVis_DataClass[HidVis_NUM_HIDDEN_VISIBLE];
|
extern const char *HidVis_DataClass[HidVis_NUM_HIDDEN_VISIBLE];
|
||||||
static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] =
|
static Act_Action_t ActionHideUnhide[HidVis_NUM_HIDDEN_VISIBLE] =
|
||||||
{
|
{
|
||||||
|
@ -400,8 +397,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
|
||||||
unsigned NumBan;
|
unsigned NumBan;
|
||||||
struct Ban_Banner *Ban;
|
struct Ban_Banner *Ban;
|
||||||
char *Anchor = NULL;
|
char *Anchor = NULL;
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
@ -450,23 +446,10 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
|
||||||
/* Banner short name and full name */
|
/* Banner short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Ban->ShrtName;
|
Name[Cns_SHRT_NAME] = Ban->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Ban->FullName;
|
Name[Cns_FULL_NAME] = Ban->FullName;
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_PutShortAndFullNames (ActionRename,
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
ParCod_Ban,Banners->BanCodToEdit,
|
||||||
ShrtOrFullName++)
|
Name,
|
||||||
{
|
true); // Put form
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
Frm_BeginForm (ActionRename[ShrtOrFullName]);
|
|
||||||
ParCod_PutPar (ParCod_Ban,Banners->BanCodToEdit);
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
Frm_EndForm ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Banner image */
|
/* Banner image */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
|
|
@ -730,9 +730,6 @@ void Ctr_WriteSelectorOfCenter (void)
|
||||||
|
|
||||||
static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_Another_place;
|
extern const char *Txt_Another_place;
|
||||||
extern const char *Txt_CENTER_STATUS[Hie_NUM_STATUS_TXT];
|
extern const char *Txt_CENTER_STATUS[Hie_NUM_STATUS_TXT];
|
||||||
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
|
@ -743,15 +740,14 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
||||||
unsigned NumCtr;
|
unsigned NumCtr;
|
||||||
struct Hie_Node *Ctr;
|
struct Hie_Node *Ctr;
|
||||||
unsigned NumPlc;
|
unsigned NumPlc;
|
||||||
const struct Plc_Place *PlcInLst;
|
const struct Plc_Place *Plc;
|
||||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||||
struct Usr_Data UsrDat;
|
struct Usr_Data UsrDat;
|
||||||
bool ICanEdit;
|
bool ICanEdit;
|
||||||
unsigned NumDegs;
|
unsigned NumDegs;
|
||||||
unsigned NumUsrsCtr;
|
unsigned NumUsrsCtr;
|
||||||
unsigned NumUsrsInCrssOfCtr;
|
unsigned NumUsrsInCrssOfCtr;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -825,12 +821,12 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
||||||
NumPlc < Places->Num;
|
NumPlc < Places->Num;
|
||||||
NumPlc++)
|
NumPlc++)
|
||||||
{
|
{
|
||||||
PlcInLst = &Places->Lst[NumPlc];
|
Plc = &Places->Lst[NumPlc];
|
||||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
HTM_OPTION (HTM_Type_LONG,&Plc->PlcCod,
|
||||||
PlcInLst->PlcCod == Ctr->Specific.PlcCod ? HTM_OPTION_SELECTED :
|
Plc->PlcCod == Ctr->Specific.PlcCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",PlcInLst->ShrtName);
|
"%s",Plc->ShrtName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -846,28 +842,10 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
||||||
/* Center short name and full name */
|
/* Center short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Ctr->ShrtName;
|
Name[Cns_SHRT_NAME] = Ctr->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Ctr->FullName;
|
Name[Cns_FULL_NAME] = Ctr->FullName;
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_PutShortAndFullNames (ActionRename,
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
ParCod_OthHie,Ctr->HieCod,
|
||||||
ShrtOrFullName++)
|
Name,
|
||||||
{
|
ICanEdit); // Put form?
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
|
||||||
if (ICanEdit)
|
|
||||||
{
|
|
||||||
Frm_BeginForm (ActionRename[ShrtOrFullName]);
|
|
||||||
ParCod_PutPar (ParCod_OthHie,Ctr->HieCod);
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
Frm_EndForm ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
HTM_Txt (Name[ShrtOrFullName]);
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Center WWW */
|
/* Center WWW */
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
|
@ -1265,7 +1243,7 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
||||||
extern const char *Txt_Another_place;
|
extern const char *Txt_Another_place;
|
||||||
Act_Action_t NextAction = ActUnk;
|
Act_Action_t NextAction = ActUnk;
|
||||||
unsigned NumPlc;
|
unsigned NumPlc;
|
||||||
const struct Plc_Place *PlcInLst;
|
const struct Plc_Place *Plc;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
Cns_ShrtOrFullName_t ShrtOrFullName;
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
|
@ -1319,12 +1297,12 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
||||||
NumPlc < Places->Num;
|
NumPlc < Places->Num;
|
||||||
NumPlc++)
|
NumPlc++)
|
||||||
{
|
{
|
||||||
PlcInLst = &Places->Lst[NumPlc];
|
Plc = &Places->Lst[NumPlc];
|
||||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
HTM_OPTION (HTM_Type_LONG,&Plc->PlcCod,
|
||||||
PlcInLst->PlcCod == Ctr_EditingCtr->Specific.PlcCod ? HTM_OPTION_SELECTED :
|
Plc->PlcCod == Ctr_EditingCtr->Specific.PlcCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",PlcInLst->ShrtName);
|
"%s",Plc->ShrtName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
|
@ -536,7 +536,7 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm)
|
||||||
extern const char *Par_CodeStr[];
|
extern const char *Par_CodeStr[];
|
||||||
extern const char *Txt_Institution;
|
extern const char *Txt_Institution;
|
||||||
unsigned NumIns;
|
unsigned NumIns;
|
||||||
const struct Hie_Node *InsInLst;
|
const struct Hie_Node *Ins;
|
||||||
|
|
||||||
/***** Institution *****/
|
/***** Institution *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
@ -563,12 +563,12 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm)
|
||||||
NumIns < Gbl.Hierarchy.List[Hie_CTY].Num;
|
NumIns < Gbl.Hierarchy.List[Hie_CTY].Num;
|
||||||
NumIns++)
|
NumIns++)
|
||||||
{
|
{
|
||||||
InsInLst = &Gbl.Hierarchy.List[Hie_CTY].Lst[NumIns];
|
Ins = &Gbl.Hierarchy.List[Hie_CTY].Lst[NumIns];
|
||||||
HTM_OPTION (HTM_Type_LONG,&InsInLst->HieCod,
|
HTM_OPTION (HTM_Type_LONG,&Ins->HieCod,
|
||||||
InsInLst->HieCod == Gbl.Hierarchy.Node[Hie_INS].HieCod ? HTM_OPTION_SELECTED :
|
Ins->HieCod == Gbl.Hierarchy.Node[Hie_INS].HieCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",InsInLst->ShrtName);
|
"%s",Ins->ShrtName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -635,7 +635,6 @@ static void CtrCfg_Place (bool PutForm)
|
||||||
struct Plc_Places Places;
|
struct Plc_Places Places;
|
||||||
struct Plc_Place Plc;
|
struct Plc_Place Plc;
|
||||||
unsigned NumPlc;
|
unsigned NumPlc;
|
||||||
const struct Plc_Place *PlcInLst;
|
|
||||||
|
|
||||||
/***** Reset places context *****/
|
/***** Reset places context *****/
|
||||||
Plc_ResetPlaces (&Places);
|
Plc_ResetPlaces (&Places);
|
||||||
|
@ -665,20 +664,17 @@ static void CtrCfg_Place (bool PutForm)
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
HTM_OPTION (HTM_Type_STRING,"0",
|
HTM_OPTION (HTM_Type_STRING,"0",
|
||||||
Gbl.Hierarchy.Node[Hie_CTR].Specific.PlcCod == 0 ? HTM_OPTION_SELECTED :
|
Gbl.Hierarchy.Node[Hie_CTR].Specific.PlcCod == 0 ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",Txt_Another_place);
|
"%s",Txt_Another_place);
|
||||||
for (NumPlc = 0;
|
for (NumPlc = 0;
|
||||||
NumPlc < Places.Num;
|
NumPlc < Places.Num;
|
||||||
NumPlc++)
|
NumPlc++)
|
||||||
{
|
HTM_OPTION (HTM_Type_LONG,&Places.Lst[NumPlc].PlcCod,
|
||||||
PlcInLst = &Places.Lst[NumPlc];
|
Places.Lst[NumPlc].PlcCod == Gbl.Hierarchy.Node[Hie_CTR].Specific.PlcCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
HTM_OPTION_UNSELECTED,
|
||||||
PlcInLst->PlcCod == Gbl.Hierarchy.Node[Hie_CTR].Specific.PlcCod ? HTM_OPTION_SELECTED :
|
|
||||||
HTM_OPTION_UNSELECTED,
|
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",PlcInLst->ShrtName);
|
"%s",Places.Lst[NumPlc].ShrtName);
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
||||||
|
|
|
@ -632,10 +632,11 @@ TODO: Francisco Javier Fern
|
||||||
Me sale este error, no sé si por no recordar yo la sintaxis apropiada para mandar a varios destinatarios. ¿No era así?
|
Me sale este error, no sé si por no recordar yo la sintaxis apropiada para mandar a varios destinatarios. ¿No era así?
|
||||||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 23.30 (2023-10-09)"
|
#define Log_PLATFORM_VERSION "SWAD 23.31 (2023-10-10)"
|
||||||
#define CSS_FILE "swad23.25.2.css"
|
#define CSS_FILE "swad23.25.2.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
|
Version 23.31: Oct 10, 2023 Code refactoring in short and full names. (336169 lines)
|
||||||
Version 23.30: Oct 09, 2023 Code refactoring in short and full names. (336293 lines)
|
Version 23.30: Oct 09, 2023 Code refactoring in short and full names. (336293 lines)
|
||||||
Version 23.29: Oct 07, 2023 Code refactoring in short and full names. (336131 lines)
|
Version 23.29: Oct 07, 2023 Code refactoring in short and full names. (336131 lines)
|
||||||
Version 23.28: Oct 06, 2023 New file swad_constant.c.
|
Version 23.28: Oct 06, 2023 New file swad_constant.c.
|
||||||
|
|
|
@ -846,7 +846,7 @@ void Cty_WriteSelectorOfCountry (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Country;
|
extern const char *Txt_Country;
|
||||||
unsigned NumCty;
|
unsigned NumCty;
|
||||||
const struct Hie_Node *CtyInLst;
|
const struct Hie_Node *Cty;
|
||||||
|
|
||||||
/***** Get list of countries *****/
|
/***** Get list of countries *****/
|
||||||
Cty_GetBasicListOfCountries ();
|
Cty_GetBasicListOfCountries ();
|
||||||
|
@ -871,12 +871,12 @@ void Cty_WriteSelectorOfCountry (void)
|
||||||
NumCty < Gbl.Hierarchy.List[Hie_SYS].Num;
|
NumCty < Gbl.Hierarchy.List[Hie_SYS].Num;
|
||||||
NumCty++)
|
NumCty++)
|
||||||
{
|
{
|
||||||
CtyInLst = &Gbl.Hierarchy.List[Hie_SYS].Lst[NumCty];
|
Cty = &Gbl.Hierarchy.List[Hie_SYS].Lst[NumCty];
|
||||||
HTM_OPTION (HTM_Type_LONG,&CtyInLst->HieCod,
|
HTM_OPTION (HTM_Type_LONG,&Cty->HieCod,
|
||||||
CtyInLst->HieCod == Gbl.Hierarchy.Node[Hie_CTY].HieCod ? HTM_OPTION_SELECTED :
|
Cty->HieCod == Gbl.Hierarchy.Node[Hie_CTY].HieCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",CtyInLst->FullName);
|
"%s",Cty->FullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End selector of country *****/
|
/***** End selector of country *****/
|
||||||
|
|
|
@ -916,9 +916,6 @@ static void Crs_ListCoursesForEdition (void)
|
||||||
|
|
||||||
static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
||||||
extern const char *Txt_COURSE_STATUS[Hie_NUM_STATUS_TXT];
|
extern const char *Txt_COURSE_STATUS[Hie_NUM_STATUS_TXT];
|
||||||
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
|
@ -932,8 +929,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
struct Usr_Data UsrDat;
|
struct Usr_Data UsrDat;
|
||||||
bool ICanEdit;
|
bool ICanEdit;
|
||||||
unsigned NumUsrs[Rol_NUM_ROLES];
|
unsigned NumUsrs[Rol_NUM_ROLES];
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -1020,28 +1016,10 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
/* Course short name and full name */
|
/* Course short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Crs->ShrtName;
|
Name[Cns_SHRT_NAME] = Crs->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Crs->FullName;
|
Name[Cns_FULL_NAME] = Crs->FullName;
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_PutShortAndFullNames (ActionRename,
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
ParCod_OthHie,Crs->HieCod,
|
||||||
ShrtOrFullName++)
|
Name,
|
||||||
{
|
ICanEdit); // Put form?
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
|
||||||
if (ICanEdit)
|
|
||||||
{
|
|
||||||
Frm_BeginForm (ActionRename[ShrtOrFullName]);
|
|
||||||
ParCod_PutPar (ParCod_OthHie,Crs->HieCod);
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
Frm_EndForm ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
HTM_Txt (Name[ShrtOrFullName]);
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Current number of teachers in this course */
|
/* Current number of teachers in this course */
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
|
|
|
@ -198,7 +198,7 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm)
|
||||||
extern const char *Par_CodeStr[];
|
extern const char *Par_CodeStr[];
|
||||||
extern const char *Txt_Degree;
|
extern const char *Txt_Degree;
|
||||||
unsigned NumDeg;
|
unsigned NumDeg;
|
||||||
const struct Hie_Node *DegInLst;
|
const struct Hie_Node *Deg;
|
||||||
|
|
||||||
/***** Degree *****/
|
/***** Degree *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
@ -225,12 +225,12 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm)
|
||||||
NumDeg < Gbl.Hierarchy.List[Hie_CTR].Num;
|
NumDeg < Gbl.Hierarchy.List[Hie_CTR].Num;
|
||||||
NumDeg++)
|
NumDeg++)
|
||||||
{
|
{
|
||||||
DegInLst = &Gbl.Hierarchy.List[Hie_CTR].Lst[NumDeg];
|
Deg = &Gbl.Hierarchy.List[Hie_CTR].Lst[NumDeg];
|
||||||
HTM_OPTION (HTM_Type_LONG,&DegInLst->HieCod,
|
HTM_OPTION (HTM_Type_LONG,&Deg->HieCod,
|
||||||
DegInLst->HieCod == Gbl.Hierarchy.Node[Hie_DEG].HieCod ? HTM_OPTION_SELECTED :
|
Deg->HieCod == Gbl.Hierarchy.Node[Hie_DEG].HieCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",DegInLst->ShrtName);
|
"%s",Deg->ShrtName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
|
@ -316,9 +316,6 @@ void Deg_ShowDegsOfCurrentCtr (void)
|
||||||
|
|
||||||
static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_DEGREE_STATUS[Hie_NUM_STATUS_TXT];
|
extern const char *Txt_DEGREE_STATUS[Hie_NUM_STATUS_TXT];
|
||||||
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
|
@ -334,8 +331,7 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
||||||
bool ICanEdit;
|
bool ICanEdit;
|
||||||
unsigned NumCrss;
|
unsigned NumCrss;
|
||||||
unsigned NumUsrsInCrssOfDeg;
|
unsigned NumUsrsInCrssOfDeg;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -391,28 +387,10 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
||||||
/* Degree short name and full name */
|
/* Degree short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Deg->ShrtName;
|
Name[Cns_SHRT_NAME] = Deg->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Deg->FullName;
|
Name[Cns_FULL_NAME] = Deg->FullName;
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_PutShortAndFullNames (ActionRename,
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
ParCod_OthHie,Deg->HieCod,
|
||||||
ShrtOrFullName++)
|
Name,
|
||||||
{
|
ICanEdit); // Put form?
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
|
||||||
if (ICanEdit)
|
|
||||||
{
|
|
||||||
Frm_BeginForm (ActionRename[ShrtOrFullName]);
|
|
||||||
ParCod_PutPar (ParCod_OthHie,Deg->HieCod);
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
Frm_EndForm ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
HTM_Txt (Name[ShrtOrFullName]);
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Degree type */
|
/* Degree type */
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
|
@ -533,7 +511,7 @@ static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
||||||
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
Act_Action_t NextAction = ActUnk;
|
Act_Action_t NextAction = ActUnk;
|
||||||
unsigned NumDegTyp;
|
unsigned NumDegTyp;
|
||||||
struct DegTyp_DegreeType *DegTypInLst;
|
struct DegTyp_DegreeType *DegTyp;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
Cns_ShrtOrFullName_t ShrtOrFullName;
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
|
@ -600,12 +578,12 @@ static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
||||||
NumDegTyp < DegTypes->Num;
|
NumDegTyp < DegTypes->Num;
|
||||||
NumDegTyp++)
|
NumDegTyp++)
|
||||||
{
|
{
|
||||||
DegTypInLst = &DegTypes->Lst[NumDegTyp];
|
DegTyp = &DegTypes->Lst[NumDegTyp];
|
||||||
HTM_OPTION (HTM_Type_LONG,&DegTypInLst->DegTypCod,
|
HTM_OPTION (HTM_Type_LONG,&DegTyp->DegTypCod,
|
||||||
DegTypInLst->DegTypCod == Deg_EditingDeg->Specific.TypCod ? HTM_OPTION_SELECTED :
|
DegTyp->DegTypCod == Deg_EditingDeg->Specific.TypCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",DegTypInLst->DegTypName);
|
"%s",DegTyp->DegTypName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
|
@ -193,7 +193,7 @@ static void DegCfg_Center (bool PrintView,bool PutForm)
|
||||||
extern const char *Par_CodeStr[];
|
extern const char *Par_CodeStr[];
|
||||||
extern const char *Txt_Center;
|
extern const char *Txt_Center;
|
||||||
unsigned NumCtr;
|
unsigned NumCtr;
|
||||||
const struct Hie_Node *CtrInLst;
|
const struct Hie_Node *Ctr;
|
||||||
|
|
||||||
/***** Center *****/
|
/***** Center *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
@ -220,12 +220,12 @@ static void DegCfg_Center (bool PrintView,bool PutForm)
|
||||||
NumCtr < Gbl.Hierarchy.List[Hie_INS].Num;
|
NumCtr < Gbl.Hierarchy.List[Hie_INS].Num;
|
||||||
NumCtr++)
|
NumCtr++)
|
||||||
{
|
{
|
||||||
CtrInLst = &Gbl.Hierarchy.List[Hie_INS].Lst[NumCtr];
|
Ctr = &Gbl.Hierarchy.List[Hie_INS].Lst[NumCtr];
|
||||||
HTM_OPTION (HTM_Type_LONG,&CtrInLst->HieCod,
|
HTM_OPTION (HTM_Type_LONG,&Ctr->HieCod,
|
||||||
CtrInLst->HieCod == Gbl.Hierarchy.Node[Hie_CTR].HieCod ? HTM_OPTION_SELECTED :
|
Ctr->HieCod == Gbl.Hierarchy.Node[Hie_CTR].HieCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",CtrInLst->ShrtName);
|
"%s",Ctr->ShrtName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
|
@ -105,7 +105,7 @@ void DegTyp_WriteSelectorDegreeTypes (long SelectedDegTypCod)
|
||||||
extern const char *Txt_Any_type_of_degree;
|
extern const char *Txt_Any_type_of_degree;
|
||||||
struct DegTyp_DegTypes DegTypes;
|
struct DegTyp_DegTypes DegTypes;
|
||||||
unsigned NumDegTyp;
|
unsigned NumDegTyp;
|
||||||
const struct DegTyp_DegreeType *DegTypInLst;
|
const struct DegTyp_DegreeType *DegTyp;
|
||||||
|
|
||||||
/***** Form to select degree types *****/
|
/***** Form to select degree types *****/
|
||||||
/* Get list of degree types */
|
/* Get list of degree types */
|
||||||
|
@ -125,12 +125,12 @@ void DegTyp_WriteSelectorDegreeTypes (long SelectedDegTypCod)
|
||||||
NumDegTyp < DegTypes.Num;
|
NumDegTyp < DegTypes.Num;
|
||||||
NumDegTyp++)
|
NumDegTyp++)
|
||||||
{
|
{
|
||||||
DegTypInLst = &DegTypes.Lst[NumDegTyp];
|
DegTyp = &DegTypes.Lst[NumDegTyp];
|
||||||
HTM_OPTION (HTM_Type_LONG,&DegTypInLst->DegTypCod,
|
HTM_OPTION (HTM_Type_LONG,&DegTyp->DegTypCod,
|
||||||
DegTypInLst->DegTypCod == SelectedDegTypCod ? HTM_OPTION_SELECTED :
|
DegTyp->DegTypCod == SelectedDegTypCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",DegTypInLst->DegTypName);
|
"%s",DegTyp->DegTypName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
|
|
||||||
|
|
|
@ -464,9 +464,6 @@ static void Dpt_GetDepartmentDataFromRow (MYSQL_RES *mysql_res,
|
||||||
|
|
||||||
static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departments)
|
static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departments)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_Another_institution;
|
extern const char *Txt_Another_institution;
|
||||||
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
|
@ -474,12 +471,10 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
||||||
[Cns_FULL_NAME] = ActRenDptFul,
|
[Cns_FULL_NAME] = ActRenDptFul,
|
||||||
};
|
};
|
||||||
unsigned NumDpt;
|
unsigned NumDpt;
|
||||||
struct Dpt_Department *DptInLst;
|
struct Dpt_Department *Dpt;
|
||||||
struct Hie_Node Ins;
|
|
||||||
unsigned NumIns;
|
unsigned NumIns;
|
||||||
struct Hie_Node *InsInLst;
|
struct Hie_Node *Ins;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginPadding (2);
|
HTM_TABLE_BeginPadding (2);
|
||||||
|
@ -492,82 +487,65 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
||||||
NumDpt < Departments->Num;
|
NumDpt < Departments->Num;
|
||||||
NumDpt++)
|
NumDpt++)
|
||||||
{
|
{
|
||||||
DptInLst = &Departments->Lst[NumDpt];
|
Dpt = &Departments->Lst[NumDpt];
|
||||||
|
|
||||||
/* Get data of institution of this department */
|
|
||||||
Ins.HieCod = DptInLst->InsCod;
|
|
||||||
Ins_GetInstitDataByCod (&Ins);
|
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/* Icon to remove department */
|
/* Icon to remove department */
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
if (DptInLst->NumTchs) // Department has teachers ==> deletion forbidden
|
if (Dpt->NumTchs) // Department has teachers ==> deletion forbidden
|
||||||
Ico_PutIconRemovalNotAllowed ();
|
Ico_PutIconRemovalNotAllowed ();
|
||||||
else
|
else
|
||||||
Ico_PutContextualIconToRemove (ActRemDpt,NULL,
|
Ico_PutContextualIconToRemove (ActRemDpt,NULL,
|
||||||
Dpt_PutParDptCod,&DptInLst->DptCod);
|
Dpt_PutParDptCod,&Dpt->DptCod);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Department code */
|
/* Department code */
|
||||||
HTM_TD_Begin ("class=\"DAT_%s CODE\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"DAT_%s CODE\"",The_GetSuffix ());
|
||||||
HTM_TxtF ("%ld ",DptInLst->DptCod);
|
HTM_TxtF ("%ld ",Dpt->DptCod);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Institution */
|
/* Institution */
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Frm_BeginForm (ActChgDptIns);
|
Frm_BeginForm (ActChgDptIns);
|
||||||
ParCod_PutPar (ParCod_Dpt,DptInLst->DptCod);
|
ParCod_PutPar (ParCod_Dpt,Dpt->DptCod);
|
||||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
|
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
|
||||||
"name=\"OthInsCod\""
|
"name=\"OthInsCod\""
|
||||||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
HTM_OPTION (HTM_Type_STRING,"0",
|
HTM_OPTION (HTM_Type_STRING,"0",
|
||||||
DptInLst->InsCod == 0 ? HTM_OPTION_SELECTED :
|
Dpt->InsCod == 0 ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",Txt_Another_institution);
|
"%s",Txt_Another_institution);
|
||||||
for (NumIns = 0;
|
for (NumIns = 0;
|
||||||
NumIns < Gbl.Hierarchy.List[Hie_CTY].Num;
|
NumIns < Gbl.Hierarchy.List[Hie_CTY].Num;
|
||||||
NumIns++)
|
NumIns++)
|
||||||
{
|
{
|
||||||
InsInLst = &Gbl.Hierarchy.List[Hie_CTY].Lst[NumIns];
|
Ins = &Gbl.Hierarchy.List[Hie_CTY].Lst[NumIns];
|
||||||
HTM_OPTION (HTM_Type_LONG,&InsInLst->HieCod,
|
HTM_OPTION (HTM_Type_LONG,&Ins->HieCod,
|
||||||
InsInLst->HieCod == DptInLst->InsCod ? HTM_OPTION_SELECTED :
|
Ins->HieCod == Dpt->InsCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",InsInLst->ShrtName);
|
"%s",Ins->ShrtName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Department short name and full name */
|
/* Department short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = DptInLst->ShrtName;
|
Name[Cns_SHRT_NAME] = Dpt->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = DptInLst->FullName;
|
Name[Cns_FULL_NAME] = Dpt->FullName;
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_PutShortAndFullNames (ActionRename,
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
ParCod_Dpt,Dpt->DptCod,
|
||||||
ShrtOrFullName++)
|
Name,
|
||||||
{
|
true); // Put form
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
Frm_BeginForm (ActionRename[ShrtOrFullName]);
|
|
||||||
ParCod_PutPar (ParCod_Dpt,DptInLst->DptCod);
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
Frm_EndForm ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Department WWW */
|
/* Department WWW */
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Frm_BeginForm (ActChgDptWWW);
|
Frm_BeginForm (ActChgDptWWW);
|
||||||
ParCod_PutPar (ParCod_Dpt,DptInLst->DptCod);
|
ParCod_PutPar (ParCod_Dpt,Dpt->DptCod);
|
||||||
HTM_INPUT_URL ("WWW",DptInLst->WWW,HTM_SUBMIT_ON_CHANGE,
|
HTM_INPUT_URL ("WWW",Dpt->WWW,HTM_SUBMIT_ON_CHANGE,
|
||||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||||
" required=\"required\"",
|
" required=\"required\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
|
@ -576,7 +554,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
||||||
|
|
||||||
/* Number of teachers */
|
/* Number of teachers */
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_Unsigned (DptInLst->NumTchs);
|
HTM_Unsigned (Dpt->NumTchs);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -821,7 +799,7 @@ static void Dpt_PutFormToCreateDepartment (void)
|
||||||
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
extern const char *Txt_Another_institution;
|
extern const char *Txt_Another_institution;
|
||||||
unsigned NumIns;
|
unsigned NumIns;
|
||||||
const struct Hie_Node *InsInLst;
|
const struct Hie_Node *Ins;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
Cns_ShrtOrFullName_t ShrtOrFullName;
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
|
@ -860,12 +838,12 @@ static void Dpt_PutFormToCreateDepartment (void)
|
||||||
NumIns < Gbl.Hierarchy.List[Hie_CTY].Num;
|
NumIns < Gbl.Hierarchy.List[Hie_CTY].Num;
|
||||||
NumIns++)
|
NumIns++)
|
||||||
{
|
{
|
||||||
InsInLst = &Gbl.Hierarchy.List[Hie_CTY].Lst[NumIns];
|
Ins = &Gbl.Hierarchy.List[Hie_CTY].Lst[NumIns];
|
||||||
HTM_OPTION (HTM_Type_LONG,&InsInLst->HieCod,
|
HTM_OPTION (HTM_Type_LONG,&Ins->HieCod,
|
||||||
InsInLst->HieCod == Dpt_EditingDpt->InsCod ? HTM_OPTION_SELECTED :
|
Ins->HieCod == Dpt_EditingDpt->InsCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",InsInLst->ShrtName);
|
"%s",Ins->ShrtName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -1050,7 +1028,7 @@ void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
|
||||||
extern const char *Txt_Another_department;
|
extern const char *Txt_Another_department;
|
||||||
struct Dpt_Departments Departments;
|
struct Dpt_Departments Departments;
|
||||||
unsigned NumDpt;
|
unsigned NumDpt;
|
||||||
const struct Dpt_Department *DptInLst;
|
const struct Dpt_Department *Dpt;
|
||||||
bool NoDptSelectable;
|
bool NoDptSelectable;
|
||||||
|
|
||||||
/***** Reset departments context *****/
|
/***** Reset departments context *****/
|
||||||
|
@ -1096,12 +1074,12 @@ void Dpt_WriteSelectorDepartment (long InsCod,long DptCod,
|
||||||
NumDpt < Departments.Num;
|
NumDpt < Departments.Num;
|
||||||
NumDpt++)
|
NumDpt++)
|
||||||
{
|
{
|
||||||
DptInLst = &Departments.Lst[NumDpt];
|
Dpt = &Departments.Lst[NumDpt];
|
||||||
HTM_OPTION (HTM_Type_LONG,&DptInLst->DptCod,
|
HTM_OPTION (HTM_Type_LONG,&Dpt->DptCod,
|
||||||
DptInLst->DptCod == DptCod ? HTM_OPTION_SELECTED :
|
Dpt->DptCod == DptCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",DptInLst->FullName);
|
"%s",Dpt->FullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End selector */
|
/* End selector */
|
||||||
|
|
38
swad_form.c
38
swad_form.c
|
@ -352,3 +352,41 @@ void Frm_LabelColumn (const char *TDClass,const char *Id,const char *Label)
|
||||||
/***** Column/cell end *****/
|
/***** Column/cell end *****/
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************************ Write short and full names *************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Frm_PutShortAndFullNames (Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES],
|
||||||
|
ParCod_Param_t ParCod,long Cod,
|
||||||
|
const char *Name[Cns_NUM_SHRT_FULL_NAMES],
|
||||||
|
bool PutForm)
|
||||||
|
{
|
||||||
|
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
Cns_ShrtOrFullName_t ShrtOrFullName;
|
||||||
|
|
||||||
|
for (ShrtOrFullName = Cns_SHRT_NAME;
|
||||||
|
ShrtOrFullName <= Cns_FULL_NAME;
|
||||||
|
ShrtOrFullName++)
|
||||||
|
{
|
||||||
|
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
|
if (PutForm)
|
||||||
|
{
|
||||||
|
Frm_BeginForm (ActionRename[ShrtOrFullName]);
|
||||||
|
ParCod_PutPar (ParCod,Cod);
|
||||||
|
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
||||||
|
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
||||||
|
Name[ShrtOrFullName],
|
||||||
|
HTM_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"%s INPUT_%s\"",
|
||||||
|
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
||||||
|
The_GetSuffix ());
|
||||||
|
Frm_EndForm ();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
HTM_Txt (Name[ShrtOrFullName]);
|
||||||
|
HTM_TD_End ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "swad_button.h"
|
#include "swad_button.h"
|
||||||
#include "swad_constant.h"
|
#include "swad_constant.h"
|
||||||
#include "swad_cryptography.h"
|
#include "swad_cryptography.h"
|
||||||
|
#include "swad_parameter_code.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************************** Public constants and types ***********************/
|
/************************** Public constants and types ***********************/
|
||||||
|
@ -78,4 +79,9 @@ void Frm_FreeAnchorStr (char **Anchor);
|
||||||
|
|
||||||
void Frm_LabelColumn (const char *TDClass,const char *Id,const char *Label);
|
void Frm_LabelColumn (const char *TDClass,const char *Id,const char *Label);
|
||||||
|
|
||||||
|
void Frm_PutShortAndFullNames (Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES],
|
||||||
|
ParCod_Param_t ParCod,long Cod,
|
||||||
|
const char *Name[Cns_NUM_SHRT_FULL_NAMES],
|
||||||
|
bool PutForm);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
56
swad_group.c
56
swad_group.c
|
@ -1390,13 +1390,13 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
||||||
extern const char *Txt_No_assigned_room;
|
extern const char *Txt_No_assigned_room;
|
||||||
extern const char *Txt_Another_room;
|
extern const char *Txt_Another_room;
|
||||||
unsigned NumGrpTyp1;
|
unsigned NumGrpTyp1;
|
||||||
const struct GroupType *GrpTyp1InLst;
|
const struct GroupType *GrpTyp1;
|
||||||
unsigned NumGrpTyp2;
|
unsigned NumGrpTyp2;
|
||||||
const struct GroupType *GrpTyp2InLst;
|
const struct GroupType *GrpTyp2;
|
||||||
unsigned NumGrpThisType;
|
unsigned NumGrpThisType;
|
||||||
struct Group *Grp;
|
struct Group *Grp;
|
||||||
unsigned NumRoo;
|
unsigned NumRoo;
|
||||||
const struct Roo_Room *RooInLst;
|
const struct Roo_Room *Roo;
|
||||||
Rol_Role_t Role;
|
Rol_Role_t Role;
|
||||||
char StrMaxStudents[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
char StrMaxStudents[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||||
|
|
||||||
|
@ -1411,12 +1411,12 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
||||||
NumGrpTyp1 < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
NumGrpTyp1 < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
||||||
NumGrpTyp1++)
|
NumGrpTyp1++)
|
||||||
{
|
{
|
||||||
GrpTyp1InLst = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp1];
|
GrpTyp1 = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp1];
|
||||||
for (NumGrpThisType = 0;
|
for (NumGrpThisType = 0;
|
||||||
NumGrpThisType < GrpTyp1InLst->NumGrps;
|
NumGrpThisType < GrpTyp1->NumGrps;
|
||||||
NumGrpThisType++)
|
NumGrpThisType++)
|
||||||
{
|
{
|
||||||
Grp = &GrpTyp1InLst->LstGrps[NumGrpThisType];
|
Grp = &GrpTyp1->LstGrps[NumGrpThisType];
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
|
@ -1471,12 +1471,12 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
||||||
NumGrpTyp2 < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
NumGrpTyp2 < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
||||||
NumGrpTyp2++)
|
NumGrpTyp2++)
|
||||||
{
|
{
|
||||||
GrpTyp2InLst = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp2];
|
GrpTyp2 = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp2];
|
||||||
HTM_OPTION (HTM_Type_LONG,&GrpTyp2InLst->GrpTypCod,
|
HTM_OPTION (HTM_Type_LONG,&GrpTyp2->GrpTypCod,
|
||||||
GrpTyp2InLst->GrpTypCod == GrpTyp1InLst->GrpTypCod ? HTM_OPTION_SELECTED :
|
GrpTyp2->GrpTypCod == GrpTyp1->GrpTypCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",GrpTyp2InLst->GrpTypName);
|
"%s",GrpTyp2->GrpTypName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End selector */
|
/* End selector */
|
||||||
|
@ -1524,12 +1524,12 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
||||||
NumRoo < Rooms->Num;
|
NumRoo < Rooms->Num;
|
||||||
NumRoo++)
|
NumRoo++)
|
||||||
{
|
{
|
||||||
RooInLst = &Rooms->Lst[NumRoo];
|
Roo = &Rooms->Lst[NumRoo];
|
||||||
HTM_OPTION (HTM_Type_LONG,&RooInLst->RooCod,
|
HTM_OPTION (HTM_Type_LONG,&Roo->RooCod,
|
||||||
RooInLst->RooCod == Grp->Room.RooCod ? HTM_OPTION_SELECTED :
|
Roo->RooCod == Grp->Room.RooCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",RooInLst->ShrtName);
|
"%s",Roo->ShrtName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End selector */
|
/* End selector */
|
||||||
|
@ -2509,9 +2509,9 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
||||||
extern const char *Txt_No_assigned_room;
|
extern const char *Txt_No_assigned_room;
|
||||||
extern const char *Txt_Another_room;
|
extern const char *Txt_Another_room;
|
||||||
unsigned NumGrpTyp;
|
unsigned NumGrpTyp;
|
||||||
const struct GroupType *GrpTypInLst;
|
const struct GroupType *GrpTyp;
|
||||||
unsigned NumRoo;
|
unsigned NumRoo;
|
||||||
const struct Roo_Room *RooInLst;
|
const struct Roo_Room *Roo;
|
||||||
Rol_Role_t Role;
|
Rol_Role_t Role;
|
||||||
char StrMaxStudents[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
char StrMaxStudents[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||||
|
|
||||||
|
@ -2553,12 +2553,12 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
||||||
NumGrpTyp < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
NumGrpTyp < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
||||||
NumGrpTyp++)
|
NumGrpTyp++)
|
||||||
{
|
{
|
||||||
GrpTypInLst = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp];
|
GrpTyp = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp];
|
||||||
HTM_OPTION (HTM_Type_LONG,&GrpTypInLst->GrpTypCod,
|
HTM_OPTION (HTM_Type_LONG,&GrpTyp->GrpTypCod,
|
||||||
GrpTypInLst->GrpTypCod == Gbl.Crs.Grps.GrpTyp.GrpTypCod ? HTM_OPTION_SELECTED :
|
GrpTyp->GrpTypCod == Gbl.Crs.Grps.GrpTyp.GrpTypCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",GrpTypInLst->GrpTypName);
|
"%s",GrpTyp->GrpTypName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End selector */
|
/* End selector */
|
||||||
|
@ -2601,12 +2601,12 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
||||||
NumRoo < Rooms->Num;
|
NumRoo < Rooms->Num;
|
||||||
NumRoo++)
|
NumRoo++)
|
||||||
{
|
{
|
||||||
RooInLst = &Rooms->Lst[NumRoo];
|
Roo = &Rooms->Lst[NumRoo];
|
||||||
HTM_OPTION (HTM_Type_LONG,&RooInLst->RooCod,
|
HTM_OPTION (HTM_Type_LONG,&Roo->RooCod,
|
||||||
RooInLst->RooCod == Gbl.Crs.Grps.RooCod ? HTM_OPTION_SELECTED :
|
Roo->RooCod == Gbl.Crs.Grps.RooCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",RooInLst->ShrtName);
|
"%s",Roo->ShrtName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End selector */
|
/* End selector */
|
||||||
|
|
|
@ -490,9 +490,9 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
||||||
extern const char *Txt_All_places;
|
extern const char *Txt_All_places;
|
||||||
extern const char *Txt_HOLIDAY_TYPES[Hld_NUM_TYPES_HOLIDAY];
|
extern const char *Txt_HOLIDAY_TYPES[Hld_NUM_TYPES_HOLIDAY];
|
||||||
unsigned NumHld;
|
unsigned NumHld;
|
||||||
struct Hld_Holiday *HldInLst;
|
struct Hld_Holiday *Hld;
|
||||||
unsigned NumPlc;
|
unsigned NumPlc;
|
||||||
const struct Plc_Place *PlcInLst;
|
const struct Plc_Place *Plc;
|
||||||
Hld_HolidayType_t HolidayType;
|
Hld_HolidayType_t HolidayType;
|
||||||
unsigned HolidayTypeUnsigned;
|
unsigned HolidayTypeUnsigned;
|
||||||
unsigned CurrentYear = Dat_GetCurrentYear ();
|
unsigned CurrentYear = Dat_GetCurrentYear ();
|
||||||
|
@ -519,43 +519,43 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
||||||
NumHld < Holidays->Num;
|
NumHld < Holidays->Num;
|
||||||
NumHld++)
|
NumHld++)
|
||||||
{
|
{
|
||||||
HldInLst = &Holidays->Lst[NumHld];
|
Hld = &Holidays->Lst[NumHld];
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/* Put icon to remove holiday */
|
/* Put icon to remove holiday */
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
Ico_PutContextualIconToRemove (ActRemHld,NULL,
|
Ico_PutContextualIconToRemove (ActRemHld,NULL,
|
||||||
Hld_PutParHldCod,&HldInLst->HldCod);
|
Hld_PutParHldCod,&Hld->HldCod);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Holiday code */
|
/* Holiday code */
|
||||||
HTM_TD_Begin ("class=\"CODE DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"CODE DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_TxtF ("%ld ",HldInLst->HldCod);
|
HTM_TxtF ("%ld ",Hld->HldCod);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Holiday place */
|
/* Holiday place */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_BeginForm (ActChgHldPlc);
|
Frm_BeginForm (ActChgHldPlc);
|
||||||
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
|
ParCod_PutPar (ParCod_Hld,Hld->HldCod);
|
||||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
|
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
|
||||||
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||||
HldInLst->PlcCod <= 0 ? HTM_OPTION_SELECTED :
|
Hld->PlcCod <= 0 ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",Txt_All_places);
|
"%s",Txt_All_places);
|
||||||
for (NumPlc = 0;
|
for (NumPlc = 0;
|
||||||
NumPlc < Places->Num;
|
NumPlc < Places->Num;
|
||||||
NumPlc++)
|
NumPlc++)
|
||||||
{
|
{
|
||||||
PlcInLst = &Places->Lst[NumPlc];
|
Plc = &Places->Lst[NumPlc];
|
||||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
HTM_OPTION (HTM_Type_LONG,&Plc->PlcCod,
|
||||||
PlcInLst->PlcCod == HldInLst->PlcCod ? HTM_OPTION_SELECTED :
|
Plc->PlcCod == Hld->PlcCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",PlcInLst->ShrtName);
|
"%s",Plc->ShrtName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -564,7 +564,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
||||||
/* Holiday type */
|
/* Holiday type */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_BeginForm (ActChgHldTyp);
|
Frm_BeginForm (ActChgHldTyp);
|
||||||
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
|
ParCod_PutPar (ParCod_Hld,Hld->HldCod);
|
||||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
|
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
|
||||||
"name=\"HldTyp\" class=\"INPUT_%s\""
|
"name=\"HldTyp\" class=\"INPUT_%s\""
|
||||||
" style=\"width:62px;\"", // TODO: Use a CSS class
|
" style=\"width:62px;\"", // TODO: Use a CSS class
|
||||||
|
@ -575,8 +575,8 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
||||||
{
|
{
|
||||||
HolidayTypeUnsigned = (unsigned) HolidayType;
|
HolidayTypeUnsigned = (unsigned) HolidayType;
|
||||||
HTM_OPTION (HTM_Type_UNSIGNED,&HolidayTypeUnsigned,
|
HTM_OPTION (HTM_Type_UNSIGNED,&HolidayTypeUnsigned,
|
||||||
HolidayType == HldInLst->HldTyp ? HTM_OPTION_SELECTED :
|
HolidayType == Hld->HldTyp ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",Txt_HOLIDAY_TYPES[HolidayType]);
|
"%s",Txt_HOLIDAY_TYPES[HolidayType]);
|
||||||
}
|
}
|
||||||
|
@ -587,7 +587,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
||||||
/* Holiday date / Non school period start date */
|
/* Holiday date / Non school period start date */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_BeginForm (ActChgHldStrDat);
|
Frm_BeginForm (ActChgHldStrDat);
|
||||||
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
|
ParCod_PutPar (ParCod_Hld,Hld->HldCod);
|
||||||
Dat_WriteFormDate (CurrentYear - 1,
|
Dat_WriteFormDate (CurrentYear - 1,
|
||||||
CurrentYear + 1,
|
CurrentYear + 1,
|
||||||
"Start",
|
"Start",
|
||||||
|
@ -600,21 +600,21 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
||||||
/* Non school period end date */
|
/* Non school period end date */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_BeginForm (ActChgHldEndDat);
|
Frm_BeginForm (ActChgHldEndDat);
|
||||||
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
|
ParCod_PutPar (ParCod_Hld,Hld->HldCod);
|
||||||
Dat_WriteFormDate (CurrentYear - 1,
|
Dat_WriteFormDate (CurrentYear - 1,
|
||||||
CurrentYear + 1,
|
CurrentYear + 1,
|
||||||
"End",
|
"End",
|
||||||
&(Holidays->Lst[NumHld].EndDate),
|
&(Holidays->Lst[NumHld].EndDate),
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
HTM_SUBMIT_ON_CHANGE,
|
||||||
(HldInLst->HldTyp == Hld_HOLIDAY));
|
(Hld->HldTyp == Hld_HOLIDAY));
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Holiday name */
|
/* Holiday name */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_BeginForm (ActRenHld);
|
Frm_BeginForm (ActRenHld);
|
||||||
ParCod_PutPar (ParCod_Hld,HldInLst->HldCod);
|
ParCod_PutPar (ParCod_Hld,Hld->HldCod);
|
||||||
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,HldInLst->Name,
|
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name,
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
HTM_SUBMIT_ON_CHANGE,
|
||||||
"size=\"20\" class=\"INPUT_%s\"",
|
"size=\"20\" class=\"INPUT_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
|
@ -890,7 +890,7 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
|
||||||
extern const char *Txt_All_places;
|
extern const char *Txt_All_places;
|
||||||
extern const char *Txt_HOLIDAY_TYPES[Hld_NUM_TYPES_HOLIDAY];
|
extern const char *Txt_HOLIDAY_TYPES[Hld_NUM_TYPES_HOLIDAY];
|
||||||
unsigned NumPlc;
|
unsigned NumPlc;
|
||||||
const struct Plc_Place *PlcInLst;
|
const struct Plc_Place *Plc;
|
||||||
Hld_HolidayType_t HolidayType;
|
Hld_HolidayType_t HolidayType;
|
||||||
unsigned HolidayTypeUnsigned;
|
unsigned HolidayTypeUnsigned;
|
||||||
unsigned CurrentYear = Dat_GetCurrentYear ();
|
unsigned CurrentYear = Dat_GetCurrentYear ();
|
||||||
|
@ -925,12 +925,12 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
|
||||||
NumPlc < Places->Num;
|
NumPlc < Places->Num;
|
||||||
NumPlc++)
|
NumPlc++)
|
||||||
{
|
{
|
||||||
PlcInLst = &Places->Lst[NumPlc];
|
Plc = &Places->Lst[NumPlc];
|
||||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
HTM_OPTION (HTM_Type_LONG,&Plc->PlcCod,
|
||||||
PlcInLst->PlcCod == Hld_EditingHld->PlcCod ? HTM_OPTION_SELECTED :
|
Plc->PlcCod == Hld_EditingHld->PlcCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",PlcInLst->ShrtName);
|
"%s",Plc->ShrtName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
|
@ -876,9 +876,6 @@ void Ins_WriteSelectorOfInstitution (void)
|
||||||
|
|
||||||
static void Ins_ListInstitutionsForEdition (void)
|
static void Ins_ListInstitutionsForEdition (void)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Txt_INSTITUTION_STATUS[Hie_NUM_STATUS_TXT];
|
extern const char *Txt_INSTITUTION_STATUS[Hie_NUM_STATUS_TXT];
|
||||||
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
|
@ -893,8 +890,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
unsigned NumCtrs;
|
unsigned NumCtrs;
|
||||||
unsigned NumUsrsIns;
|
unsigned NumUsrsIns;
|
||||||
unsigned NumUsrsInCrssOfIns;
|
unsigned NumUsrsInCrssOfIns;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -953,28 +949,10 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
/* Institution short name and full name */
|
/* Institution short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Ins->ShrtName;
|
Name[Cns_SHRT_NAME] = Ins->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Ins->FullName;
|
Name[Cns_FULL_NAME] = Ins->FullName;
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_PutShortAndFullNames (ActionRename,
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
ParCod_OthHie,Ins->HieCod,
|
||||||
ShrtOrFullName++)
|
Name,
|
||||||
{
|
ICanEdit); // Put form?
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
|
||||||
if (ICanEdit)
|
|
||||||
{
|
|
||||||
Frm_BeginForm (ActionRename[ShrtOrFullName]);
|
|
||||||
ParCod_PutPar (ParCod_OthHie,Ins->HieCod);
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
Frm_EndForm ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
HTM_Txt (Name[ShrtOrFullName]);
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Institution WWW */
|
/* Institution WWW */
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
|
|
|
@ -299,7 +299,7 @@ static void InsCfg_Country (bool PrintView,bool PutForm)
|
||||||
extern const char *Par_CodeStr[];
|
extern const char *Par_CodeStr[];
|
||||||
extern const char *Txt_Country;
|
extern const char *Txt_Country;
|
||||||
unsigned NumCty;
|
unsigned NumCty;
|
||||||
const struct Hie_Node *CtyInLst;
|
const struct Hie_Node *Cty;
|
||||||
|
|
||||||
/***** Get list of countries *****/
|
/***** Get list of countries *****/
|
||||||
Cty_GetBasicListOfCountries ();
|
Cty_GetBasicListOfCountries ();
|
||||||
|
@ -326,12 +326,12 @@ static void InsCfg_Country (bool PrintView,bool PutForm)
|
||||||
NumCty < Gbl.Hierarchy.List[Hie_SYS].Num;
|
NumCty < Gbl.Hierarchy.List[Hie_SYS].Num;
|
||||||
NumCty++)
|
NumCty++)
|
||||||
{
|
{
|
||||||
CtyInLst = &Gbl.Hierarchy.List[Hie_SYS].Lst[NumCty];
|
Cty = &Gbl.Hierarchy.List[Hie_SYS].Lst[NumCty];
|
||||||
HTM_OPTION (HTM_Type_LONG,&CtyInLst->HieCod,
|
HTM_OPTION (HTM_Type_LONG,&Cty->HieCod,
|
||||||
CtyInLst->HieCod == Gbl.Hierarchy.Node[Hie_CTY].HieCod ? HTM_OPTION_SELECTED :
|
Cty->HieCod == Gbl.Hierarchy.Node[Hie_CTY].HieCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",CtyInLst->FullName);
|
"%s",Cty->FullName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
28
swad_link.c
28
swad_link.c
|
@ -397,9 +397,6 @@ static void Lnk_FreeListLinks (struct Lnk_Links *Links)
|
||||||
|
|
||||||
static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
|
static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = ActRenLnkSho,
|
[Cns_SHRT_NAME] = ActRenLnkSho,
|
||||||
|
@ -407,8 +404,7 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
|
||||||
};
|
};
|
||||||
unsigned NumLnk;
|
unsigned NumLnk;
|
||||||
struct Lnk_Link *Lnk;
|
struct Lnk_Link *Lnk;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
@ -439,24 +435,10 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
|
||||||
/* Link short name and full name */
|
/* Link short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Lnk->ShrtName;
|
Name[Cns_SHRT_NAME] = Lnk->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Lnk->FullName;
|
Name[Cns_FULL_NAME] = Lnk->FullName;
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_PutShortAndFullNames (ActionRename,
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
ParCod_Lnk,Lnk->LnkCod,
|
||||||
ShrtOrFullName++)
|
Name,
|
||||||
{
|
true); // Put form
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
Frm_BeginForm (ActionRename[ShrtOrFullName]);
|
|
||||||
ParCod_PutPar (ParCod_Lnk,Lnk->LnkCod);
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
Frm_EndForm ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Link WWW */
|
/* Link WWW */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
|
27
swad_place.c
27
swad_place.c
|
@ -445,9 +445,6 @@ void Plc_FreeListPlaces (struct Plc_Places *Places)
|
||||||
|
|
||||||
static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
static Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = ActRenPlcSho,
|
[Cns_SHRT_NAME] = ActRenPlcSho,
|
||||||
|
@ -455,8 +452,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
||||||
};
|
};
|
||||||
unsigned NumPlc;
|
unsigned NumPlc;
|
||||||
struct Plc_Place *Plc;
|
struct Plc_Place *Plc;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
@ -490,23 +486,10 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
||||||
/* Place short name and full name */
|
/* Place short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Plc->ShrtName;
|
Name[Cns_SHRT_NAME] = Plc->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Plc->FullName;
|
Name[Cns_FULL_NAME] = Plc->FullName;
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_PutShortAndFullNames (ActionRename,
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
ParCod_Plc,Plc->PlcCod,
|
||||||
ShrtOrFullName++)
|
Name,
|
||||||
{
|
true); // Put form
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
Frm_BeginForm (ActionRename[ShrtOrFullName]);
|
|
||||||
ParCod_PutPar (ParCod_Plc,Plc->PlcCod);
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
Frm_EndForm ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Number of centers */
|
/* Number of centers */
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
|
|
|
@ -268,7 +268,7 @@ static void Rec_ListFieldsRecordsForEdition (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY];
|
extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY];
|
||||||
unsigned NumField;
|
unsigned NumField;
|
||||||
struct RecordField *FldInLst;
|
struct RecordField *Fld;
|
||||||
Rec_VisibilityRecordFields_t Vis;
|
Rec_VisibilityRecordFields_t Vis;
|
||||||
unsigned VisUnsigned;
|
unsigned VisUnsigned;
|
||||||
char StrNumLines[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
char StrNumLines[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||||
|
@ -284,20 +284,20 @@ static void Rec_ListFieldsRecordsForEdition (void)
|
||||||
NumField < Gbl.Crs.Records.LstFields.Num;
|
NumField < Gbl.Crs.Records.LstFields.Num;
|
||||||
NumField++)
|
NumField++)
|
||||||
{
|
{
|
||||||
FldInLst = &Gbl.Crs.Records.LstFields.Lst[NumField];
|
Fld = &Gbl.Crs.Records.LstFields.Lst[NumField];
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/* Write icon to remove the field */
|
/* Write icon to remove the field */
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
Ico_PutContextualIconToRemove (ActReqRemFie,NULL,
|
Ico_PutContextualIconToRemove (ActReqRemFie,NULL,
|
||||||
Rec_PutParFldCod,&FldInLst->FieldCod);
|
Rec_PutParFldCod,&Fld->FieldCod);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Name of the field */
|
/* Name of the field */
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Frm_BeginForm (ActRenFie);
|
Frm_BeginForm (ActRenFie);
|
||||||
ParCod_PutPar (ParCod_Fld,FldInLst->FieldCod);
|
ParCod_PutPar (ParCod_Fld,Fld->FieldCod);
|
||||||
HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,
|
HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,
|
||||||
Gbl.Crs.Records.LstFields.Lst[NumField].Name,
|
Gbl.Crs.Records.LstFields.Lst[NumField].Name,
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
HTM_SUBMIT_ON_CHANGE,
|
||||||
|
@ -309,9 +309,9 @@ static void Rec_ListFieldsRecordsForEdition (void)
|
||||||
/* Number of lines in the form */
|
/* Number of lines in the form */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_BeginForm (ActChgRowFie);
|
Frm_BeginForm (ActChgRowFie);
|
||||||
ParCod_PutPar (ParCod_Fld,FldInLst->FieldCod);
|
ParCod_PutPar (ParCod_Fld,Fld->FieldCod);
|
||||||
snprintf (StrNumLines,sizeof (StrNumLines),"%u",
|
snprintf (StrNumLines,sizeof (StrNumLines),"%u",
|
||||||
FldInLst->NumLines);
|
Fld->NumLines);
|
||||||
HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines,
|
HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines,
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
HTM_SUBMIT_ON_CHANGE,
|
||||||
"size=\"2\" class=\"INPUT_%s\"",
|
"size=\"2\" class=\"INPUT_%s\"",
|
||||||
|
@ -322,7 +322,7 @@ static void Rec_ListFieldsRecordsForEdition (void)
|
||||||
/* Visibility of a field */
|
/* Visibility of a field */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_BeginForm (ActChgVisFie);
|
Frm_BeginForm (ActChgVisFie);
|
||||||
ParCod_PutPar (ParCod_Fld,FldInLst->FieldCod);
|
ParCod_PutPar (ParCod_Fld,Fld->FieldCod);
|
||||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
|
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
|
||||||
"name=\"Visibility\" class=\"INPUT_%s\"",
|
"name=\"Visibility\" class=\"INPUT_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
|
@ -332,8 +332,8 @@ static void Rec_ListFieldsRecordsForEdition (void)
|
||||||
{
|
{
|
||||||
VisUnsigned = (unsigned) Vis;
|
VisUnsigned = (unsigned) Vis;
|
||||||
HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned,
|
HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned,
|
||||||
Vis == FldInLst->Visibility ? HTM_OPTION_SELECTED :
|
Vis == Fld->Visibility ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
|
"%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
|
||||||
}
|
}
|
||||||
|
@ -3161,7 +3161,7 @@ static void Rec_ShowCountry (struct Usr_Data *UsrDat,bool PutForm)
|
||||||
extern const char *Txt_Another_country;
|
extern const char *Txt_Another_country;
|
||||||
char *Label;
|
char *Label;
|
||||||
unsigned NumCty;
|
unsigned NumCty;
|
||||||
const struct Hie_Node *CtyInLst;
|
const struct Hie_Node *Cty;
|
||||||
|
|
||||||
/***** If list of countries is empty, try to get it *****/
|
/***** If list of countries is empty, try to get it *****/
|
||||||
Cty_GetBasicListOfCountries ();
|
Cty_GetBasicListOfCountries ();
|
||||||
|
@ -3200,12 +3200,12 @@ static void Rec_ShowCountry (struct Usr_Data *UsrDat,bool PutForm)
|
||||||
NumCty < Gbl.Hierarchy.List[Hie_SYS].Num;
|
NumCty < Gbl.Hierarchy.List[Hie_SYS].Num;
|
||||||
NumCty++)
|
NumCty++)
|
||||||
{
|
{
|
||||||
CtyInLst = &Gbl.Hierarchy.List[Hie_SYS].Lst[NumCty];
|
Cty = &Gbl.Hierarchy.List[Hie_SYS].Lst[NumCty];
|
||||||
HTM_OPTION (HTM_Type_LONG,&CtyInLst->HieCod,
|
HTM_OPTION (HTM_Type_LONG,&Cty->HieCod,
|
||||||
CtyInLst->HieCod == UsrDat->CtyCod ? HTM_OPTION_SELECTED :
|
Cty->HieCod == UsrDat->CtyCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",CtyInLst->FullName);
|
"%s",Cty->FullName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -3782,11 +3782,11 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
||||||
extern const char *Txt_Office;
|
extern const char *Txt_Office;
|
||||||
extern const char *Txt_Phone;
|
extern const char *Txt_Phone;
|
||||||
unsigned NumCty;
|
unsigned NumCty;
|
||||||
const struct Hie_Node *CtyInLst;
|
const struct Hie_Node *Cty;
|
||||||
unsigned NumIns;
|
unsigned NumIns;
|
||||||
const struct Hie_Node *InsInLst;
|
const struct Hie_Node *Ins;
|
||||||
unsigned NumCtr;
|
unsigned NumCtr;
|
||||||
const struct Hie_Node *CtrInLst;
|
const struct Hie_Node *Ctr;
|
||||||
char StrRecordWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
char StrRecordWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||||
char *Label;
|
char *Label;
|
||||||
char *SelectClass;
|
char *SelectClass;
|
||||||
|
@ -3832,12 +3832,12 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
||||||
NumCty < Gbl.Hierarchy.List[Hie_SYS].Num;
|
NumCty < Gbl.Hierarchy.List[Hie_SYS].Num;
|
||||||
NumCty++)
|
NumCty++)
|
||||||
{
|
{
|
||||||
CtyInLst = &Gbl.Hierarchy.List[Hie_SYS].Lst[NumCty];
|
Cty = &Gbl.Hierarchy.List[Hie_SYS].Lst[NumCty];
|
||||||
HTM_OPTION (HTM_Type_LONG,&CtyInLst->HieCod,
|
HTM_OPTION (HTM_Type_LONG,&Cty->HieCod,
|
||||||
CtyInLst->HieCod == Gbl.Usrs.Me.UsrDat.InsCtyCod ? HTM_OPTION_SELECTED :
|
Cty->HieCod == Gbl.Usrs.Me.UsrDat.InsCtyCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",CtyInLst->FullName);
|
"%s",Cty->FullName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -3883,12 +3883,12 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
||||||
NumIns < Gbl.Hierarchy.List[Hie_CTY].Num;
|
NumIns < Gbl.Hierarchy.List[Hie_CTY].Num;
|
||||||
NumIns++)
|
NumIns++)
|
||||||
{
|
{
|
||||||
InsInLst = &Gbl.Hierarchy.List[Hie_CTY].Lst[NumIns];
|
Ins = &Gbl.Hierarchy.List[Hie_CTY].Lst[NumIns];
|
||||||
HTM_OPTION (HTM_Type_LONG,&InsInLst->HieCod,
|
HTM_OPTION (HTM_Type_LONG,&Ins->HieCod,
|
||||||
InsInLst->HieCod == Gbl.Usrs.Me.UsrDat.InsCod ? HTM_OPTION_SELECTED :
|
Ins->HieCod == Gbl.Usrs.Me.UsrDat.InsCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",InsInLst->FullName);
|
"%s",Ins->FullName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -3935,12 +3935,12 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
||||||
NumCtr < Gbl.Hierarchy.List[Hie_SYS].Num;
|
NumCtr < Gbl.Hierarchy.List[Hie_SYS].Num;
|
||||||
NumCtr++)
|
NumCtr++)
|
||||||
{
|
{
|
||||||
CtrInLst = &Gbl.Hierarchy.List[Hie_SYS].Lst[NumCtr];
|
Ctr = &Gbl.Hierarchy.List[Hie_SYS].Lst[NumCtr];
|
||||||
HTM_OPTION (HTM_Type_LONG,&CtrInLst->HieCod,
|
HTM_OPTION (HTM_Type_LONG,&Ctr->HieCod,
|
||||||
CtrInLst->HieCod == Gbl.Usrs.Me.UsrDat.Tch.CtrCod ? HTM_OPTION_SELECTED :
|
Ctr->HieCod == Gbl.Usrs.Me.UsrDat.Tch.CtrCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
CtrInLst->FullName);
|
Ctr->FullName);
|
||||||
}
|
}
|
||||||
HTM_SELECT_End ();
|
HTM_SELECT_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
12
swad_room.c
12
swad_room.c
|
@ -770,7 +770,7 @@ static void Roo_PutSelectorBuilding (long BldCod,
|
||||||
extern const char *Txt_No_assigned_building;
|
extern const char *Txt_No_assigned_building;
|
||||||
extern const char *Txt_Another_building;
|
extern const char *Txt_Another_building;
|
||||||
unsigned NumBld;
|
unsigned NumBld;
|
||||||
const struct Bld_Building *BldInLst;
|
const struct Bld_Building *Bld;
|
||||||
|
|
||||||
/***** Begin selector *****/
|
/***** Begin selector *****/
|
||||||
HTM_SELECT_Begin (SubmitOnChange,NULL,
|
HTM_SELECT_Begin (SubmitOnChange,NULL,
|
||||||
|
@ -796,12 +796,12 @@ static void Roo_PutSelectorBuilding (long BldCod,
|
||||||
NumBld < Buildings->Num;
|
NumBld < Buildings->Num;
|
||||||
NumBld++)
|
NumBld++)
|
||||||
{
|
{
|
||||||
BldInLst = &Buildings->Lst[NumBld];
|
Bld = &Buildings->Lst[NumBld];
|
||||||
HTM_OPTION (HTM_Type_LONG,&BldInLst->BldCod,
|
HTM_OPTION (HTM_Type_LONG,&Bld->BldCod,
|
||||||
BldCod == BldInLst->BldCod ? HTM_OPTION_SELECTED :
|
BldCod == Bld->BldCod ? HTM_OPTION_SELECTED :
|
||||||
HTM_OPTION_UNSELECTED,
|
HTM_OPTION_UNSELECTED,
|
||||||
HTM_OPTION_ENABLED,
|
HTM_OPTION_ENABLED,
|
||||||
"%s",BldInLst->ShrtName);
|
"%s",Bld->ShrtName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End selector *****/
|
/***** End selector *****/
|
||||||
|
|
Loading…
Reference in New Issue