mirror of https://github.com/acanas/swad-core.git
Version 22.108: May 11, 2023 Code refactoring in forms.
This commit is contained in:
parent
1bd200959b
commit
2f2f88d74a
113
swad_banner.c
113
swad_banner.c
|
@ -789,82 +789,65 @@ void Ban_ContEditAfterChgBan (void)
|
|||
|
||||
static void Ban_PutFormToCreateBanner (const struct Ban_Banner *Ban)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewBan,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewBan]);
|
||||
/***** Write heading *****/
|
||||
Ban_PutHeadBanners ();
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewBan);
|
||||
/***** Table row for input fields *****/
|
||||
/* Begin table row */
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
/* Banner code */
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write heading *****/
|
||||
Ban_PutHeadBanners ();
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Table row for input fields *****/
|
||||
/* Begin table row */
|
||||
HTM_TR_Begin (NULL);
|
||||
HTM_TD_Empty (1);
|
||||
|
||||
/* Banner code */
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/* Banner short name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Ban_MAX_CHARS_SHRT_NAME,Ban->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/* Banner full name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Ban_MAX_CHARS_FULL_NAME,Ban->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Empty (1);
|
||||
/* Banner image */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Img",Ban_MAX_CHARS_IMAGE,Ban->Img,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"12\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Banner short name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Ban_MAX_CHARS_SHRT_NAME,Ban->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/* Banner WWW */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_URL ("WWW",Ban->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Banner full name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Ban_MAX_CHARS_FULL_NAME,Ban->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/* End table row */
|
||||
HTM_TR_End ();
|
||||
|
||||
/* Banner image */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Img",Ban_MAX_CHARS_IMAGE,Ban->Img,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"12\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Banner WWW */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_URL ("WWW",Ban->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/* End table row */
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -670,69 +670,52 @@ void Bld_ContEditAfterChgBuilding (void)
|
|||
|
||||
static void Bld_PutFormToCreateBuilding (void)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewBld,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewBld]);
|
||||
/***** Write heading *****/
|
||||
Bld_PutHeadBuildings ();
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewBld);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
/***** Column to remove building, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write heading *****/
|
||||
Bld_PutHeadBuildings ();
|
||||
/***** Building code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Building short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Bld_EditingBuilding->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove building, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Building full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Bld_EditingBuilding->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Building code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** Building location *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Bld_EditingBuilding->Location,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\" class=\"INPUT_FULL_NAME INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Building short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Bld_EditingBuilding->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Building full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Bld_EditingBuilding->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Building location *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Bld_EditingBuilding->Location,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\" class=\"INPUT_FULL_NAME INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -37,32 +37,26 @@ void Btn_PutButton (Btn_Button_t Button,const char *TxtButton)
|
|||
{
|
||||
static void (*Function[Btn_NUM_BUTTON_TYPES]) (const char *TxtButton) =
|
||||
{
|
||||
[Btn_NO_BUTTON ] = NULL,
|
||||
[Btn_CREATE_BUTTON ] = Btn_PutCreateButton,
|
||||
[Btn_CONFIRM_BUTTON] = Btn_PutConfirmButton,
|
||||
[Btn_REMOVE_BUTTON ] = Btn_PutRemoveButton,
|
||||
};
|
||||
|
||||
if (TxtButton)
|
||||
if (TxtButton[0])
|
||||
if (Function[Button])
|
||||
Function[Button] (TxtButton);
|
||||
if (Button != Btn_NO_BUTTON && TxtButton)
|
||||
Function[Button] (TxtButton);
|
||||
}
|
||||
|
||||
void Btn_PutButtonInline (Btn_Button_t Button,const char *TxtButton)
|
||||
{
|
||||
static void (*Function[Btn_NUM_BUTTON_TYPES]) (const char *TxtButton) =
|
||||
{
|
||||
[Btn_NO_BUTTON ] = NULL,
|
||||
[Btn_CREATE_BUTTON ] = Btn_PutCreateButtonInline,
|
||||
[Btn_CONFIRM_BUTTON] = Btn_PutConfirmButtonInline,
|
||||
[Btn_REMOVE_BUTTON ] = Btn_PutRemoveButtonInline,
|
||||
};
|
||||
|
||||
if (TxtButton)
|
||||
if (TxtButton[0])
|
||||
if (Function[Button])
|
||||
Function[Button] (TxtButton);
|
||||
if (Button != Btn_NO_BUTTON && TxtButton)
|
||||
Function[Button] (TxtButton);
|
||||
}
|
||||
|
||||
void Btn_PutCreateButton (const char *TxtButton)
|
||||
|
|
180
swad_center.c
180
swad_center.c
|
@ -1237,9 +1237,7 @@ static void Ctr_ShowAlertAndButtonToGoToCtr (void)
|
|||
|
||||
static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Another_place;
|
||||
extern const char *Txt_Create;
|
||||
Act_Action_t NextAction = ActUnk;
|
||||
unsigned NumPlc;
|
||||
const struct Plc_Place *PlcInLst;
|
||||
|
@ -1252,118 +1250,104 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
|||
else
|
||||
Err_NoPermissionExit ();
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[NextAction]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (NextAction,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (NextAction);
|
||||
/***** Write heading *****/
|
||||
Ctr_PutHeadCentersForEdition ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write heading *****/
|
||||
Ctr_PutHeadCentersForEdition ();
|
||||
/***** Column to remove center, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Center code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove center, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Center logo *****/
|
||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ctr_EditingCtr->FullName);
|
||||
Lgo_DrawLogo (HieLvl_CTR,-1L,"",20,NULL,true);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Center code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** Place *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Ctr_EditingCtr->PlcCod == 0, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_place);
|
||||
for (NumPlc = 0;
|
||||
NumPlc < Places->Num;
|
||||
NumPlc++)
|
||||
{
|
||||
PlcInLst = &Places->Lst[NumPlc];
|
||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
||||
PlcInLst->PlcCod == Ctr_EditingCtr->PlcCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",PlcInLst->ShrtName);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Center logo *****/
|
||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ctr_EditingCtr->FullName);
|
||||
Lgo_DrawLogo (HieLvl_CTR,-1L,"",20,NULL,true);
|
||||
HTM_TD_End ();
|
||||
/***** Center short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ctr_EditingCtr->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Place *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Ctr_EditingCtr->PlcCod == 0, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_place);
|
||||
for (NumPlc = 0;
|
||||
NumPlc < Places->Num;
|
||||
NumPlc++)
|
||||
{
|
||||
PlcInLst = &Places->Lst[NumPlc];
|
||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
||||
PlcInLst->PlcCod == Ctr_EditingCtr->PlcCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",PlcInLst->ShrtName);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
/***** Center full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ctr_EditingCtr->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Center short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ctr_EditingCtr->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Center WWW *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_URL ("WWW",Ctr_EditingCtr->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Center full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ctr_EditingCtr->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Number of users who claim to belong to this center *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Center WWW *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_URL ("WWW",Ctr_EditingCtr->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Number of degrees *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of users who claim to belong to this center *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
/***** Number of users in courses of this center *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of degrees *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
/***** Center requester *****/
|
||||
HTM_TD_Begin ("class=\"DAT_%s INPUT_REQUESTER LT\"",
|
||||
The_GetSuffix ());
|
||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of users in courses of this center *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
/***** Center status *****/
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Center requester *****/
|
||||
HTM_TD_Begin ("class=\"DAT_%s INPUT_REQUESTER LT\"",
|
||||
The_GetSuffix ());
|
||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Center status *****/
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -629,11 +629,12 @@ TODO: Emilce Barrera Mesa: Podr
|
|||
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
||||
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.107.40 (2023-05-10)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.108 (2023-05-11)"
|
||||
#define CSS_FILE "swad22.107.36.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 22.107.40:May 10, 2023 Changes in creation of test questions and survey questions. (? lines)
|
||||
Version 22.108: May 11, 2023 Code refactoring in forms. (337145 lines)
|
||||
Version 22.107.40:May 10, 2023 Changes in creation of test questions and survey questions. (337447 lines)
|
||||
Version 22.107.39:May 10, 2023 Changes in creation of user account. (337435 lines)
|
||||
Version 22.107.38:May 10, 2023 Changes in edition of mail domains. (337455 lines)
|
||||
Version 22.107.37:May 10, 2023 Changes in edition of attendance events and agenda events. (337484 lines)
|
||||
|
|
154
swad_country.c
154
swad_country.c
|
@ -1401,111 +1401,95 @@ static void Cty_PutFormToCreateCountry (void)
|
|||
{
|
||||
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
||||
extern const char *Par_CodeStr[];
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_STR_LANG_NAME[1 + Lan_NUM_LANGUAGES];
|
||||
extern const char *Txt_Create;
|
||||
Lan_Language_t Lan;
|
||||
char StrCtyCod[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
char StrName[32];
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewCty]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewCty,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewCty);
|
||||
/***** Write heading *****/
|
||||
Cty_PutHeadCountriesForEdition ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write heading *****/
|
||||
Cty_PutHeadCountriesForEdition ();
|
||||
/***** Column to remove country, disabled here *****/
|
||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"BT\"",1 + Lan_NUM_LANGUAGES);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Numerical country code (ISO 3166-1) *****/
|
||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT\"",1 + Lan_NUM_LANGUAGES);
|
||||
if (Cty_EditingCty->CtyCod > 0)
|
||||
snprintf (StrCtyCod,sizeof (StrCtyCod),"%03ld",Cty_EditingCty->CtyCod);
|
||||
else
|
||||
StrCtyCod[0] = '\0';
|
||||
HTM_INPUT_TEXT (Par_CodeStr[ParCod_OthCty],3,StrCtyCod,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"3\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove country, disabled here *****/
|
||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"BT\"",1 + Lan_NUM_LANGUAGES);
|
||||
HTM_TD_End ();
|
||||
/***** Alphabetic country code with 2 letters (ISO 3166-1) *****/
|
||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT\"",1 + Lan_NUM_LANGUAGES);
|
||||
HTM_INPUT_TEXT ("Alpha2",2,Cty_EditingCty->Alpha2,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"2\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Numerical country code (ISO 3166-1) *****/
|
||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT\"",1 + Lan_NUM_LANGUAGES);
|
||||
if (Cty_EditingCty->CtyCod > 0)
|
||||
snprintf (StrCtyCod,sizeof (StrCtyCod),"%03ld",Cty_EditingCty->CtyCod);
|
||||
else
|
||||
StrCtyCod[0] = '\0';
|
||||
HTM_INPUT_TEXT (Par_CodeStr[ParCod_OthCty],3,StrCtyCod,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"3\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Empty (3);
|
||||
|
||||
/***** Alphabetic country code with 2 letters (ISO 3166-1) *****/
|
||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT\"",1 + Lan_NUM_LANGUAGES);
|
||||
HTM_INPUT_TEXT ("Alpha2",2,Cty_EditingCty->Alpha2,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"2\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Number of users *****/
|
||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT DAT_%s\"",
|
||||
1 + Lan_NUM_LANGUAGES,The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Empty (3);
|
||||
/***** Number of institutions *****/
|
||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT DAT_%s\"",
|
||||
1 + Lan_NUM_LANGUAGES,The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of users *****/
|
||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT DAT_%s\"",
|
||||
1 + Lan_NUM_LANGUAGES,The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Number of institutions *****/
|
||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT DAT_%s\"",
|
||||
1 + Lan_NUM_LANGUAGES,The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
/***** Country name in several languages *****/
|
||||
for (Lan = (Lan_Language_t) 1;
|
||||
Lan <= (Lan_Language_t) Lan_NUM_LANGUAGES;
|
||||
Lan++)
|
||||
{
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TR_End ();
|
||||
/* Language */
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (Txt_STR_LANG_NAME[Lan]);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Country name in several languages *****/
|
||||
for (Lan = (Lan_Language_t) 1;
|
||||
Lan <= (Lan_Language_t) Lan_NUM_LANGUAGES;
|
||||
Lan++)
|
||||
{
|
||||
HTM_TR_Begin (NULL);
|
||||
/* Name */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
snprintf (StrName,sizeof (StrName),"Name_%s",Lan_STR_LANG_ID[Lan]);
|
||||
HTM_INPUT_TEXT (StrName,Cty_MAX_CHARS_NAME,Cty_EditingCty->Name[Lan],
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Language */
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (Txt_STR_LANG_NAME[Lan]);
|
||||
HTM_TD_End ();
|
||||
/* WWW */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
snprintf (StrName,sizeof (StrName),"WWW_%s",Lan_STR_LANG_ID[Lan]);
|
||||
HTM_INPUT_URL (StrName,Cty_EditingCty->WWW[Lan],HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Name */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
snprintf (StrName,sizeof (StrName),"Name_%s",Lan_STR_LANG_ID[Lan]);
|
||||
HTM_INPUT_TEXT (StrName,Cty_MAX_CHARS_NAME,Cty_EditingCty->Name[Lan],
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
||||
/* WWW */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
snprintf (StrName,sizeof (StrName),"WWW_%s",Lan_STR_LANG_ID[Lan]);
|
||||
HTM_INPUT_URL (StrName,Cty_EditingCty->WWW[Lan],HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
154
swad_course.c
154
swad_course.c
|
@ -1280,9 +1280,7 @@ static bool Crs_CheckIfICanEdit (struct Crs_Course *Crs)
|
|||
|
||||
static void Crs_PutFormToCreateCourse (void)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
||||
extern const char *Txt_Create;
|
||||
Act_Action_t NextAction = ActUnk;
|
||||
unsigned Year;
|
||||
|
||||
|
@ -1296,103 +1294,89 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
else
|
||||
Err_NoPermissionExit ();
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[NextAction]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (NextAction,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (NextAction);
|
||||
/***** Write heading *****/
|
||||
Crs_PutHeadCoursesForEdition ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write heading *****/
|
||||
Crs_PutHeadCoursesForEdition ();
|
||||
/***** Column to remove course, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Course code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove course, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Institutional code of the course *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
||||
Crs_EditingCrs->InstitutionalCrsCod,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_INS_CODE INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Course code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** Year *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"OthCrsYear\""
|
||||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
for (Year = 0;
|
||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||
Year++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||
Year == Crs_EditingCrs->Year, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Institutional code of the course *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
||||
Crs_EditingCrs->InstitutionalCrsCod,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_INS_CODE INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Course short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Crs_EditingCrs->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Year *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"OthCrsYear\""
|
||||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
for (Year = 0;
|
||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||
Year++)
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||
Year == Crs_EditingCrs->Year, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
/***** Course full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Crs_EditingCrs->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Course short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Crs_EditingCrs->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Current number of teachers in this course *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Course full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Crs_EditingCrs->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Current number of students in this course *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Current number of teachers in this course *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
/***** Course requester *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||
The_GetSuffix ());
|
||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Current number of students in this course *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
/***** Course status *****/
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Course requester *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||
The_GetSuffix ());
|
||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Course status *****/
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
166
swad_degree.c
166
swad_degree.c
|
@ -513,8 +513,6 @@ static bool Deg_CheckIfICanEditADegree (struct Deg_Degree *Deg)
|
|||
|
||||
static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
Act_Action_t NextAction = ActUnk;
|
||||
unsigned NumDegTyp;
|
||||
struct DegTyp_DegreeType *DegTypInLst;
|
||||
|
@ -527,110 +525,96 @@ static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
|||
else
|
||||
Err_NoPermissionExit ();
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[NextAction]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (NextAction,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (NextAction);
|
||||
/***** Write heading *****/
|
||||
Deg_PutHeadDegreesForEdition ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write heading *****/
|
||||
Deg_PutHeadDegreesForEdition ();
|
||||
/***** Column to remove degree, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Degree code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove degree, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Degree logo *****/
|
||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Deg_EditingDeg->FullName);
|
||||
Lgo_DrawLogo (HieLvl_DEG,-1L,"",20,NULL,true);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Degree code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** Degree short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Deg_EditingDeg->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Degree logo *****/
|
||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Deg_EditingDeg->FullName);
|
||||
Lgo_DrawLogo (HieLvl_DEG,-1L,"",20,NULL,true);
|
||||
HTM_TD_End ();
|
||||
/***** Degree full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Deg_EditingDeg->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Degree short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Deg_EditingDeg->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Degree type *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"OthDegTypCod\""
|
||||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
for (NumDegTyp = 0;
|
||||
NumDegTyp < DegTypes->Num;
|
||||
NumDegTyp++)
|
||||
{
|
||||
DegTypInLst = &DegTypes->Lst[NumDegTyp];
|
||||
HTM_OPTION (HTM_Type_LONG,&DegTypInLst->DegTypCod,
|
||||
DegTypInLst->DegTypCod == Deg_EditingDeg->DegTypCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",DegTypInLst->DegTypName);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Degree full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Deg_EditingDeg->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Degree WWW *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_URL ("WWW",Deg_EditingDeg->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Degree type *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"OthDegTypCod\""
|
||||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
for (NumDegTyp = 0;
|
||||
NumDegTyp < DegTypes->Num;
|
||||
NumDegTyp++)
|
||||
{
|
||||
DegTypInLst = &DegTypes->Lst[NumDegTyp];
|
||||
HTM_OPTION (HTM_Type_LONG,&DegTypInLst->DegTypCod,
|
||||
DegTypInLst->DegTypCod == Deg_EditingDeg->DegTypCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",DegTypInLst->DegTypName);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
/***** Number of courses in this degree *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Degree WWW *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_URL ("WWW",Deg_EditingDeg->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Number of users in courses of this degree *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of courses in this degree *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
/***** Degree requester *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||
The_GetSuffix ());
|
||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of users in courses of this degree *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
/***** Degree status *****/
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Degree requester *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||
The_GetSuffix ());
|
||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Degree status *****/
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -457,59 +457,42 @@ bool DegTyp_CheckIfICanCreateDegreeTypes (void)
|
|||
|
||||
static void DegTyp_PutFormToCreateDegreeType (void)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewDegTyp,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewDegTyp]);
|
||||
/***** Write heading *****/
|
||||
DegTyp_PutHeadDegreeTypesForEdition ();
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewDegTyp);
|
||||
/***** Begin table row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
/***** Column to remove degree type, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write heading *****/
|
||||
DegTyp_PutHeadDegreeTypesForEdition ();
|
||||
/***** Degree type code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Begin table row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Degree type name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("DegTypName",DegTyp_MAX_CHARS_DEGREE_TYPE_NAME,DegTyp_EditingDegTyp->DegTypName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"25\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove degree type, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Number of degrees of this degree type ****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Degree type code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** End table row *****/
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Degree type name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("DegTypName",DegTyp_MAX_CHARS_DEGREE_TYPE_NAME,DegTyp_EditingDegTyp->DegTypName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"25\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of degrees of this degree type ****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** End table row *****/
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -810,100 +810,84 @@ void Dpt_ContEditAfterChgDpt (void)
|
|||
|
||||
static void Dpt_PutFormToCreateDepartment (void)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Another_institution;
|
||||
extern const char *Txt_Create;
|
||||
unsigned NumIns;
|
||||
const struct Ins_Instit *InsInLst;
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewDpt]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewDpt,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewDpt);
|
||||
/***** Write heading *****/
|
||||
Dpt_PutHeadDepartments ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write heading *****/
|
||||
Dpt_PutHeadDepartments ();
|
||||
/***** Column to remove department, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Department code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove department, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Institution *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"OthInsCod\""
|
||||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Dpt_EditingDpt->InsCod == 0, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_institution);
|
||||
for (NumIns = 0;
|
||||
NumIns < Gbl.Hierarchy.Inss.Num;
|
||||
NumIns++)
|
||||
{
|
||||
InsInLst = &Gbl.Hierarchy.Inss.Lst[NumIns];
|
||||
HTM_OPTION (HTM_Type_LONG,&InsInLst->InsCod,
|
||||
InsInLst->InsCod == Dpt_EditingDpt->InsCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",InsInLst->ShrtName);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Department code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** Department short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Dpt_EditingDpt->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Institution *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"OthInsCod\""
|
||||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Dpt_EditingDpt->InsCod == 0, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_institution);
|
||||
for (NumIns = 0;
|
||||
NumIns < Gbl.Hierarchy.Inss.Num;
|
||||
NumIns++)
|
||||
{
|
||||
InsInLst = &Gbl.Hierarchy.Inss.Lst[NumIns];
|
||||
HTM_OPTION (HTM_Type_LONG,&InsInLst->InsCod,
|
||||
InsInLst->InsCod == Dpt_EditingDpt->InsCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",InsInLst->ShrtName);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
/***** Department full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Dpt_EditingDpt->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Department short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Dpt_EditingDpt->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Department WWW *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_URL ("WWW",Dpt_EditingDpt->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Department full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Dpt_EditingDpt->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Number of teachers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Department WWW *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_URL ("WWW",Dpt_EditingDpt->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Number of teachers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -95,7 +95,9 @@ static void ExaSes_ListOneOrMoreSessionsResultTch (struct Exa_Exams *Exams,
|
|||
static void ExaSes_GetSessionDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct ExaSes_Session *Session);
|
||||
|
||||
static void ExaSes_PutFormSession (const struct ExaSes_Session *Session);
|
||||
static void ExaSes_PutFormSession (struct ExaSes_Session *Session);
|
||||
static void ExaSes_ParsFormSession (void *Session);
|
||||
|
||||
static void ExaSes_ShowLstGrpsToCreateSession (long SesCod);
|
||||
|
||||
static void ExaSes_CreateSession (struct ExaSes_Session *Session);
|
||||
|
@ -957,79 +959,64 @@ void ExaSes_GetAndCheckPars (struct Exa_Exams *Exams,
|
|||
/* Put a big button to play exam session (start a new session) as a teacher **/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void ExaSes_PutFormSession (const struct ExaSes_Session *Session)
|
||||
static void ExaSes_PutFormSession (struct ExaSes_Session *Session)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Title;
|
||||
extern const char *Txt_Create;
|
||||
extern const char *Txt_Save_changes;
|
||||
static const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME] =
|
||||
{
|
||||
[Dat_STR_TIME] = Dat_HMS_DO_NOT_SET,
|
||||
[Dat_END_TIME] = Dat_HMS_DO_NOT_SET
|
||||
};
|
||||
bool ItsANewSession = Session->SesCod <= 0;
|
||||
Act_Action_t NextAction = ItsANewSession ? ActNewExaSes :
|
||||
ActChgExaSes;
|
||||
bool ItsANewSession = (Session->SesCod <= 0);
|
||||
|
||||
/***** Begin section for a new exam session *****/
|
||||
HTM_SECTION_Begin (ExaSes_NEW_SESSION_SECTION_ID);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[NextAction]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ItsANewSession ? ActNewExaSes :
|
||||
ActChgExaSes,
|
||||
ExaSes_NEW_SESSION_SECTION_ID,
|
||||
ExaSes_ParsFormSession,Session);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (NextAction);
|
||||
ParCod_PutPar (ParCod_Exa,Session->ExaCod);
|
||||
if (!ItsANewSession) // Existing session
|
||||
ParCod_PutPar (ParCod_Ses,Session->SesCod);
|
||||
/***** Session title *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Title",Txt_Title);
|
||||
|
||||
/***** Session title *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_INPUT_TEXT ("Title",ExaSes_MAX_CHARS_TITLE,Session->Title,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\" size=\"45\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Title",Txt_Title);
|
||||
HTM_TR_End ();
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_INPUT_TEXT ("Title",ExaSes_MAX_CHARS_TITLE,Session->Title,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\" size=\"45\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Start and end dates *****/
|
||||
Dat_PutFormStartEndClientLocalDateTimes (Session->TimeUTC,
|
||||
Dat_FORM_SECONDS_OFF,
|
||||
SetHMS);
|
||||
|
||||
HTM_TR_End ();
|
||||
/***** Groups *****/
|
||||
ExaSes_ShowLstGrpsToCreateSession (Session->SesCod);
|
||||
|
||||
/***** Start and end dates *****/
|
||||
Dat_PutFormStartEndClientLocalDateTimes (Session->TimeUTC,
|
||||
Dat_FORM_SECONDS_OFF,
|
||||
SetHMS);
|
||||
|
||||
/***** Groups *****/
|
||||
ExaSes_ShowLstGrpsToCreateSession (Session->SesCod);
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
if (ItsANewSession)
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
else
|
||||
Btn_PutButton (Btn_CONFIRM_BUTTON,Txt_Save_changes);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (ItsANewSession ? Btn_CREATE_BUTTON :
|
||||
Btn_CONFIRM_BUTTON);
|
||||
|
||||
/***** End section for a new exam session *****/
|
||||
HTM_SECTION_End ();
|
||||
}
|
||||
|
||||
static void ExaSes_ParsFormSession (void *Session)
|
||||
{
|
||||
ParCod_PutPar (ParCod_Exa,((struct ExaSes_Session *) Session)->ExaCod);
|
||||
ParCod_PutPar (ParCod_Ses,((struct ExaSes_Session *) Session)->SesCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************* Show list of groups to create a new exam session **************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -180,69 +180,51 @@ static void ExaSet_PutFormNewSet (struct Exa_Exams *Exams,
|
|||
struct ExaSet_Set *Set,
|
||||
unsigned MaxSetInd)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewExaSet,NULL,Exa_PutPars,Exams);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewExaSet]);
|
||||
/***** Table heading *****/
|
||||
ExaSet_PutTableHeadingForSets ();
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewExaSet);
|
||||
Exa_PutPars (Exams);
|
||||
/***** Begin row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
/***** Empty column for buttons *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Table heading *****/
|
||||
ExaSet_PutTableHeadingForSets ();
|
||||
/***** Index *****/
|
||||
HTM_TD_Begin ("class=\"RM\"");
|
||||
Lay_WriteIndex (MaxSetInd + 1,"BIG_INDEX");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Begin row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Title *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("Title",ExaSet_MAX_CHARS_TITLE,Set->Title,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\""
|
||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Empty column for buttons *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Current number of questions in set *****/
|
||||
HTM_TD_Begin ("class=\"RM\"");
|
||||
HTM_Unsigned (0); // New set ==> no questions yet
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Index *****/
|
||||
HTM_TD_Begin ("class=\"RM\"");
|
||||
Lay_WriteIndex (MaxSetInd + 1,"BIG_INDEX");
|
||||
HTM_TD_End ();
|
||||
/***** Number of questions to appear in the exam *****/
|
||||
HTM_TD_Begin ("class=\"RM\"");
|
||||
HTM_INPUT_LONG ("NumQstsToPrint",0,UINT_MAX,(long) Set->NumQstsToPrint,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
"class=\"INPUT_LONG\" required=\"required\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Title *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("Title",ExaSet_MAX_CHARS_TITLE,Set->Title,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\""
|
||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** End row *****/
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Current number of questions in set *****/
|
||||
HTM_TD_Begin ("class=\"RM\"");
|
||||
HTM_Unsigned (0); // New set ==> no questions yet
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of questions to appear in the exam *****/
|
||||
HTM_TD_Begin ("class=\"RM\"");
|
||||
HTM_INPUT_LONG ("NumQstsToPrint",0,UINT_MAX,(long) Set->NumQstsToPrint,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
"class=\"INPUT_LONG\" required=\"required\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** End row *****/
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
48
swad_form.c
48
swad_form.c
|
@ -245,6 +245,54 @@ void Frm_EndForm (void)
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Put a form and a table to create *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Frm_BeginFormTable (Act_Action_t NextAction,const char *Anchor,
|
||||
void (*FuncPars) (void *Args),void *Args)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[NextAction]);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (NextAction,Anchor);
|
||||
if (FuncPars)
|
||||
FuncPars (Args);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
}
|
||||
|
||||
void Frm_EndFormTable (Btn_Button_t Button)
|
||||
{
|
||||
extern const char *Txt_Create;
|
||||
extern const char *Txt_Save_changes;
|
||||
extern const char *Txt_Remove;
|
||||
static const char **TxtButton[Btn_NUM_BUTTON_TYPES] =
|
||||
{
|
||||
[Btn_CREATE_BUTTON ] = &Txt_Create,
|
||||
[Btn_CONFIRM_BUTTON] = &Txt_Save_changes,
|
||||
[Btn_REMOVE_BUTTON ] = &Txt_Remove,
|
||||
};
|
||||
|
||||
/***** End table *****/
|
||||
HTM_TABLE_End ();
|
||||
|
||||
/***** Send button *****/
|
||||
if (Button != Btn_NO_BUTTON)
|
||||
Btn_PutButton (Button,*TxtButton[Button]);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Get unique Id *********************************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
#include "swad_action.h"
|
||||
#include "swad_button.h"
|
||||
#include "swad_constant.h"
|
||||
#include "swad_cryptography.h"
|
||||
|
||||
|
@ -65,6 +66,10 @@ void Frm_SetParsForm (char ParsStr[Frm_MAX_BYTES_PARAMS_STR + 1],Act_Action_t Ne
|
|||
bool PutParLocationIfNoSession);
|
||||
void Frm_EndForm (void);
|
||||
|
||||
void Frm_BeginFormTable (Act_Action_t NextAction,const char *Anchor,
|
||||
void (*FuncPars) (void *Args),void *Args);
|
||||
void Frm_EndFormTable (Btn_Button_t Button);
|
||||
|
||||
void Frm_SetUniqueId (char UniqueId[Frm_MAX_BYTES_ID + 1]);
|
||||
|
||||
void Frm_SetAnchorStr (long Cod,char **Anchor);
|
||||
|
|
397
swad_group.c
397
swad_group.c
|
@ -2373,7 +2373,6 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight)
|
|||
|
||||
static void Grp_PutFormToCreateGroupType (void)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Type_of_group;
|
||||
extern const char *Txt_It_is_optional_to_choose_a_group;
|
||||
extern const char *Txt_It_is_mandatory_to_choose_a_group;
|
||||
|
@ -2381,120 +2380,106 @@ static void Grp_PutFormToCreateGroupType (void)
|
|||
extern const char *Txt_A_student_can_only_belong_to_one_group;
|
||||
extern const char *Txt_The_groups_will_automatically_open;
|
||||
extern const char *Txt_The_groups_will_not_automatically_open;
|
||||
extern const char *Txt_Create;
|
||||
unsigned CurrentYear = Dat_GetCurrentYear ();
|
||||
|
||||
/***** Begin section *****/
|
||||
HTM_SECTION_Begin (Grp_NEW_GROUP_TYPE_SECTION_ID);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewGrpTyp]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewGrpTyp,Grp_NEW_GROUP_TYPE_SECTION_ID,
|
||||
NULL,NULL);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (ActNewGrpTyp,Grp_NEW_GROUP_TYPE_SECTION_ID);
|
||||
/***** Write heading *****/
|
||||
Grp_WriteHeadingGroupTypes ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write heading *****/
|
||||
Grp_WriteHeadingGroupTypes ();
|
||||
/***** Column to remove group type, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Name of group type *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME,
|
||||
Gbl.Crs.Grps.GrpTyp.GrpTypName,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"12\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove group type, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Is it mandatory to register in any groups of this type? *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"MandatoryEnrolment\""
|
||||
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"N",
|
||||
!Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_It_is_optional_to_choose_a_group);
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||
Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_It_is_mandatory_to_choose_a_group);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Name of group type *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME,
|
||||
Gbl.Crs.Grps.GrpTyp.GrpTypName,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"12\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Is it possible to register in multiple groups of this type? *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"MultipleEnrolment\""
|
||||
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"N",
|
||||
!Gbl.Crs.Grps.GrpTyp.MultipleEnrolment, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_A_student_can_only_belong_to_one_group);
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||
Gbl.Crs.Grps.GrpTyp.MultipleEnrolment, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_A_student_can_belong_to_several_groups);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Is it mandatory to register in any groups of this type? *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"MandatoryEnrolment\""
|
||||
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"N",
|
||||
!Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_It_is_optional_to_choose_a_group);
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||
Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_It_is_mandatory_to_choose_a_group);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
/***** Open time *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_TABLE_BeginPadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Is it possible to register in multiple groups of this type? *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"MultipleEnrolment\""
|
||||
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"N",
|
||||
!Gbl.Crs.Grps.GrpTyp.MultipleEnrolment, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_A_student_can_only_belong_to_one_group);
|
||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||
Gbl.Crs.Grps.GrpTyp.MultipleEnrolment, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_A_student_can_belong_to_several_groups);
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Begin ("class=\"LM\" style=\"width:20px;\"");
|
||||
if (Gbl.Crs.Grps.GrpTyp.MustBeOpened)
|
||||
Ico_PutIconOn ("clock.svg",Ico_BLACK,
|
||||
Txt_The_groups_will_automatically_open);
|
||||
else
|
||||
Ico_PutIconOff ("clock.svg",Ico_BLACK,
|
||||
Txt_The_groups_will_not_automatically_open);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Open time *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_TABLE_BeginPadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("open_time",
|
||||
Dat_STR_TIME,
|
||||
Gbl.Crs.Grps.GrpTyp.OpenTimeUTC,
|
||||
CurrentYear,
|
||||
CurrentYear + 1,
|
||||
Dat_FORM_SECONDS_ON,
|
||||
Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second
|
||||
HTM_DONT_SUBMIT_ON_CHANGE);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM\" style=\"width:20px;\"");
|
||||
if (Gbl.Crs.Grps.GrpTyp.MustBeOpened)
|
||||
Ico_PutIconOn ("clock.svg",Ico_BLACK,
|
||||
Txt_The_groups_will_automatically_open);
|
||||
else
|
||||
Ico_PutIconOff ("clock.svg",Ico_BLACK,
|
||||
Txt_The_groups_will_not_automatically_open);
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
HTM_TABLE_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("open_time",
|
||||
Dat_STR_TIME,
|
||||
Gbl.Crs.Grps.GrpTyp.OpenTimeUTC,
|
||||
CurrentYear,
|
||||
CurrentYear + 1,
|
||||
Dat_FORM_SECONDS_ON,
|
||||
Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second
|
||||
HTM_DONT_SUBMIT_ON_CHANGE);
|
||||
HTM_TD_End ();
|
||||
/***** Number of groups of this type *****/
|
||||
HTM_TD_Begin ("class=\"CM DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_Unsigned (0); // It's a new group type ==> 0 groups
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
HTM_TABLE_End ();
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Number of groups of this type *****/
|
||||
HTM_TD_Begin ("class=\"CM DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_Unsigned (0); // It's a new group type ==> 0 groups
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
|
||||
/***** End section *****/
|
||||
HTM_SECTION_End ();
|
||||
|
@ -2506,13 +2491,11 @@ static void Grp_PutFormToCreateGroupType (void)
|
|||
|
||||
static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Group;
|
||||
extern const char *Txt_Group_closed;
|
||||
extern const char *Txt_File_zones_disabled;
|
||||
extern const char *Txt_No_assigned_room;
|
||||
extern const char *Txt_Another_room;
|
||||
extern const char *Txt_Create;
|
||||
unsigned NumGrpTyp;
|
||||
const struct GroupType *GrpTypInLst;
|
||||
unsigned NumRoo;
|
||||
|
@ -2523,135 +2506,121 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
|||
/***** Begin section *****/
|
||||
HTM_SECTION_Begin (Grp_NEW_GROUP_SECTION_ID);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewGrp]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewGrp,Grp_GROUPS_SECTION_ID,NULL,NULL);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (ActNewGrp,Grp_GROUPS_SECTION_ID);
|
||||
/***** Write heading *****/
|
||||
Grp_WriteHeadingGroups ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write heading *****/
|
||||
Grp_WriteHeadingGroups ();
|
||||
/***** Empty column to remove *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Disabled icon to open group *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Ico_PutIconOff ("lock.svg",Ico_RED,Txt_Group_closed);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Empty column to remove *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Disabled icon for archive zone *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Ico_PutIconOff ("folder.svg",Ico_RED,Txt_File_zones_disabled);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Disabled icon to open group *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Ico_PutIconOff ("lock.svg",Ico_RED,Txt_Group_closed);
|
||||
HTM_TD_End ();
|
||||
/***** Group type *****/
|
||||
/* Begin selector */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"GrpTypCod\""
|
||||
" class=\"INPUT_%s\" style=\"width:100px;\"",
|
||||
The_GetSuffix ());
|
||||
|
||||
/***** Disabled icon for archive zone *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Ico_PutIconOff ("folder.svg",Ico_RED,Txt_File_zones_disabled);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Group type *****/
|
||||
/* Begin selector */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"GrpTypCod\""
|
||||
" class=\"INPUT_%s\" style=\"width:100px;\"",
|
||||
The_GetSuffix ());
|
||||
|
||||
/* Options for group types */
|
||||
for (NumGrpTyp = 0;
|
||||
NumGrpTyp < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
||||
NumGrpTyp++)
|
||||
{
|
||||
GrpTypInLst = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp];
|
||||
HTM_OPTION (HTM_Type_LONG,&GrpTypInLst->GrpTypCod,
|
||||
GrpTypInLst->GrpTypCod == Gbl.Crs.Grps.GrpTyp.GrpTypCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",GrpTypInLst->GrpTypName);
|
||||
}
|
||||
|
||||
/* End selector */
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Group name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Gbl.Crs.Grps.GrpName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Room *****/
|
||||
/* Begin selector */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"RooCod\""
|
||||
" class=\"INPUT_%s\" style=\"width:100px;\"",
|
||||
The_GetSuffix ());
|
||||
|
||||
/* Option for no assigned room */
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Gbl.Crs.Grps.RooCod < 0, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_No_assigned_room);
|
||||
|
||||
/* Option for another room */
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Gbl.Crs.Grps.RooCod == 0, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_room);
|
||||
|
||||
/* Options for rooms */
|
||||
for (NumRoo = 0;
|
||||
NumRoo < Rooms->Num;
|
||||
NumRoo++)
|
||||
{
|
||||
RooInLst = &Rooms->Lst[NumRoo];
|
||||
HTM_OPTION (HTM_Type_LONG,&RooInLst->RooCod,
|
||||
RooInLst->RooCod == Gbl.Crs.Grps.RooCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",RooInLst->ShrtName);
|
||||
}
|
||||
|
||||
/* End selector */
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Current number of users in this group *****/
|
||||
for (Role = Rol_TCH;
|
||||
Role >= Rol_STD;
|
||||
Role--)
|
||||
/* Options for group types */
|
||||
for (NumGrpTyp = 0;
|
||||
NumGrpTyp < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
||||
NumGrpTyp++)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"CM DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
GrpTypInLst = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp];
|
||||
HTM_OPTION (HTM_Type_LONG,&GrpTypInLst->GrpTypCod,
|
||||
GrpTypInLst->GrpTypCod == Gbl.Crs.Grps.GrpTyp.GrpTypCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",GrpTypInLst->GrpTypName);
|
||||
}
|
||||
|
||||
/***** Maximum number of students *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Grp_WriteMaxStds (StrMaxStudents,Gbl.Crs.Grps.MaxStudents);
|
||||
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"3\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/* End selector */
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
/***** Group name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Gbl.Crs.Grps.GrpName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
/***** Room *****/
|
||||
/* Begin selector */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"RooCod\""
|
||||
" class=\"INPUT_%s\" style=\"width:100px;\"",
|
||||
The_GetSuffix ());
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
/* Option for no assigned room */
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Gbl.Crs.Grps.RooCod < 0, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_No_assigned_room);
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/* Option for another room */
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
Gbl.Crs.Grps.RooCod == 0, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_Another_room);
|
||||
|
||||
/* Options for rooms */
|
||||
for (NumRoo = 0;
|
||||
NumRoo < Rooms->Num;
|
||||
NumRoo++)
|
||||
{
|
||||
RooInLst = &Rooms->Lst[NumRoo];
|
||||
HTM_OPTION (HTM_Type_LONG,&RooInLst->RooCod,
|
||||
RooInLst->RooCod == Gbl.Crs.Grps.RooCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",RooInLst->ShrtName);
|
||||
}
|
||||
|
||||
/* End selector */
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Current number of users in this group *****/
|
||||
for (Role = Rol_TCH;
|
||||
Role >= Rol_STD;
|
||||
Role--)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"CM DAT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
/***** Maximum number of students *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Grp_WriteMaxStds (StrMaxStudents,Gbl.Crs.Grps.MaxStudents);
|
||||
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"3\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
|
||||
/***** End section *****/
|
||||
HTM_SECTION_End ();
|
||||
|
|
|
@ -1032,29 +1032,6 @@ const char *Hlp_COURSE_Program =
|
|||
"COURSE.Program.en";
|
||||
#endif
|
||||
|
||||
const char *Hlp_COURSE_Program_edit_item =
|
||||
#if L==1
|
||||
"COURSE.Program.es#editar-item";
|
||||
#elif L==2
|
||||
"COURSE.Program.en#edit-item";
|
||||
#elif L==3
|
||||
"COURSE.Program.en#edit-item";
|
||||
#elif L==4
|
||||
"COURSE.Program.es#editar-item";
|
||||
#elif L==5
|
||||
"COURSE.Program.en#edit-item";
|
||||
#elif L==6
|
||||
"COURSE.Program.es#editar-item";
|
||||
#elif L==7
|
||||
"COURSE.Program.en#edit-item";
|
||||
#elif L==8
|
||||
"COURSE.Program.en#edit-item";
|
||||
#elif L==9
|
||||
"COURSE.Program.en#edit-item";
|
||||
#elif L==10 // tr
|
||||
"COURSE.Program.en#edit-item";
|
||||
#endif
|
||||
|
||||
const char *Hlp_COURSE_Program_resource_clipboard =
|
||||
#if L==1
|
||||
"COURSE.Program.en#resource-clipboard";
|
||||
|
|
176
swad_holiday.c
176
swad_holiday.c
|
@ -884,122 +884,106 @@ void Hld_ContEditAfterChgHld (void)
|
|||
|
||||
static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_All_places;
|
||||
extern const char *Txt_HOLIDAY_TYPES[Hld_NUM_TYPES_HOLIDAY];
|
||||
extern const char *Txt_Create;
|
||||
unsigned NumPlc;
|
||||
const struct Plc_Place *PlcInLst;
|
||||
Hld_HolidayType_t HolidayType;
|
||||
unsigned HolidayTypeUnsigned;
|
||||
unsigned CurrentYear = Dat_GetCurrentYear ();
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewHld]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewHld,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewHld);
|
||||
/***** Write heading *****/
|
||||
Hld_PutHeadHolidays ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write heading *****/
|
||||
Hld_PutHeadHolidays ();
|
||||
/***** Column to remove holiday, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Holiday code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove holiday, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Holiday place *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Hld_EditingHld->PlcCod <= 0, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_All_places);
|
||||
for (NumPlc = 0;
|
||||
NumPlc < Places->Num;
|
||||
NumPlc++)
|
||||
{
|
||||
PlcInLst = &Places->Lst[NumPlc];
|
||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
||||
PlcInLst->PlcCod == Hld_EditingHld->PlcCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",PlcInLst->ShrtName);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Holiday code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** Holiday type *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"HldTyp\" class=\"INPUT_%s\""
|
||||
" style=\"width:62px;\"", // TODO: Use a CSS class
|
||||
The_GetSuffix ());
|
||||
for (HolidayType = (Hld_HolidayType_t) 0;
|
||||
HolidayType <= (Hld_HolidayType_t) (Hld_NUM_TYPES_HOLIDAY - 1);
|
||||
HolidayType++)
|
||||
{
|
||||
HolidayTypeUnsigned = (unsigned) HolidayType;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&HolidayTypeUnsigned,
|
||||
HolidayType == Hld_EditingHld->HldTyp, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_HOLIDAY_TYPES[HolidayType]);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Holiday place *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||
Hld_EditingHld->PlcCod <= 0, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_All_places);
|
||||
for (NumPlc = 0;
|
||||
NumPlc < Places->Num;
|
||||
NumPlc++)
|
||||
{
|
||||
PlcInLst = &Places->Lst[NumPlc];
|
||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
||||
PlcInLst->PlcCod == Hld_EditingHld->PlcCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",PlcInLst->ShrtName);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
/***** Holiday date / Non school period start date *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Dat_WriteFormDate (CurrentYear - 1,
|
||||
CurrentYear + 1,
|
||||
"Start",
|
||||
&Hld_EditingHld->StartDate,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Holiday type *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"HldTyp\" class=\"INPUT_%s\""
|
||||
" style=\"width:62px;\"", // TODO: Use a CSS class
|
||||
The_GetSuffix ());
|
||||
for (HolidayType = (Hld_HolidayType_t) 0;
|
||||
HolidayType <= (Hld_HolidayType_t) (Hld_NUM_TYPES_HOLIDAY - 1);
|
||||
HolidayType++)
|
||||
{
|
||||
HolidayTypeUnsigned = (unsigned) HolidayType;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&HolidayTypeUnsigned,
|
||||
HolidayType == Hld_EditingHld->HldTyp, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_HOLIDAY_TYPES[HolidayType]);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
/***** Non school period end date *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Dat_WriteFormDate (CurrentYear - 1,
|
||||
CurrentYear + 1,
|
||||
"End",
|
||||
&Hld_EditingHld->EndDate,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Holiday date / Non school period start date *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Dat_WriteFormDate (CurrentYear - 1,
|
||||
CurrentYear + 1,
|
||||
"Start",
|
||||
&Hld_EditingHld->StartDate,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
/***** Holiday name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Non school period end date *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Dat_WriteFormDate (CurrentYear - 1,
|
||||
CurrentYear + 1,
|
||||
"End",
|
||||
&Hld_EditingHld->EndDate,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Empty (1);
|
||||
|
||||
/***** Holiday name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
HTM_TD_Empty (1);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1365,8 +1365,6 @@ static void Ins_ShowAlertAndButtonToGoToIns (void)
|
|||
|
||||
static void Ins_PutFormToCreateInstitution (void)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
Act_Action_t NextAction = ActUnk;
|
||||
|
||||
/***** Set action depending on role *****/
|
||||
|
@ -1377,96 +1375,82 @@ static void Ins_PutFormToCreateInstitution (void)
|
|||
else
|
||||
Err_NoPermissionExit ();
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[NextAction]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (NextAction,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (NextAction);
|
||||
/***** Write heading *****/
|
||||
Ins_PutHeadInstitutionsForEdition ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write heading *****/
|
||||
Ins_PutHeadInstitutionsForEdition ();
|
||||
/***** Column to remove institution, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Institution code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove institution, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Institution logo *****/
|
||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ins_EditingIns->FullName);
|
||||
Lgo_DrawLogo (HieLvl_INS,-1L,"",20,NULL,true);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Institution code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** Institution short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ins_EditingIns->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Institution logo *****/
|
||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ins_EditingIns->FullName);
|
||||
Lgo_DrawLogo (HieLvl_INS,-1L,"",20,NULL,true);
|
||||
HTM_TD_End ();
|
||||
/***** Institution full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ins_EditingIns->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Institution short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ins_EditingIns->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Institution WWW *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_URL ("WWW",Ins_EditingIns->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Institution full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ins_EditingIns->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Number of users who claim to belong to this institution ****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Institution WWW *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_URL ("WWW",Ins_EditingIns->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Number of centers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of users who claim to belong to this institution ****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
/***** Number of users in courses of this institution ****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of centers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
/***** Institution requester *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||
The_GetSuffix ());
|
||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of users in courses of this institution ****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
/***** Institution status *****/
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Institution requester *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||
The_GetSuffix ());
|
||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Institution status *****/
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
91
swad_link.c
91
swad_link.c
|
@ -667,69 +667,52 @@ void Lnk_ContEditAfterChgLnk (void)
|
|||
|
||||
static void Lnk_PutFormToCreateLink (void)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewLnk,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewLnk]);
|
||||
/***** Write heading *****/
|
||||
Lnk_PutHeadLinks ();
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewLnk);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
/***** Column to remove link, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write heading *****/
|
||||
Lnk_PutHeadLinks ();
|
||||
/***** Link code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Link short name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk_EditingLnk->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove link, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Link full name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk_EditingLnk->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Link code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** Link WWW *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_URL ("WWW",Lnk_EditingLnk->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Link short name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk_EditingLnk->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Link full name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk_EditingLnk->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Link WWW *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_URL ("WWW",Lnk_EditingLnk->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
87
swad_mail.c
87
swad_mail.c
|
@ -679,67 +679,50 @@ void Mai_ContEditAfterChgMai (void)
|
|||
|
||||
static void Mai_PutFormToCreateMailDomain (void)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewMai,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewMai]);
|
||||
/***** Write heading *****/
|
||||
Mai_PutHeadMailDomains ();
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewMai);
|
||||
/***** Second row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
/* Column to remove mail domain, disabled here */
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write heading *****/
|
||||
Mai_PutHeadMailDomains ();
|
||||
/* Mail domain code */
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Second row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
/* Mail domain */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai_EditingMai->Domain,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Column to remove mail domain, disabled here */
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/* Mail domain info */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai_EditingMai->Info,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"40\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Mail domain code */
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/* Number of users */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Mail domain */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai_EditingMai->Domain,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/* Mail domain info */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai_EditingMai->Info,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"40\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of users */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
85
swad_place.c
85
swad_place.c
|
@ -676,66 +676,49 @@ void Plc_ContEditAfterChgPlc (void)
|
|||
|
||||
static void Plc_PutFormToCreatePlace (void)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewPlc,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewPlc]);
|
||||
/***** Write heading *****/
|
||||
Plc_PutHeadPlaces ();
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewPlc);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
/***** Column to remove place, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write heading *****/
|
||||
Plc_PutHeadPlaces ();
|
||||
/***** Place code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Place short name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc_EditingPlc->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove place, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Place full name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc_EditingPlc->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Place code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** Number of centers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Place short name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc_EditingPlc->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Place full name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc_EditingPlc->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of centers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
153
swad_plugin.c
153
swad_plugin.c
|
@ -788,104 +788,87 @@ void Plg_ContEditAfterChgPlg (void)
|
|||
|
||||
static void Plg_PutFormToCreatePlugin (void)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewPlg,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewPlg]);
|
||||
/***** Write heading *****/
|
||||
Plg_PutHeadPlugins ();
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewPlg);
|
||||
/***** Row begin *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
/***** Column to remove plugin, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write heading *****/
|
||||
Plg_PutHeadPlugins ();
|
||||
/***** Plugin code */
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Row begin *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Plugin logo *****/
|
||||
// TODO: Change plugin icons to 32x32
|
||||
HTM_TD_Begin ("style=\"width:45px;\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove plugin, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Plugin name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg_EditingPlg->Name,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Plugin code */
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** Plugin description *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,
|
||||
Plg_EditingPlg->Description,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"16\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Plugin logo *****/
|
||||
// TODO: Change plugin icons to 32x32
|
||||
HTM_TD_Begin ("style=\"width:45px;\"");
|
||||
HTM_TD_End ();
|
||||
/***** Plugin logo *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg_EditingPlg->Logo,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"4\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Plugin name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg_EditingPlg->Name,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Plugin application key *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg_EditingPlg->AppKey,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Plugin description *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,
|
||||
Plg_EditingPlg->Description,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"16\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Plugin URL *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_URL ("URL",Plg_EditingPlg->URL,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Plugin logo *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg_EditingPlg->Logo,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"4\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Plugin IP address *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg_EditingPlg->IP,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Plugin application key *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg_EditingPlg->AppKey,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Row end *****/
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Plugin URL *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_URL ("URL",Plg_EditingPlg->URL,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Plugin IP address *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg_EditingPlg->IP,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Row end *****/
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -179,6 +179,7 @@ static unsigned Prg_GetLastChild (int NumItem);
|
|||
|
||||
static void Prg_ShowFormToCreateItem (long ParentItmCod);
|
||||
static void Prg_ShowFormToChangeItem (long ItmCod);
|
||||
static void Prg_ParsFormItem (void *ItmCod);
|
||||
static void Prg_ShowFormItem (const struct Prg_Item *Item,
|
||||
const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME],
|
||||
const char *Txt);
|
||||
|
@ -1932,8 +1933,6 @@ void Prg_ReqCreateItem (void)
|
|||
|
||||
static void Prg_ShowFormToCreateItem (long ParentItmCod)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
struct Prg_Item ParentItem; // Parent item
|
||||
struct Prg_Item Item;
|
||||
static const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME] =
|
||||
|
@ -1955,40 +1954,19 @@ static void Prg_ShowFormToCreateItem (long ParentItmCod)
|
|||
/***** Show pending alerts */
|
||||
Ale_ShowAlerts (NULL);
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewPrgItm]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewPrgItm,NULL,
|
||||
Prg_ParsFormItem,&ParentItem.Hierarchy.ItmCod);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (ActNewPrgItm,Prg_HIGHLIGHTED_SECTION_ID);
|
||||
ParCod_PutPar (ParCod_Itm,ParentItem.Hierarchy.ItmCod);
|
||||
/***** Show form *****/
|
||||
Prg_ShowFormItem (&Item,SetHMS,NULL);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
|
||||
/***** Show form *****/
|
||||
Prg_ShowFormItem (&Item,SetHMS,NULL);
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Put a form to change program item *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prg_ShowFormToChangeItem (long ItmCod)
|
||||
{
|
||||
extern const char *Hlp_COURSE_Program_edit_item;
|
||||
extern const char *Txt_Edit_item;
|
||||
extern const char *Txt_Save_changes;
|
||||
struct Prg_Item Item;
|
||||
char Txt[Cns_MAX_BYTES_TEXT + 1];
|
||||
static const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME] =
|
||||
|
@ -2002,25 +1980,20 @@ static void Prg_ShowFormToChangeItem (long ItmCod)
|
|||
Prg_GetItemDataByCod (&Item);
|
||||
Prg_DB_GetItemTxt (Item.Hierarchy.ItmCod,Txt);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (ActChgPrgItm,Prg_HIGHLIGHTED_SECTION_ID);
|
||||
ParCod_PutPar (ParCod_Itm,Item.Hierarchy.ItmCod);
|
||||
/***** Begin form to change *****/
|
||||
Frm_BeginFormTable (ActChgPrgItm,Prg_HIGHLIGHTED_SECTION_ID,
|
||||
Prg_ParsFormItem,&Item.Hierarchy.ItmCod);
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin ("100%",
|
||||
Item.Title[0] ? Item.Title :
|
||||
Txt_Edit_item,
|
||||
NULL,NULL,
|
||||
Hlp_COURSE_Program_edit_item,Box_NOT_CLOSABLE,2);
|
||||
/***** Show form *****/
|
||||
Prg_ShowFormItem (&Item,SetHMS,Txt);
|
||||
|
||||
/***** Show form *****/
|
||||
Prg_ShowFormItem (&Item,SetHMS,Txt);
|
||||
/***** End form to change *****/
|
||||
Frm_EndFormTable (Btn_CONFIRM_BUTTON);
|
||||
}
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
Box_BoxTableWithButtonEnd (Btn_CONFIRM_BUTTON,Txt_Save_changes);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
static void Prg_ParsFormItem (void *ItmCod)
|
||||
{
|
||||
ParCod_PutPar (ParCod_Itm,*(long *) ItmCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
110
swad_record.c
110
swad_record.c
|
@ -352,82 +352,66 @@ static void Rec_ListFieldsRecordsForEdition (void)
|
|||
void Rec_ShowFormCreateRecordField (void)
|
||||
{
|
||||
extern const char *Hlp_USERS_Students_course_record_card;
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY];
|
||||
extern const char *Txt_Create;
|
||||
Rec_VisibilityRecordFields_t Vis;
|
||||
unsigned VisUnsigned;
|
||||
char StrNumLines[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewFie]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewFie,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewFie);
|
||||
/***** Write heading *****/
|
||||
Rec_WriteHeadingRecordFields ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write heading *****/
|
||||
Rec_WriteHeadingRecordFields ();
|
||||
/***** Write disabled icon to remove the field *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Field name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.Field.Name,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"REC_FIELDNAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write disabled icon to remove the field *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
HTM_TD_End ();
|
||||
/***** Number of lines in form ******/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
snprintf (StrNumLines,sizeof (StrNumLines),"%u",
|
||||
Gbl.Crs.Records.Field.NumLines);
|
||||
HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"2\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Field name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.Field.Name,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"REC_FIELDNAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Visibility to students *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"Visibility\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
for (Vis = (Rec_VisibilityRecordFields_t) 0;
|
||||
Vis <= (Rec_VisibilityRecordFields_t) (Rec_NUM_TYPES_VISIBILITY - 1);
|
||||
Vis++)
|
||||
{
|
||||
VisUnsigned = (unsigned) Vis;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned,
|
||||
Vis == Gbl.Crs.Records.Field.Visibility, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of lines in form ******/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
snprintf (StrNumLines,sizeof (StrNumLines),"%u",
|
||||
Gbl.Crs.Records.Field.NumLines);
|
||||
HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"2\" class=\"INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Visibility to students *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||
"name=\"Visibility\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
for (Vis = (Rec_VisibilityRecordFields_t) 0;
|
||||
Vis <= (Rec_VisibilityRecordFields_t) (Rec_NUM_TYPES_VISIBILITY - 1);
|
||||
Vis++)
|
||||
{
|
||||
VisUnsigned = (unsigned) Vis;
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned,
|
||||
Vis == Gbl.Crs.Records.Field.Visibility, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
|
||||
}
|
||||
HTM_SELECT_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
142
swad_room.c
142
swad_room.c
|
@ -1210,101 +1210,85 @@ void Roo_ContEditAfterChgRoom (void)
|
|||
|
||||
static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
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
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewRoo]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewRoo,NULL,NULL,NULL);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewRoo);
|
||||
/***** Write heading *****/
|
||||
Roo_PutHeadRooms ();
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write heading *****/
|
||||
Roo_PutHeadRooms ();
|
||||
/***** Column to remove room, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Room code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Column to remove room, disabled here *****/
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
HTM_TD_End ();
|
||||
/***** Building *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Roo_PutSelectorBuilding (Roo_EditingRoom->BldCod,Buildings,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Room code *****/
|
||||
HTM_TD_Begin ("class=\"CODE\"");
|
||||
HTM_TD_End ();
|
||||
/***** Floor *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_LONG ("Floor",(long) INT_MIN,(long) INT_MAX,(long) Roo_EditingRoom->Floor,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
"class=\"INPUT_LONG INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Building *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Roo_PutSelectorBuilding (Roo_EditingRoom->BldCod,Buildings,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE);
|
||||
HTM_TD_End ();
|
||||
/***** Room type *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Roo_PutSelectorType (Roo_EditingRoom->Type,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Floor *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_LONG ("Floor",(long) INT_MIN,(long) INT_MAX,(long) Roo_EditingRoom->Floor,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
"class=\"INPUT_LONG INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Room short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Roo_EditingRoom->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Room type *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Roo_PutSelectorType (Roo_EditingRoom->Type,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE);
|
||||
HTM_TD_End ();
|
||||
/***** Room full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Roo_EditingRoom->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Room short name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Roo_EditingRoom->ShrtName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Seating capacity *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Roo_WriteCapacity (StrCapacity,Roo_EditingRoom->Capacity);
|
||||
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"3\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Room full name *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Roo_EditingRoom->FullName,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** MAC address *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
MAC_MACnumToMACstr (Roo_EditingRoom->MACnum,MACstr);
|
||||
HTM_INPUT_TEXT ("MAC",MAC_LENGTH_MAC_ADDRESS,MACstr,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Seating capacity *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Roo_WriteCapacity (StrCapacity,Roo_EditingRoom->Capacity);
|
||||
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"3\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** MAC address *****/
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
MAC_MACnumToMACstr (Roo_EditingRoom->MACnum,MACstr);
|
||||
HTM_INPUT_TEXT ("MAC",MAC_LENGTH_MAC_ADDRESS,MACstr,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\" class=\"INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -171,87 +171,70 @@ void RubCri_GetCriterionDataByCod (struct RubCri_Criterion *Criterion)
|
|||
static void RubCri_PutFormNewCriterion (struct Rub_Rubrics *Rubrics,
|
||||
unsigned MaxCriInd)
|
||||
{
|
||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||
extern const char *Txt_Create;
|
||||
RubCri_ValueRange_t ValueRange;
|
||||
|
||||
/***** Begin fieldset *****/
|
||||
HTM_FIELDSET_Begin (NULL);
|
||||
HTM_LEGEND (Txt_Actions[ActNewRubCri]);
|
||||
/***** Begin form to create *****/
|
||||
Frm_BeginFormTable (ActNewRubCri,NULL,Rub_PutPars,Rubrics);
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewRubCri);
|
||||
Rub_PutPars (Rubrics);
|
||||
/***** Table heading *****/
|
||||
RubCri_PutTableHeadingForCriteria (RubCri_DONT_PUT_COLUMN_FOR_ICONS,
|
||||
RubCri_DONT_PUT_COLUMNS_FOR_SCORE);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
/***** Begin row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Table heading *****/
|
||||
RubCri_PutTableHeadingForCriteria (RubCri_DONT_PUT_COLUMN_FOR_ICONS,
|
||||
RubCri_DONT_PUT_COLUMNS_FOR_SCORE);
|
||||
/***** Index *****/
|
||||
HTM_TD_Begin ("class=\"RT\"");
|
||||
Lay_WriteIndex (MaxCriInd + 1,"BIG_INDEX");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Begin row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Title *****/
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_INPUT_TEXT ("Title",RubCri_MAX_CHARS_TITLE,Rubrics->Criterion.Title,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\""
|
||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Index *****/
|
||||
HTM_TD_Begin ("class=\"RT\"");
|
||||
Lay_WriteIndex (MaxCriInd + 1,"BIG_INDEX");
|
||||
HTM_TD_End ();
|
||||
/***** Link *****/
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Rsc_ShowClipboardToChangeLink (NULL);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Title *****/
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_INPUT_TEXT ("Title",RubCri_MAX_CHARS_TITLE,Rubrics->Criterion.Title,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\""
|
||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
/***** Minimum and maximum values of the criterion *****/
|
||||
for (ValueRange = (RubCri_ValueRange_t) 0;
|
||||
ValueRange <= (RubCri_ValueRange_t) (RubCri_NUM_VALUES - 1);
|
||||
ValueRange++)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"RT\"");
|
||||
HTM_INPUT_FLOAT (RubCri_ParValues[ValueRange],
|
||||
0.0,DBL_MAX,RubCri_SCORE_STEP,
|
||||
Rubrics->Criterion.Values[ValueRange],
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
/***** Link *****/
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Rsc_ShowClipboardToChangeLink (NULL);
|
||||
HTM_TD_End ();
|
||||
/***** Weight *****/
|
||||
HTM_TD_Begin ("class=\"RT\"");
|
||||
HTM_INPUT_FLOAT ("Weight",
|
||||
RubCri_WEIGHT_MIN,
|
||||
RubCri_WEIGHT_MAX,
|
||||
RubCri_WEIGHT_STEP,
|
||||
Rubrics->Criterion.Weight,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Minimum and maximum values of the criterion *****/
|
||||
for (ValueRange = (RubCri_ValueRange_t) 0;
|
||||
ValueRange <= (RubCri_ValueRange_t) (RubCri_NUM_VALUES - 1);
|
||||
ValueRange++)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"RT\"");
|
||||
HTM_INPUT_FLOAT (RubCri_ParValues[ValueRange],
|
||||
0.0,DBL_MAX,RubCri_SCORE_STEP,
|
||||
Rubrics->Criterion.Values[ValueRange],
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
}
|
||||
/***** End row *****/
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Weight *****/
|
||||
HTM_TD_Begin ("class=\"RT\"");
|
||||
HTM_INPUT_FLOAT ("Weight",
|
||||
RubCri_WEIGHT_MIN,
|
||||
RubCri_WEIGHT_MAX,
|
||||
RubCri_WEIGHT_STEP,
|
||||
Rubrics->Criterion.Weight,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** End row *****/
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and send button *****/
|
||||
HTM_TABLE_End ();
|
||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End fieldset *****/
|
||||
HTM_FIELDSET_End ();
|
||||
/***** End form to create *****/
|
||||
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
92
swad_text.c
92
swad_text.c
|
@ -10975,52 +10975,6 @@ const char *Txt_Duplicate_USERS =
|
|||
"Duplicates"; // Çeviri lazim!
|
||||
#endif
|
||||
|
||||
const char *Txt_Edit_assignment =
|
||||
#if L==1 // ca
|
||||
"Editar activitat";
|
||||
#elif L==2 // de
|
||||
"Aufgabe bearbeiten";
|
||||
#elif L==3 // en
|
||||
"Edit assignment";
|
||||
#elif L==4 // es
|
||||
"Editar actividad";
|
||||
#elif L==5 // fr
|
||||
"Éditer activité";
|
||||
#elif L==6 // gn
|
||||
"Editar actividad"; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Editare attività";
|
||||
#elif L==8 // pl
|
||||
"Edytuj zadanie";
|
||||
#elif L==9 // pt
|
||||
"Editar atividade";
|
||||
#elif L==10 // tr
|
||||
"Edit assignment"; // Çeviri lazim!
|
||||
#endif
|
||||
|
||||
const char *Txt_Edit_item =
|
||||
#if L==1 // ca
|
||||
"Editar ítem";
|
||||
#elif L==2 // de
|
||||
"Artikel bearbeiten";
|
||||
#elif L==3 // en
|
||||
"Edit item";
|
||||
#elif L==4 // es
|
||||
"Editar ítem";
|
||||
#elif L==5 // fr
|
||||
"Éditer article";
|
||||
#elif L==6 // gn
|
||||
"Editar ítem"; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Editare articolo";
|
||||
#elif L==8 // pl
|
||||
"Edycja przedmiot";
|
||||
#elif L==9 // pt
|
||||
"Editar item";
|
||||
#elif L==10 // tr
|
||||
"Edit item"; // Çeviri lazim!
|
||||
#endif
|
||||
|
||||
const char *Txt_Edit_plain_text =
|
||||
#if L==1 // ca
|
||||
"Editar text sense format";
|
||||
|
@ -11067,29 +11021,6 @@ const char *Txt_Edit_record_fields =
|
|||
"Edit record fields"; // Çeviri lazim!
|
||||
#endif
|
||||
|
||||
const char *Txt_Edit_set_of_questions =
|
||||
#if L==1 // ca
|
||||
"Editar conjunt de preguntes";
|
||||
#elif L==2 // de
|
||||
"Satz von Fragen bearbeiten";
|
||||
#elif L==3 // en
|
||||
"Edit set of questions";
|
||||
#elif L==4 // es
|
||||
"Editar conjunto de preguntas";
|
||||
#elif L==5 // fr
|
||||
"Éditer ensemble de questions";
|
||||
#elif L==6 // gn
|
||||
"Editar conjunto de preguntas"; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Editare set di domande";
|
||||
#elif L==8 // pl
|
||||
"Edycja zestaw pytań";
|
||||
#elif L==9 // pt
|
||||
"Editar conjunto de perguntas";
|
||||
#elif L==10 // tr
|
||||
"Edit set of questions"; // Çeviri lazim!
|
||||
#endif
|
||||
|
||||
const char *Txt_Edit_rich_text =
|
||||
#if L==1 // ca
|
||||
"Editar text enriquit";
|
||||
|
@ -33459,6 +33390,29 @@ const char *Txt_Removal_not_allowed =
|
|||
"Removal not allowed"; // Çeviri lazim!
|
||||
#endif
|
||||
|
||||
const char *Txt_Remove =
|
||||
#if L==1 // ca
|
||||
"Eliminar";
|
||||
#elif L==2 // de
|
||||
"Entfernen";
|
||||
#elif L==3 // en
|
||||
"Remove";
|
||||
#elif L==4 // es
|
||||
"Eliminar";
|
||||
#elif L==5 // fr
|
||||
"Supprimer";
|
||||
#elif L==6 // gn
|
||||
"Pe'a";
|
||||
#elif L==7 // it
|
||||
"Rimuovere";
|
||||
#elif L==8 // pl
|
||||
"Usuń";
|
||||
#elif L==9 // pt
|
||||
"Remover";
|
||||
#elif L==10 // tr
|
||||
"Elemek";
|
||||
#endif
|
||||
|
||||
const char *Txt_Remove_all_students =
|
||||
#if L==1 // ca
|
||||
"Eliminar tots estudiants";
|
||||
|
|
|
@ -5837,48 +5837,48 @@ const char *Txt_Actions[ActLst_NUM_ACTIONS] =
|
|||
,
|
||||
[ActChgPrgItm] =
|
||||
#if L==1 // ca
|
||||
"Change program item" // Necessita traducció
|
||||
"Canviar ítem del programa"
|
||||
#elif L==2 // de
|
||||
"Change program item" // Need Übersetzung
|
||||
"Programmpunkt ändern"
|
||||
#elif L==3 // en
|
||||
"Change program item"
|
||||
#elif L==4 // es
|
||||
"Cambiar ítem del programa"
|
||||
#elif L==5 // fr
|
||||
"Change program item" // Besoin de traduction
|
||||
"Changer élément de programme"
|
||||
#elif L==6 // gn
|
||||
"Cambiar ítem del programa" // Okoteve traducción
|
||||
"Emoambue elemento programa"
|
||||
#elif L==7 // it
|
||||
"Change program item" // Bisogno di traduzione
|
||||
"Cambiare articolo del programma"
|
||||
#elif L==8 // pl
|
||||
"Change program item" // Potrzebujesz tlumaczenie
|
||||
"Zmień pozycję programu"
|
||||
#elif L==9 // pt
|
||||
"Change program item" // Precisa de tradução
|
||||
"Alterar item do programa"
|
||||
#elif L==10 // tr
|
||||
"Change program item" // Çeviri lazim!
|
||||
"Program öğesini değiştir"
|
||||
#endif
|
||||
,
|
||||
[ActNewPrgItm] =
|
||||
#if L==1 // ca
|
||||
"Crear ítem"
|
||||
"Crear ítem del programa"
|
||||
#elif L==2 // de
|
||||
"Artikel eingeben"
|
||||
"Programmpunkt erstellen"
|
||||
#elif L==3 // en
|
||||
"Create item"
|
||||
"Create program item"
|
||||
#elif L==4 // es
|
||||
"Crear ítem"
|
||||
"Crear ítem del programa"
|
||||
#elif L==5 // fr
|
||||
"Créer article"
|
||||
"Créer élément de programme"
|
||||
#elif L==6 // gn
|
||||
"Crear ítem" // Okoteve traducción
|
||||
"Ojapo elemento programa"
|
||||
#elif L==7 // it
|
||||
"Creare articolo"
|
||||
"Creare articolo del programma"
|
||||
#elif L==8 // pl
|
||||
"Utwórz przedmiot"
|
||||
"Utwórz pozycję programu"
|
||||
#elif L==9 // pt
|
||||
"Criar item"
|
||||
"Criar item do programa"
|
||||
#elif L==10 // tr
|
||||
"Create item" // Çeviri lazim!
|
||||
"Program öğesi oluştur"
|
||||
#endif
|
||||
,
|
||||
[ActReqRemPrgItm] =
|
||||
|
|
Loading…
Reference in New Issue