mirror of https://github.com/acanas/swad-core.git
Version 23.33: Oct 10, 2023 Code refactoring in short and full names.
This commit is contained in:
parent
19e5daff04
commit
02b841f014
|
@ -397,7 +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;
|
||||||
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
@ -444,12 +444,12 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Banner short name and full name */
|
/* Banner short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Ban->ShrtName;
|
Names[Cns_SHRT_NAME] = Ban->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Ban->FullName;
|
Names[Cns_FULL_NAME] = Ban->FullName;
|
||||||
Frm_PutShortAndFullNames (ActionRename,
|
Frm_ExistingShortAndFullNames (ActionRename,
|
||||||
ParCod_Ban,Banners->BanCodToEdit,
|
ParCod_Ban,Banners->BanCodToEdit,
|
||||||
Name,
|
Names,
|
||||||
true); // Put form
|
true); // Put form
|
||||||
|
|
||||||
/* Banner image */
|
/* Banner image */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
@ -641,8 +641,7 @@ static void Ban_RenameBanner (struct Ban_Banner *Ban,
|
||||||
if (Ban_DB_CheckIfBannerNameExists (Cns_ParShrtOrFullName[ShrtOrFullName],
|
if (Ban_DB_CheckIfBannerNameExists (Cns_ParShrtOrFullName[ShrtOrFullName],
|
||||||
NewName,Ban->BanCod))
|
NewName,Ban->BanCod))
|
||||||
Ale_CreateAlert (Ale_WARNING,NULL,
|
Ale_CreateAlert (Ale_WARNING,NULL,
|
||||||
Txt_The_banner_X_already_exists,
|
Txt_The_banner_X_already_exists,NewName);
|
||||||
NewName);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Update the table changing old name by new name */
|
/* Update the table changing old name by new name */
|
||||||
|
@ -657,7 +656,8 @@ static void Ban_RenameBanner (struct Ban_Banner *Ban,
|
||||||
else // The same name
|
else // The same name
|
||||||
/* Write warning message */
|
/* Write warning message */
|
||||||
Ale_CreateAlert (Ale_INFO,NULL,
|
Ale_CreateAlert (Ale_INFO,NULL,
|
||||||
Txt_The_name_X_has_not_changed,CurrentName[ShrtOrFullName]);
|
Txt_The_name_X_has_not_changed,
|
||||||
|
CurrentName[ShrtOrFullName]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Update name *****/
|
/***** Update name *****/
|
||||||
|
@ -774,15 +774,11 @@ void Ban_ContEditAfterChgBan (void)
|
||||||
|
|
||||||
static void Ban_PutFormToCreateBanner (const struct Ban_Banner *Ban)
|
static void Ban_PutFormToCreateBanner (const struct Ban_Banner *Ban)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
extern const char *Cns_ClassShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
const char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = Ban->ShrtName,
|
[Cns_SHRT_NAME] = Ban->ShrtName,
|
||||||
[Cns_FULL_NAME] = Ban->FullName,
|
[Cns_FULL_NAME] = Ban->FullName,
|
||||||
};
|
};
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
|
||||||
|
|
||||||
/***** Begin form to create *****/
|
/***** Begin form to create *****/
|
||||||
Frm_BeginFormTable (ActNewBan,NULL,NULL,NULL);
|
Frm_BeginFormTable (ActNewBan,NULL,NULL,NULL);
|
||||||
|
@ -804,21 +800,7 @@ static void Ban_PutFormToCreateBanner (const struct Ban_Banner *Ban)
|
||||||
HTM_TD_Empty (1);
|
HTM_TD_Empty (1);
|
||||||
|
|
||||||
/* Banner short name and full name */
|
/* Banner short name and full name */
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_NewShortAndFullNames (Names);
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
|
||||||
ShrtOrFullName++)
|
|
||||||
{
|
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Banner image */
|
/* Banner image */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
|
|
@ -390,9 +390,6 @@ void Bld_FreeListBuildings (struct Bld_Buildings *Buildings)
|
||||||
|
|
||||||
static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
|
static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
|
||||||
{
|
{
|
||||||
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] = ActRenBldSho,
|
[Cns_SHRT_NAME] = ActRenBldSho,
|
||||||
|
@ -401,8 +398,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
|
||||||
unsigned NumBld;
|
unsigned NumBld;
|
||||||
struct Bld_Building *Building;
|
struct Bld_Building *Building;
|
||||||
char *Anchor = NULL;
|
char *Anchor = NULL;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
@ -436,25 +432,12 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Building short name and full name */
|
/* Building short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Building->ShrtName;
|
Names[Cns_SHRT_NAME] = Building->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Building->FullName;
|
Names[Cns_FULL_NAME] = Building->FullName;
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_ExistingShortAndFullNames (ActionRename,
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
ParCod_Bld,Building->BldCod,
|
||||||
ShrtOrFullName++)
|
Names,
|
||||||
{
|
true); // Put form
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
Frm_BeginFormAnchor (ActionRename[ShrtOrFullName],Anchor);
|
|
||||||
ParCod_PutPar (ParCod_Bld,Building->BldCod);
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"10\" class=\"%s INPUT_%s\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
Frm_EndForm ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Building location */
|
/* Building location */
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
@ -672,11 +655,7 @@ void Bld_ContEditAfterChgBuilding (void)
|
||||||
|
|
||||||
static void Bld_PutFormToCreateBuilding (void)
|
static void Bld_PutFormToCreateBuilding (void)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[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;
|
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = Bld_EditingBuilding->ShrtName,
|
[Cns_SHRT_NAME] = Bld_EditingBuilding->ShrtName,
|
||||||
[Cns_FULL_NAME] = Bld_EditingBuilding->FullName,
|
[Cns_FULL_NAME] = Bld_EditingBuilding->FullName,
|
||||||
|
@ -699,21 +678,7 @@ static void Bld_PutFormToCreateBuilding (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Building short name and full name *****/
|
/***** Building short name and full name *****/
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_NewShortAndFullNames (Names);
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
|
||||||
ShrtOrFullName++)
|
|
||||||
{
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"10\" class=\"%s INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Building location *****/
|
/***** Building location *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
|
|
@ -747,7 +747,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
||||||
unsigned NumDegs;
|
unsigned NumDegs;
|
||||||
unsigned NumUsrsCtr;
|
unsigned NumUsrsCtr;
|
||||||
unsigned NumUsrsInCrssOfCtr;
|
unsigned NumUsrsInCrssOfCtr;
|
||||||
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -840,12 +840,12 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Center short name and full name */
|
/* Center short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Ctr->ShrtName;
|
Names[Cns_SHRT_NAME] = Ctr->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Ctr->FullName;
|
Names[Cns_FULL_NAME] = Ctr->FullName;
|
||||||
Frm_PutShortAndFullNames (ActionRename,
|
Frm_ExistingShortAndFullNames (ActionRename,
|
||||||
ParCod_OthHie,Ctr->HieCod,
|
ParCod_OthHie,Ctr->HieCod,
|
||||||
Name,
|
Names,
|
||||||
ICanEdit); // Put form?
|
ICanEdit); // Put form?
|
||||||
|
|
||||||
/* Center WWW */
|
/* Center WWW */
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
|
@ -1236,15 +1236,11 @@ static void Ctr_ShowAlertAndButtonToGoToCtr (void)
|
||||||
|
|
||||||
static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
static void Ctr_PutFormToCreateCenter (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;
|
||||||
Act_Action_t NextAction = ActUnk;
|
Act_Action_t NextAction = ActUnk;
|
||||||
unsigned NumPlc;
|
unsigned NumPlc;
|
||||||
const struct Plc_Place *Plc;
|
const struct Plc_Place *Plc;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = Ctr_EditingCtr->ShrtName,
|
[Cns_SHRT_NAME] = Ctr_EditingCtr->ShrtName,
|
||||||
[Cns_FULL_NAME] = Ctr_EditingCtr->FullName,
|
[Cns_FULL_NAME] = Ctr_EditingCtr->FullName,
|
||||||
|
@ -1307,21 +1303,7 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Center short name and full name *****/
|
/***** Center short name and full name *****/
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_NewShortAndFullNames (Names);
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
|
||||||
ShrtOrFullName++)
|
|
||||||
{
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Center WWW *****/
|
/***** Center WWW *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
|
|
@ -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.32 (2023-10-10)"
|
#define Log_PLATFORM_VERSION "SWAD 23.33 (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.33: Oct 10, 2023 Code refactoring in short and full names. (335919 lines)
|
||||||
Version 23.32: Oct 10, 2023 Code refactoring in short and full names. (336110 lines)
|
Version 23.32: Oct 10, 2023 Code refactoring in short and full names. (336110 lines)
|
||||||
Version 23.31: Oct 10, 2023 Code refactoring in short and full names. (336169 lines)
|
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)
|
||||||
|
|
|
@ -929,7 +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];
|
||||||
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -1014,12 +1014,12 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Course short name and full name */
|
/* Course short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Crs->ShrtName;
|
Names[Cns_SHRT_NAME] = Crs->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Crs->FullName;
|
Names[Cns_FULL_NAME] = Crs->FullName;
|
||||||
Frm_PutShortAndFullNames (ActionRename,
|
Frm_ExistingShortAndFullNames (ActionRename,
|
||||||
ParCod_OthHie,Crs->HieCod,
|
ParCod_OthHie,Crs->HieCod,
|
||||||
Name,
|
Names,
|
||||||
ICanEdit); // Put form?
|
ICanEdit); // Put form?
|
||||||
|
|
||||||
/* 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 ());
|
||||||
|
@ -1072,21 +1072,15 @@ static bool Crs_CheckIfICanEdit (struct Hie_Node *Crs)
|
||||||
|
|
||||||
static void Crs_PutFormToCreateCourse (void)
|
static void Crs_PutFormToCreateCourse (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_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
||||||
Act_Action_t NextAction = ActUnk;
|
Act_Action_t NextAction = ActUnk;
|
||||||
unsigned Year;
|
unsigned Year;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = Crs_EditingCrs->ShrtName,
|
[Cns_SHRT_NAME] = Crs_EditingCrs->ShrtName,
|
||||||
[Cns_FULL_NAME] = Crs_EditingCrs->FullName,
|
[Cns_FULL_NAME] = Crs_EditingCrs->FullName,
|
||||||
};
|
};
|
||||||
|
|
||||||
/***** Set action depending on role *****/
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Begin form *****/
|
||||||
if (Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM)
|
if (Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM)
|
||||||
NextAction = ActNewCrs;
|
NextAction = ActNewCrs;
|
||||||
|
@ -1138,21 +1132,7 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Course short name and full name *****/
|
/***** Course short name and full name *****/
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_NewShortAndFullNames (Names);
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
|
||||||
ShrtOrFullName++)
|
|
||||||
{
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
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 ());
|
||||||
|
|
|
@ -331,7 +331,7 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
||||||
bool ICanEdit;
|
bool ICanEdit;
|
||||||
unsigned NumCrss;
|
unsigned NumCrss;
|
||||||
unsigned NumUsrsInCrssOfDeg;
|
unsigned NumUsrsInCrssOfDeg;
|
||||||
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -385,12 +385,12 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Degree short name and full name */
|
/* Degree short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Deg->ShrtName;
|
Names[Cns_SHRT_NAME] = Deg->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Deg->FullName;
|
Names[Cns_FULL_NAME] = Deg->FullName;
|
||||||
Frm_PutShortAndFullNames (ActionRename,
|
Frm_ExistingShortAndFullNames (ActionRename,
|
||||||
ParCod_OthHie,Deg->HieCod,
|
ParCod_OthHie,Deg->HieCod,
|
||||||
Name,
|
Names,
|
||||||
ICanEdit); // Put form?
|
ICanEdit); // Put form?
|
||||||
|
|
||||||
/* Degree type */
|
/* Degree type */
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
|
@ -506,14 +506,10 @@ static bool Deg_CheckIfICanEditADegree (struct Hie_Node *Deg)
|
||||||
|
|
||||||
static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
static void Deg_PutFormToCreateDegree (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];
|
|
||||||
Act_Action_t NextAction = ActUnk;
|
Act_Action_t NextAction = ActUnk;
|
||||||
unsigned NumDegTyp;
|
unsigned NumDegTyp;
|
||||||
struct DegTyp_DegreeType *DegTyp;
|
struct DegTyp_DegreeType *DegTyp;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = Deg_EditingDeg->ShrtName,
|
[Cns_SHRT_NAME] = Deg_EditingDeg->ShrtName,
|
||||||
[Cns_FULL_NAME] = Deg_EditingDeg->FullName,
|
[Cns_FULL_NAME] = Deg_EditingDeg->FullName,
|
||||||
|
@ -552,21 +548,7 @@ static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Degree short name and full name *****/
|
/***** Degree short name and full name *****/
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_NewShortAndFullNames (Names);
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
|
||||||
ShrtOrFullName++)
|
|
||||||
{
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Degree type *****/
|
/***** Degree type *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
|
|
@ -474,7 +474,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
||||||
struct Dpt_Department *Dpt;
|
struct Dpt_Department *Dpt;
|
||||||
unsigned NumIns;
|
unsigned NumIns;
|
||||||
struct Hie_Node *Ins;
|
struct Hie_Node *Ins;
|
||||||
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginPadding (2);
|
HTM_TABLE_BeginPadding (2);
|
||||||
|
@ -534,12 +534,12 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Department short name and full name */
|
/* Department short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Dpt->ShrtName;
|
Names[Cns_SHRT_NAME] = Dpt->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Dpt->FullName;
|
Names[Cns_FULL_NAME] = Dpt->FullName;
|
||||||
Frm_PutShortAndFullNames (ActionRename,
|
Frm_ExistingShortAndFullNames (ActionRename,
|
||||||
ParCod_Dpt,Dpt->DptCod,
|
ParCod_Dpt,Dpt->DptCod,
|
||||||
Name,
|
Names,
|
||||||
true); // Put form
|
true); // Put form
|
||||||
|
|
||||||
/* Department WWW */
|
/* Department WWW */
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
@ -793,14 +793,10 @@ void Dpt_ContEditAfterChgDpt (void)
|
||||||
|
|
||||||
static void Dpt_PutFormToCreateDepartment (void)
|
static void Dpt_PutFormToCreateDepartment (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_Another_institution;
|
extern const char *Txt_Another_institution;
|
||||||
unsigned NumIns;
|
unsigned NumIns;
|
||||||
const struct Hie_Node *Ins;
|
const struct Hie_Node *Ins;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = Dpt_EditingDpt->ShrtName,
|
[Cns_SHRT_NAME] = Dpt_EditingDpt->ShrtName,
|
||||||
[Cns_FULL_NAME] = Dpt_EditingDpt->FullName,
|
[Cns_FULL_NAME] = Dpt_EditingDpt->FullName,
|
||||||
|
@ -848,21 +844,7 @@ static void Dpt_PutFormToCreateDepartment (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Department short name and full name *****/
|
/***** Department short name and full name *****/
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_NewShortAndFullNames (Names);
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
|
||||||
ShrtOrFullName++)
|
|
||||||
{
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Department WWW *****/
|
/***** Department WWW *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
|
39
swad_form.c
39
swad_form.c
|
@ -357,10 +357,34 @@ void Frm_LabelColumn (const char *TDClass,const char *Id,const char *Label)
|
||||||
/************************ Write short and full names *************************/
|
/************************ Write short and full names *************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Frm_PutShortAndFullNames (Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES],
|
void Frm_NewShortAndFullNames (const char *Names[Cns_NUM_SHRT_FULL_NAMES])
|
||||||
ParCod_Param_t ParCod,long Cod,
|
{
|
||||||
const char *Name[Cns_NUM_SHRT_FULL_NAMES],
|
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
bool PutForm)
|
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=\"CM\"");
|
||||||
|
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
||||||
|
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
||||||
|
Names[ShrtOrFullName],
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"%s INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Frm_ExistingShortAndFullNames (Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES],
|
||||||
|
ParCod_Param_t ParCod,long Cod,
|
||||||
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES],
|
||||||
|
bool PutForm)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
extern unsigned Cns_MaxCharsShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
@ -378,15 +402,16 @@ void Frm_PutShortAndFullNames (Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES
|
||||||
ParCod_PutPar (ParCod,Cod);
|
ParCod_PutPar (ParCod,Cod);
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
||||||
Name[ShrtOrFullName],
|
Names[ShrtOrFullName],
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
HTM_SUBMIT_ON_CHANGE,
|
||||||
"class=\"%s INPUT_%s\"",
|
"class=\"%s INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
HTM_Txt (Name[ShrtOrFullName]);
|
HTM_Txt (Names[ShrtOrFullName]);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,9 +79,10 @@ 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],
|
void Frm_NewShortAndFullNames (const char *Names[Cns_NUM_SHRT_FULL_NAMES]);
|
||||||
ParCod_Param_t ParCod,long Cod,
|
void Frm_ExistingShortAndFullNames (Act_Action_t ActionRename[Cns_NUM_SHRT_FULL_NAMES],
|
||||||
const char *Name[Cns_NUM_SHRT_FULL_NAMES],
|
ParCod_Param_t ParCod,long Cod,
|
||||||
bool PutForm);
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES],
|
||||||
|
bool PutForm);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -890,7 +890,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
unsigned NumCtrs;
|
unsigned NumCtrs;
|
||||||
unsigned NumUsrsIns;
|
unsigned NumUsrsIns;
|
||||||
unsigned NumUsrsInCrssOfIns;
|
unsigned NumUsrsInCrssOfIns;
|
||||||
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Initialize structure with user's data *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
@ -947,12 +947,12 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Institution short name and full name */
|
/* Institution short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Ins->ShrtName;
|
Names[Cns_SHRT_NAME] = Ins->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Ins->FullName;
|
Names[Cns_FULL_NAME] = Ins->FullName;
|
||||||
Frm_PutShortAndFullNames (ActionRename,
|
Frm_ExistingShortAndFullNames (ActionRename,
|
||||||
ParCod_OthHie,Ins->HieCod,
|
ParCod_OthHie,Ins->HieCod,
|
||||||
Name,
|
Names,
|
||||||
ICanEdit); // Put form?
|
ICanEdit); // Put form?
|
||||||
|
|
||||||
/* Institution WWW */
|
/* Institution WWW */
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
|
@ -1330,12 +1330,8 @@ static void Ins_ShowAlertAndButtonToGoToIns (void)
|
||||||
|
|
||||||
static void Ins_PutFormToCreateInstitution (void)
|
static void Ins_PutFormToCreateInstitution (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];
|
|
||||||
Act_Action_t NextAction = ActUnk;
|
Act_Action_t NextAction = ActUnk;
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = Ins_EditingIns->ShrtName,
|
[Cns_SHRT_NAME] = Ins_EditingIns->ShrtName,
|
||||||
[Cns_FULL_NAME] = Ins_EditingIns->FullName,
|
[Cns_FULL_NAME] = Ins_EditingIns->FullName,
|
||||||
|
@ -1374,21 +1370,7 @@ static void Ins_PutFormToCreateInstitution (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Institution short name and full name *****/
|
/***** Institution short name and full name *****/
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_NewShortAndFullNames (Names);
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
|
||||||
ShrtOrFullName++)
|
|
||||||
{
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Institution WWW *****/
|
/***** Institution WWW *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
|
36
swad_link.c
36
swad_link.c
|
@ -404,7 +404,7 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
|
||||||
};
|
};
|
||||||
unsigned NumLnk;
|
unsigned NumLnk;
|
||||||
struct Lnk_Link *Lnk;
|
struct Lnk_Link *Lnk;
|
||||||
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
@ -433,12 +433,12 @@ static void Lnk_ListLinksForEdition (const struct Lnk_Links *Links)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Link short name and full name */
|
/* Link short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Lnk->ShrtName;
|
Names[Cns_SHRT_NAME] = Lnk->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Lnk->FullName;
|
Names[Cns_FULL_NAME] = Lnk->FullName;
|
||||||
Frm_PutShortAndFullNames (ActionRename,
|
Frm_ExistingShortAndFullNames (ActionRename,
|
||||||
ParCod_Lnk,Lnk->LnkCod,
|
ParCod_Lnk,Lnk->LnkCod,
|
||||||
Name,
|
Names,
|
||||||
true); // Put form
|
true); // Put form
|
||||||
|
|
||||||
/* Link WWW */
|
/* Link WWW */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
@ -649,11 +649,7 @@ void Lnk_ContEditAfterChgLnk (void)
|
||||||
|
|
||||||
static void Lnk_PutFormToCreateLink (void)
|
static void Lnk_PutFormToCreateLink (void)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[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;
|
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = Lnk_EditingLnk->ShrtName,
|
[Cns_SHRT_NAME] = Lnk_EditingLnk->ShrtName,
|
||||||
[Cns_FULL_NAME] = Lnk_EditingLnk->FullName,
|
[Cns_FULL_NAME] = Lnk_EditingLnk->FullName,
|
||||||
|
@ -676,21 +672,7 @@ static void Lnk_PutFormToCreateLink (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Link short name and full name *****/
|
/***** Link short name and full name *****/
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_NewShortAndFullNames (Names);
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
|
||||||
ShrtOrFullName++)
|
|
||||||
{
|
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Link WWW *****/
|
/***** Link WWW *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
|
36
swad_place.c
36
swad_place.c
|
@ -452,7 +452,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
||||||
};
|
};
|
||||||
unsigned NumPlc;
|
unsigned NumPlc;
|
||||||
struct Plc_Place *Plc;
|
struct Plc_Place *Plc;
|
||||||
const char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
@ -484,12 +484,12 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Place short name and full name */
|
/* Place short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Plc->ShrtName;
|
Names[Cns_SHRT_NAME] = Plc->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Plc->FullName;
|
Names[Cns_FULL_NAME] = Plc->FullName;
|
||||||
Frm_PutShortAndFullNames (ActionRename,
|
Frm_ExistingShortAndFullNames (ActionRename,
|
||||||
ParCod_Plc,Plc->PlcCod,
|
ParCod_Plc,Plc->PlcCod,
|
||||||
Name,
|
Names,
|
||||||
true); // Put form
|
true); // Put form
|
||||||
|
|
||||||
/* Number of centers */
|
/* Number of centers */
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
|
@ -662,11 +662,7 @@ void Plc_ContEditAfterChgPlc (void)
|
||||||
|
|
||||||
static void Plc_PutFormToCreatePlace (void)
|
static void Plc_PutFormToCreatePlace (void)
|
||||||
{
|
{
|
||||||
extern const char *Cns_ParShrtOrFullName[Cns_NUM_SHRT_FULL_NAMES];
|
const char *Names[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;
|
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = Plc_EditingPlc->ShrtName,
|
[Cns_SHRT_NAME] = Plc_EditingPlc->ShrtName,
|
||||||
[Cns_FULL_NAME] = Plc_EditingPlc->FullName,
|
[Cns_FULL_NAME] = Plc_EditingPlc->FullName,
|
||||||
|
@ -689,21 +685,7 @@ static void Plc_PutFormToCreatePlace (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Place short name and full name *****/
|
/***** Place short name and full name *****/
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_NewShortAndFullNames (Names);
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
|
||||||
ShrtOrFullName++)
|
|
||||||
{
|
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"%s INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
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 ());
|
||||||
|
|
60
swad_room.c
60
swad_room.c
|
@ -628,9 +628,6 @@ void Roo_FreeListRooms (struct Roo_Rooms *Rooms)
|
||||||
static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
||||||
const struct Roo_Rooms *Rooms)
|
const struct Roo_Rooms *Rooms)
|
||||||
{
|
{
|
||||||
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] = ActRenRooSho,
|
[Cns_SHRT_NAME] = ActRenRooSho,
|
||||||
|
@ -640,8 +637,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
||||||
struct Roo_Room *Room;
|
struct Roo_Room *Room;
|
||||||
char *Anchor = NULL;
|
char *Anchor = NULL;
|
||||||
char StrCapacity[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
char StrCapacity[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES];
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES];
|
|
||||||
|
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
|
||||||
|
@ -703,26 +699,12 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Room short name and full name */
|
/* Room short name and full name */
|
||||||
Name[Cns_SHRT_NAME] = Room->ShrtName;
|
Names[Cns_SHRT_NAME] = Room->ShrtName;
|
||||||
Name[Cns_FULL_NAME] = Room->FullName;
|
Names[Cns_FULL_NAME] = Room->FullName;
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_ExistingShortAndFullNames (ActionRename,
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
ParCod_Roo,Room->RooCod,
|
||||||
ShrtOrFullName++)
|
Names,
|
||||||
{
|
true); // Put form
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
|
||||||
Frm_BeginFormAnchor (ActionRename[ShrtOrFullName],Anchor);
|
|
||||||
ParCod_PutPar (ParCod_Roo,Room->RooCod);
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"10\""
|
|
||||||
" class=\"%s INPUT_%s\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
Frm_EndForm ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Seating capacity */
|
/* Seating capacity */
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
|
@ -1214,13 +1196,9 @@ void Roo_ContEditAfterChgRoom (void)
|
||||||
|
|
||||||
static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
|
static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
|
||||||
{
|
{
|
||||||
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];
|
|
||||||
char StrCapacity[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
char StrCapacity[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||||
char MACstr[MAC_LENGTH_MAC_ADDRESS + 1]; // MAC address in xx:xx:xx:xx:xx:xx format
|
char MACstr[MAC_LENGTH_MAC_ADDRESS + 1]; // MAC address in xx:xx:xx:xx:xx:xx format
|
||||||
Cns_ShrtOrFullName_t ShrtOrFullName;
|
const char *Names[Cns_NUM_SHRT_FULL_NAMES] =
|
||||||
char *Name[Cns_NUM_SHRT_FULL_NAMES] =
|
|
||||||
{
|
{
|
||||||
[Cns_SHRT_NAME] = Roo_EditingRoom->ShrtName,
|
[Cns_SHRT_NAME] = Roo_EditingRoom->ShrtName,
|
||||||
[Cns_FULL_NAME] = Roo_EditingRoom->FullName,
|
[Cns_FULL_NAME] = Roo_EditingRoom->FullName,
|
||||||
|
@ -1263,21 +1241,7 @@ static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Room short name and full name *****/
|
/***** Room short name and full name *****/
|
||||||
for (ShrtOrFullName = Cns_SHRT_NAME;
|
Frm_NewShortAndFullNames (Names);
|
||||||
ShrtOrFullName <= Cns_FULL_NAME;
|
|
||||||
ShrtOrFullName++)
|
|
||||||
{
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
HTM_INPUT_TEXT (Cns_ParShrtOrFullName[ShrtOrFullName],
|
|
||||||
Cns_MaxCharsShrtOrFullName[ShrtOrFullName],
|
|
||||||
Name[ShrtOrFullName],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"10\" class=\"%s INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
Cns_ClassShrtOrFullName[ShrtOrFullName],
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Seating capacity *****/
|
/***** Seating capacity *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
@ -1363,9 +1327,9 @@ void Roo_ReceiveFormNewRoom (void)
|
||||||
/* Get seating capacity */
|
/* Get seating capacity */
|
||||||
Roo_EditingRoom->Capacity = (unsigned)
|
Roo_EditingRoom->Capacity = (unsigned)
|
||||||
Par_GetParUnsignedLong ("Capacity",
|
Par_GetParUnsignedLong ("Capacity",
|
||||||
0,
|
0,
|
||||||
Roo_MAX_CAPACITY,
|
Roo_MAX_CAPACITY,
|
||||||
Roo_UNLIMITED_CAPACITY);
|
Roo_UNLIMITED_CAPACITY);
|
||||||
|
|
||||||
/* Get MAC address */
|
/* Get MAC address */
|
||||||
Roo_EditingRoom->MACnum = MAC_GetMACnumFromForm ("MAC");
|
Roo_EditingRoom->MACnum = MAC_GetMACnumFromForm ("MAC");
|
||||||
|
|
Loading…
Reference in New Issue