mirror of https://github.com/acanas/swad-core.git
Version19.51.8
This commit is contained in:
parent
295f3e5348
commit
2a7413a31c
|
@ -713,11 +713,10 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
|
||||||
Frm_StartFormAnchor (NextAction,ID_ID_SECTION_ID);
|
Frm_StartFormAnchor (NextAction,ID_ID_SECTION_ID);
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"NewID\" name=\"NewID\""
|
HTM_INPUT_TEXT ("NewID",ID_MAX_BYTES_USR_ID,
|
||||||
" size=\"18\" maxlength=\"%u\" value=\"%s\" />",
|
|
||||||
ID_MAX_BYTES_USR_ID,
|
|
||||||
UsrDat->IDs.Num ? UsrDat->IDs.List[UsrDat->IDs.Num - 1].ID :
|
UsrDat->IDs.Num ? UsrDat->IDs.List[UsrDat->IDs.Num - 1].ID :
|
||||||
""); // Show the most recent ID
|
"", // Show the most recent ID
|
||||||
|
" size=\"18\"");
|
||||||
fprintf (Gbl.F.Out,"<br />");
|
fprintf (Gbl.F.Out,"<br />");
|
||||||
Btn_PutCreateButtonInline (Txt_Add_this_ID);
|
Btn_PutCreateButtonInline (Txt_Add_this_ID);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
|
@ -487,15 +487,15 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.51.7 (2019-11-03)"
|
#define Log_PLATFORM_VERSION "SWAD 19.51.8 (2019-11-04)"
|
||||||
#define CSS_FILE "swad19.47.css"
|
#define CSS_FILE "swad19.47.css"
|
||||||
#define JS_FILE "swad19.39.js"
|
#define JS_FILE "swad19.39.js"
|
||||||
/*
|
/*
|
||||||
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
||||||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||||
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
|
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
|
||||||
// TODO: Seguir cambiando input text
|
|
||||||
*
|
*
|
||||||
|
Version 19.51.8: Nov 04, 2019 Code refactoring in HTML inputs. (245968 lines)
|
||||||
Version 19.51.7: Nov 03, 2019 Code refactoring in HTML inputs. (246051 lines)
|
Version 19.51.7: Nov 03, 2019 Code refactoring in HTML inputs. (246051 lines)
|
||||||
Version 19.51.6: Nov 03, 2019 Code refactoring in HTML inputs. (246125 lines)
|
Version 19.51.6: Nov 03, 2019 Code refactoring in HTML inputs. (246125 lines)
|
||||||
Version 19.51.5: Nov 03, 2019 Code refactoring in HTML inputs. (246132 lines)
|
Version 19.51.5: Nov 03, 2019 Code refactoring in HTML inputs. (246132 lines)
|
||||||
|
|
|
@ -651,10 +651,10 @@ static void Hld_ListHolidaysForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActRenHld);
|
Frm_StartForm (ActRenHld);
|
||||||
Hld_PutParamHldCod (Hld->HldCod);
|
Hld_PutParamHldCod (Hld->HldCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Name\""
|
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name,
|
||||||
" size=\"20\" maxlength=\"%u\" value=\"%s\""
|
" size=\"20\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name,Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -1038,10 +1038,8 @@ static void Hld_PutFormToCreateHoliday (void)
|
||||||
|
|
||||||
/***** Holiday name *****/
|
/***** Holiday name *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Name\""
|
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name,
|
||||||
" size=\"20\" maxlength=\"%u\" value=\"%s\""
|
" size=\"20\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Empty (1);
|
HTM_TD_Empty (1);
|
||||||
|
|
|
@ -409,13 +409,9 @@ static void Ins_Configuration (bool PrintView)
|
||||||
{
|
{
|
||||||
/* Form to change institution full name */
|
/* Form to change institution full name */
|
||||||
Frm_StartForm (ActRenInsFulCfg);
|
Frm_StartForm (ActRenInsFulCfg);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Gbl.Hierarchy.Ins.FullName,
|
||||||
" id=\"FullName\" name=\"FullName\""
|
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"INPUT_FULL_NAME\""
|
" class=\"INPUT_FULL_NAME\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Hie_MAX_CHARS_FULL_NAME,
|
|
||||||
Gbl.Hierarchy.Ins.FullName,
|
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -441,13 +437,9 @@ static void Ins_Configuration (bool PrintView)
|
||||||
{
|
{
|
||||||
/* Form to change institution short name */
|
/* Form to change institution short name */
|
||||||
Frm_StartForm (ActRenInsShoCfg);
|
Frm_StartForm (ActRenInsShoCfg);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Gbl.Hierarchy.Ins.ShrtName,
|
||||||
" id=\"ShortName\" name=\"ShortName\""
|
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"INPUT_SHORT_NAME\""
|
" class=\"INPUT_SHORT_NAME\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Hie_MAX_CHARS_SHRT_NAME,
|
|
||||||
Gbl.Hierarchy.Ins.ShrtName,
|
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -1503,11 +1495,9 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
{
|
{
|
||||||
Frm_StartForm (ActRenInsSho);
|
Frm_StartForm (ActRenInsSho);
|
||||||
Ins_PutParamOtherInsCod (Ins->InsCod);
|
Ins_PutParamOtherInsCod (Ins->InsCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Ins->ShrtName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"INPUT_SHORT_NAME\""
|
" class=\"INPUT_SHORT_NAME\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Hie_MAX_CHARS_SHRT_NAME,Ins->ShrtName,
|
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -1521,12 +1511,9 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
{
|
{
|
||||||
Frm_StartForm (ActRenInsFul);
|
Frm_StartForm (ActRenInsFul);
|
||||||
Ins_PutParamOtherInsCod (Ins->InsCod);
|
Ins_PutParamOtherInsCod (Ins->InsCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Ins->FullName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"INPUT_FULL_NAME\""
|
" class=\"INPUT_FULL_NAME\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Hie_MAX_CHARS_FULL_NAME,
|
|
||||||
Ins->FullName,
|
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -2237,20 +2224,14 @@ static void Ins_PutFormToCreateInstitution (void)
|
||||||
|
|
||||||
/***** Institution short name *****/
|
/***** Institution short name *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Ins_EditingIns->ShrtName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" class=\"INPUT_SHORT_NAME\" required=\"required\"");
|
||||||
" class=\"INPUT_SHORT_NAME\""
|
|
||||||
" required=\"required\" />",
|
|
||||||
Hie_MAX_CHARS_SHRT_NAME,Ins_EditingIns->ShrtName);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Institution full name *****/
|
/***** Institution full name *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Ins_EditingIns->FullName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" class=\"INPUT_FULL_NAME\" required=\"required\"");
|
||||||
" class=\"INPUT_FULL_NAME\""
|
|
||||||
" required=\"required\" />",
|
|
||||||
Hie_MAX_CHARS_FULL_NAME,Ins_EditingIns->FullName);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Institution WWW *****/
|
/***** Institution WWW *****/
|
||||||
|
|
26
swad_link.c
26
swad_link.c
|
@ -440,11 +440,9 @@ static void Lnk_ListLinksForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActRenLnkSho);
|
Frm_StartForm (ActRenLnkSho);
|
||||||
Lnk_PutParamLnkCod (Lnk->LnkCod);
|
Lnk_PutParamLnkCod (Lnk->LnkCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"INPUT_SHORT_NAME\""
|
" class=\"INPUT_SHORT_NAME\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName,
|
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -453,11 +451,9 @@ static void Lnk_ListLinksForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActRenLnkFul);
|
Frm_StartForm (ActRenLnkFul);
|
||||||
Lnk_PutParamLnkCod (Lnk->LnkCod);
|
Lnk_PutParamLnkCod (Lnk->LnkCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"INPUT_FULL_NAME\""
|
" class=\"INPUT_FULL_NAME\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName,
|
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -755,20 +751,14 @@ static void Lnk_PutFormToCreateLink (void)
|
||||||
|
|
||||||
/***** Link short name *****/
|
/***** Link short name *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk_EditingLnk->ShrtName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" class=\"INPUT_SHORT_NAME\" required=\"required\"");
|
||||||
" class=\"INPUT_SHORT_NAME\""
|
|
||||||
" required=\"required\" />",
|
|
||||||
Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk_EditingLnk->ShrtName);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Link full name *****/
|
/***** Link full name *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk_EditingLnk->FullName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" class=\"INPUT_FULL_NAME\" required=\"required\"");
|
||||||
" class=\"INPUT_FULL_NAME\""
|
|
||||||
" required=\"required\" />",
|
|
||||||
Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk_EditingLnk->FullName);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Link WWW *****/
|
/***** Link WWW *****/
|
||||||
|
|
26
swad_mail.c
26
swad_mail.c
|
@ -506,10 +506,9 @@ static void Mai_ListMailDomainsForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActRenMaiSho);
|
Frm_StartForm (ActRenMaiSho);
|
||||||
Mai_PutParamMaiCod (Mai->MaiCod);
|
Mai_PutParamMaiCod (Mai->MaiCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Domain\""
|
HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain,
|
||||||
" size=\"15\" maxlength=\"%u\" value=\"%s\""
|
" size=\"15\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain,
|
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -518,10 +517,9 @@ static void Mai_ListMailDomainsForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActRenMaiFul);
|
Frm_StartForm (ActRenMaiFul);
|
||||||
Mai_PutParamMaiCod (Mai->MaiCod);
|
Mai_PutParamMaiCod (Mai->MaiCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Info\""
|
HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai->Info,
|
||||||
" size=\"40\" maxlength=\"%u\" value=\"%s\""
|
" size=\"40\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Mai_MAX_CHARS_MAIL_INFO,Mai->Info,
|
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -765,18 +763,14 @@ static void Mai_PutFormToCreateMailDomain (void)
|
||||||
|
|
||||||
/***** Mail domain *****/
|
/***** Mail domain *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Domain\""
|
HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai_EditingMai->Domain,
|
||||||
" size=\"15\" maxlength=\"%u\" value=\"%s\""
|
" size=\"15\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Cns_MAX_CHARS_EMAIL_ADDRESS,Mai_EditingMai->Domain);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Mail domain info *****/
|
/***** Mail domain info *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Info\""
|
HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai_EditingMai->Info,
|
||||||
" size=\"40\" maxlength=\"%u\" value=\"%s\""
|
" size=\"40\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Mai_MAX_CHARS_MAIL_INFO,Mai_EditingMai->Info);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Empty (1);
|
HTM_TD_Empty (1);
|
||||||
|
|
23
swad_mark.c
23
swad_mark.c
|
@ -112,6 +112,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
||||||
extern const char *Txt_TABLE_Header;
|
extern const char *Txt_TABLE_Header;
|
||||||
extern const char *Txt_TABLE_Footer;
|
extern const char *Txt_TABLE_Footer;
|
||||||
struct MarksProperties Marks;
|
struct MarksProperties Marks;
|
||||||
|
char StrHeadOrFoot[10 + 1];
|
||||||
|
|
||||||
if (Gbl.FileBrowser.FilFolLnk.Type == Brw_IS_FOLDER)
|
if (Gbl.FileBrowser.FilFolLnk.Type == Brw_IS_FOLDER)
|
||||||
HTM_TD_ColouredEmpty (2);
|
HTM_TD_ColouredEmpty (2);
|
||||||
|
@ -129,11 +130,12 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
||||||
Brw_PutImplicitParamsFileBrowser ();
|
Brw_PutImplicitParamsFileBrowser ();
|
||||||
HTM_LABEL_Begin (NULL);
|
HTM_LABEL_Begin (NULL);
|
||||||
fprintf (Gbl.F.Out," %s: ",Txt_TABLE_Header);
|
fprintf (Gbl.F.Out," %s: ",Txt_TABLE_Header);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"%s\""
|
snprintf (StrHeadOrFoot,sizeof (StrHeadOrFoot),
|
||||||
" size=\"1\" maxlength=\"5\" value=\"%u\""
|
"%u",
|
||||||
" class=\"LST_EDIT_ROWS COLOR%u\""
|
Marks.Header);
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
HTM_INPUT_TEXT (Mrk_HeadOrFootStr[Brw_HEADER],5,StrHeadOrFoot,
|
||||||
Mrk_HeadOrFootStr[Brw_HEADER],Marks.Header,
|
" size=\"1\" class=\"LST_EDIT_ROWS COLOR%u\""
|
||||||
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd,
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
|
@ -149,11 +151,12 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
||||||
Brw_PutImplicitParamsFileBrowser ();
|
Brw_PutImplicitParamsFileBrowser ();
|
||||||
HTM_LABEL_Begin (NULL);
|
HTM_LABEL_Begin (NULL);
|
||||||
fprintf (Gbl.F.Out," %s: ",Txt_TABLE_Footer);
|
fprintf (Gbl.F.Out," %s: ",Txt_TABLE_Footer);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"%s\""
|
snprintf (StrHeadOrFoot,sizeof (StrHeadOrFoot),
|
||||||
" size=\"1\" maxlength=\"5\" value=\"%u\""
|
"%u",
|
||||||
" class=\"LST_EDIT_ROWS COLOR%u\""
|
Marks.Footer);
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
HTM_INPUT_TEXT (Mrk_HeadOrFootStr[Brw_FOOTER],5,StrHeadOrFoot,
|
||||||
Mrk_HeadOrFootStr[Brw_FOOTER],Marks.Footer,
|
" size=\"1\" class=\"LST_EDIT_ROWS COLOR%u\""
|
||||||
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Gbl.RowEvenOdd,
|
Gbl.RowEvenOdd,
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
|
|
|
@ -1205,10 +1205,8 @@ static void Mch_PutFormNewMatch (struct Game *Game)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Title\" name=\"Title\""
|
HTM_INPUT_TEXT ("Title",Gam_MAX_CHARS_TITLE,Game->Title,
|
||||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
" size=\"45\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Gam_MAX_CHARS_TITLE,Game->Title);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
|
@ -25,8 +25,6 @@
|
||||||
/********************************* Headers ***********************************/
|
/********************************* Headers ***********************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define _GNU_SOURCE // For asprintf
|
|
||||||
#include <stdio.h> // For asprintf
|
|
||||||
#include <string.h> // For string functions
|
#include <string.h> // For string functions
|
||||||
|
|
||||||
#include "swad_account.h"
|
#include "swad_account.h"
|
||||||
|
@ -233,7 +231,7 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
|
||||||
unsigned NumNicks;
|
unsigned NumNicks;
|
||||||
unsigned NumNick;
|
unsigned NumNick;
|
||||||
Act_Action_t NextAction;
|
Act_Action_t NextAction;
|
||||||
char *NewNick;
|
char NicknameWithArroba[1 + Nck_MAX_BYTES_NICKNAME_WITHOUT_ARROBA + 1];
|
||||||
|
|
||||||
/***** Start section *****/
|
/***** Start section *****/
|
||||||
HTM_SECTION_Begin (Nck_NICKNAME_SECTION_ID);
|
HTM_SECTION_Begin (Nck_NICKNAME_SECTION_ID);
|
||||||
|
@ -356,10 +354,10 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asprintf (&NewNick,"@%s",row[0]) < 0)
|
snprintf (NicknameWithArroba,sizeof (NicknameWithArroba),
|
||||||
Lay_NotEnoughMemoryExit ();
|
"@%s",
|
||||||
Par_PutHiddenParamString (NULL,"NewNick",NewNick); // Nickname
|
row[0]);
|
||||||
free ((void *) NewNick);
|
Par_PutHiddenParamString (NULL,"NewNick",NicknameWithArroba); // Nickname
|
||||||
Btn_PutConfirmButtonInline (Txt_Use_this_nickname);
|
Btn_PutConfirmButtonInline (Txt_Use_this_nickname);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -400,10 +398,11 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
|
||||||
Frm_StartFormAnchor (NextAction,Nck_NICKNAME_SECTION_ID);
|
Frm_StartFormAnchor (NextAction,Nck_NICKNAME_SECTION_ID);
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"NewNick\" name=\"NewNick\""
|
snprintf (NicknameWithArroba,sizeof (NicknameWithArroba),
|
||||||
" size=\"18\" maxlength=\"%u\" value=\"@%s\" />",
|
"@%s",
|
||||||
1 + Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA,
|
|
||||||
Gbl.Usrs.Me.UsrDat.Nickname);
|
Gbl.Usrs.Me.UsrDat.Nickname);
|
||||||
|
HTM_INPUT_TEXT ("NewNick",1 + Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA,NicknameWithArroba,
|
||||||
|
" size=\"18\"");
|
||||||
fprintf (Gbl.F.Out,"<br />");
|
fprintf (Gbl.F.Out,"<br />");
|
||||||
Btn_PutCreateButtonInline (NumNicks ? Txt_Change_nickname : // I already have a nickname
|
Btn_PutCreateButtonInline (NumNicks ? Txt_Change_nickname : // I already have a nickname
|
||||||
Txt_Save_changes); // I have no nickname yet);
|
Txt_Save_changes); // I have no nickname yet);
|
||||||
|
|
|
@ -284,10 +284,8 @@ void Pwd_ShowFormSendNewPwd (void)
|
||||||
/***** User's ID/nickname *****/
|
/***** User's ID/nickname *****/
|
||||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
fprintf (Gbl.F.Out,"%s: ",Txt_nick_email_or_ID);
|
fprintf (Gbl.F.Out,"%s: ",Txt_nick_email_or_ID);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"UsrId\""
|
HTM_INPUT_TEXT ("UsrId",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrIdLogin,
|
||||||
" size=\"8\" maxlength=\"%u\" value=\"%s\""
|
" size=\"8\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrIdLogin);
|
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
|
|
||||||
/***** Send button and end box *****/
|
/***** Send button and end box *****/
|
||||||
|
|
28
swad_place.c
28
swad_place.c
|
@ -552,11 +552,10 @@ static void Plc_ListPlacesForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActRenPlcSho);
|
Frm_StartForm (ActRenPlcSho);
|
||||||
Plc_PutParamPlcCod (Plc->PlcCod);
|
Plc_PutParamPlcCod (Plc->PlcCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc->ShrtName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"INPUT_SHORT_NAME\""
|
" class=\"INPUT_SHORT_NAME\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc->ShrtName,Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
@ -564,11 +563,10 @@ static void Plc_ListPlacesForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActRenPlcFul);
|
Frm_StartForm (ActRenPlcFul);
|
||||||
Plc_PutParamPlcCod (Plc->PlcCod);
|
Plc_PutParamPlcCod (Plc->PlcCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc->FullName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"INPUT_FULL_NAME\""
|
" class=\"INPUT_FULL_NAME\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Plc_MAX_CHARS_PLACE_FULL_NAME,Plc->FullName,Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
@ -822,20 +820,14 @@ static void Plc_PutFormToCreatePlace (void)
|
||||||
|
|
||||||
/***** Place short name *****/
|
/***** Place short name *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc_EditingPlc->ShrtName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" class=\"INPUT_SHORT_NAME\" required=\"required\"");
|
||||||
" class=\"INPUT_SHORT_NAME\""
|
|
||||||
" required=\"required\" />",
|
|
||||||
Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc_EditingPlc->ShrtName);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Place full name *****/
|
/***** Place full name *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc_EditingPlc->FullName,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
" class=\"INPUT_FULL_NAME\" required=\"required\"");
|
||||||
" class=\"INPUT_FULL_NAME\""
|
|
||||||
" required=\"required\" />",
|
|
||||||
Plc_MAX_CHARS_PLACE_FULL_NAME,Plc_EditingPlc->FullName);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Number of centres *****/
|
/***** Number of centres *****/
|
||||||
|
|
|
@ -426,10 +426,10 @@ static void Plg_ListPluginsForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActRenPlg);
|
Frm_StartForm (ActRenPlg);
|
||||||
Plg_PutParamPlgCod (Plg->PlgCod);
|
Plg_PutParamPlgCod (Plg->PlgCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Name\""
|
HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg->Name,
|
||||||
" size=\"10\" maxlength=\"%u\" value=\"%s\""
|
" size=\"10\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Plg_MAX_CHARS_PLUGIN_NAME,Plg->Name,Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
@ -437,10 +437,10 @@ static void Plg_ListPluginsForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActChgPlgDes);
|
Frm_StartForm (ActChgPlgDes);
|
||||||
Plg_PutParamPlgCod (Plg->PlgCod);
|
Plg_PutParamPlgCod (Plg->PlgCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Description\""
|
HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg->Description,
|
||||||
" size=\"30\" maxlength=\"%u\" value=\"%s\""
|
" size=\"30\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg->Description,Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
@ -448,10 +448,10 @@ static void Plg_ListPluginsForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActChgPlgLog);
|
Frm_StartForm (ActChgPlgLog);
|
||||||
Plg_PutParamPlgCod (Plg->PlgCod);
|
Plg_PutParamPlgCod (Plg->PlgCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Logo\""
|
HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg->Logo,
|
||||||
" size=\"4\" maxlength=\"%u\" value=\"%s\""
|
" size=\"4\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Plg_MAX_CHARS_PLUGIN_LOGO,Plg->Logo,Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
@ -459,10 +459,10 @@ static void Plg_ListPluginsForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActChgPlgAppKey);
|
Frm_StartForm (ActChgPlgAppKey);
|
||||||
Plg_PutParamPlgCod (Plg->PlgCod);
|
Plg_PutParamPlgCod (Plg->PlgCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"AppKey\""
|
HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg->AppKey,
|
||||||
" size=\"16\" maxlength=\"%u\" value=\"%s\""
|
" size=\"16\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg->AppKey,Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
@ -481,10 +481,9 @@ static void Plg_ListPluginsForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActChgPlgIP);
|
Frm_StartForm (ActChgPlgIP);
|
||||||
Plg_PutParamPlgCod (Plg->PlgCod);
|
Plg_PutParamPlgCod (Plg->PlgCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"IP\""
|
HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg->IP,
|
||||||
" size=\"10\" maxlength=\"%u\" value=\"%s\""
|
" size=\"10\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Cns_MAX_CHARS_IP,Plg->IP,
|
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -905,34 +904,26 @@ static void Plg_PutFormToCreatePlugin (void)
|
||||||
|
|
||||||
/***** Plugin name *****/
|
/***** Plugin name *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Name\""
|
HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg_EditingPlg->Name,
|
||||||
" size=\"10\" maxlength=\"%u\" value=\"%s\""
|
" size=\"10\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Plg_MAX_CHARS_PLUGIN_NAME,Plg_EditingPlg->Name);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Plugin description *****/
|
/***** Plugin description *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Description\""
|
HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg_EditingPlg->Description,
|
||||||
" size=\"30\" maxlength=\"%u\" value=\"%s\""
|
" size=\"30\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg_EditingPlg->Description);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Plugin logo *****/
|
/***** Plugin logo *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Logo\""
|
HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg_EditingPlg->Logo,
|
||||||
" size=\"4\" maxlength=\"%u\" value=\"%s\""
|
" size=\"4\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Plg_MAX_CHARS_PLUGIN_LOGO,Plg_EditingPlg->Logo);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Plugin application key *****/
|
/***** Plugin application key *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"AppKey\""
|
HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg_EditingPlg->AppKey,
|
||||||
" size=\"16\" maxlength=\"%u\" value=\"%s\""
|
" size=\"16\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg_EditingPlg->AppKey);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Plugin URL *****/
|
/***** Plugin URL *****/
|
||||||
|
@ -945,10 +936,8 @@ static void Plg_PutFormToCreatePlugin (void)
|
||||||
|
|
||||||
/***** Plugin IP address *****/
|
/***** Plugin IP address *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"IP\""
|
HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg_EditingPlg->IP,
|
||||||
" size=\"10\" maxlength=\"%u\" value=\"%s\""
|
" size=\"10\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Cns_MAX_CHARS_IP,Plg_EditingPlg->IP);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
|
@ -184,6 +184,7 @@ void Prf_RequestUserProfile (void)
|
||||||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||||
extern const char *Txt_Nickname;
|
extern const char *Txt_Nickname;
|
||||||
extern const char *Txt_Continue;
|
extern const char *Txt_Continue;
|
||||||
|
char NicknameWithArroba[1 + Nck_MAX_BYTES_NICKNAME_WITHOUT_ARROBA + 1];
|
||||||
|
|
||||||
if (Gbl.Usrs.Me.Logged)
|
if (Gbl.Usrs.Me.Logged)
|
||||||
{
|
{
|
||||||
|
@ -206,10 +207,12 @@ void Prf_RequestUserProfile (void)
|
||||||
If no user logged ==> the nickname is empty */
|
If no user logged ==> the nickname is empty */
|
||||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
fprintf (Gbl.F.Out,"%s: ",Txt_Nickname);
|
fprintf (Gbl.F.Out,"%s: ",Txt_Nickname);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"usr\""
|
|
||||||
" size=\"18\" maxlength=\"%u\" value=\"@%s\" />",
|
snprintf (NicknameWithArroba,sizeof (NicknameWithArroba),
|
||||||
Nck_MAX_BYTES_NICKNAME_FROM_FORM,
|
"@%s",
|
||||||
Gbl.Usrs.Me.UsrDat.Nickname);
|
Gbl.Usrs.Me.UsrDat.Nickname);
|
||||||
|
HTM_INPUT_TEXT ("usr",Nck_MAX_BYTES_NICKNAME_FROM_FORM,NicknameWithArroba,
|
||||||
|
" size=\"18\"");
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
|
|
||||||
/***** Send button and end box *****/
|
/***** Send button and end box *****/
|
||||||
|
|
|
@ -3305,10 +3305,8 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Title\" name=\"Title\""
|
HTM_INPUT_TEXT ("Title",Prj_MAX_CHARS_PROJECT_TITLE,Prj->Title,
|
||||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
" size=\"45\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Prj_MAX_CHARS_PROJECT_TITLE,Prj->Title);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
102
swad_record.c
102
swad_record.c
|
@ -286,6 +286,7 @@ void Rec_ListFieldsRecordsForEdition (void)
|
||||||
extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY];
|
extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY];
|
||||||
unsigned NumField;
|
unsigned NumField;
|
||||||
Rec_VisibilityRecordFields_t Vis;
|
Rec_VisibilityRecordFields_t Vis;
|
||||||
|
char StrNumLines[10 + 1];
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Write heading *****/
|
||||||
Rec_WriteHeadingRecordFields ();
|
Rec_WriteHeadingRecordFields ();
|
||||||
|
@ -309,11 +310,9 @@ void Rec_ListFieldsRecordsForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Frm_StartForm (ActRenFie);
|
Frm_StartForm (ActRenFie);
|
||||||
Par_PutHiddenParamLong (NULL,"FieldCod",Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
|
Par_PutHiddenParamLong (NULL,"FieldCod",Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FieldName\""
|
HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.LstFields.Lst[NumField].Name,
|
||||||
" class=\"REC_FIELDNAME\" maxlength=\"%u\" value=\"%s\""
|
" class=\"REC_FIELDNAME\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Rec_MAX_CHARS_NAME_FIELD,
|
|
||||||
Gbl.Crs.Records.LstFields.Lst[NumField].Name,
|
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -322,10 +321,12 @@ void Rec_ListFieldsRecordsForEdition (void)
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActChgRowFie);
|
Frm_StartForm (ActChgRowFie);
|
||||||
Par_PutHiddenParamLong (NULL,"FieldCod",Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
|
Par_PutHiddenParamLong (NULL,"FieldCod",Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"NumLines\""
|
snprintf (StrNumLines,sizeof (StrNumLines),
|
||||||
" size=\"2\" maxlength=\"2\" value=\"%u\""
|
"%u",
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
Gbl.Crs.Records.LstFields.Lst[NumField].NumLines);
|
||||||
Gbl.Crs.Records.LstFields.Lst[NumField].NumLines,
|
HTM_INPUT_TEXT ("NumLines",2,StrNumLines,
|
||||||
|
" size=\"2\""
|
||||||
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -365,6 +366,7 @@ void Rec_ShowFormCreateRecordField (void)
|
||||||
extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY];
|
extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY];
|
||||||
extern const char *Txt_Create_record_field;
|
extern const char *Txt_Create_record_field;
|
||||||
Rec_VisibilityRecordFields_t Vis;
|
Rec_VisibilityRecordFields_t Vis;
|
||||||
|
char StrNumLines[10 + 1];
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Begin form *****/
|
||||||
Frm_StartForm (ActNewFie);
|
Frm_StartForm (ActNewFie);
|
||||||
|
@ -384,18 +386,17 @@ void Rec_ShowFormCreateRecordField (void)
|
||||||
|
|
||||||
/***** Field name *****/
|
/***** Field name *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FieldName\""
|
HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.Field.Name,
|
||||||
" class=\"REC_FIELDNAME\" maxlength=\"%u\" value=\"%s\""
|
" class=\"REC_FIELDNAME\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.Field.Name);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Number of lines in form ******/
|
/***** Number of lines in form ******/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"NumLines\""
|
snprintf (StrNumLines,sizeof (StrNumLines),
|
||||||
" size=\"2\" maxlength=\"2\" value=\"%u\""
|
"%u",
|
||||||
" required=\"required\" />",
|
|
||||||
Gbl.Crs.Records.Field.NumLines);
|
Gbl.Crs.Records.Field.NumLines);
|
||||||
|
HTM_INPUT_TEXT ("NumLines",2,StrNumLines,
|
||||||
|
" size=\"2\" required=\"required\"");
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Visibility to students *****/
|
/***** Visibility to students *****/
|
||||||
|
@ -3172,17 +3173,10 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat,
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"REC_C2_BOT REC_DAT_BOLD LM\"");
|
HTM_TD_Begin ("class=\"REC_C2_BOT REC_DAT_BOLD LM\"");
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
{
|
HTM_INPUT_TEXT ("Surname1",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME,UsrDat->Surname1,
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
" class=\"REC_C2_BOT_INPUT\"%s",
|
||||||
" id=\"Surname1\" name=\"Surname1\""
|
TypeOfView == Rec_SHA_MY_RECORD_FORM ? " required=\"required\"" :
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
"");
|
||||||
" class=\"REC_C2_BOT_INPUT\"",
|
|
||||||
Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME,
|
|
||||||
UsrDat->Surname1);
|
|
||||||
if (TypeOfView == Rec_SHA_MY_RECORD_FORM)
|
|
||||||
fprintf (Gbl.F.Out," required=\"required\"");
|
|
||||||
fprintf (Gbl.F.Out," />");
|
|
||||||
}
|
|
||||||
else if (UsrDat->Surname1[0])
|
else if (UsrDat->Surname1[0])
|
||||||
fprintf (Gbl.F.Out,"<strong>%s</strong>",UsrDat->Surname1);
|
fprintf (Gbl.F.Out,"<strong>%s</strong>",UsrDat->Surname1);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -3210,12 +3204,8 @@ static void Rec_ShowSurname2 (struct UsrData *UsrDat,
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"REC_C2_BOT REC_DAT_BOLD LM\"");
|
HTM_TD_Begin ("class=\"REC_C2_BOT REC_DAT_BOLD LM\"");
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
HTM_INPUT_TEXT ("Surname2",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME,UsrDat->Surname2,
|
||||||
" id=\"Surname2\" name=\"Surname2\""
|
" class=\"REC_C2_BOT_INPUT\"");
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"REC_C2_BOT_INPUT\" />",
|
|
||||||
Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME,
|
|
||||||
UsrDat->Surname2);
|
|
||||||
else if (UsrDat->Surname2[0])
|
else if (UsrDat->Surname2[0])
|
||||||
fprintf (Gbl.F.Out,"<strong>%s</strong>",UsrDat->Surname2);
|
fprintf (Gbl.F.Out,"<strong>%s</strong>",UsrDat->Surname2);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -3247,17 +3237,10 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,
|
||||||
|
|
||||||
HTM_TD_Begin ("colspan=\"2\" class=\"REC_C2_BOT REC_DAT_BOLD LM\"");
|
HTM_TD_Begin ("colspan=\"2\" class=\"REC_C2_BOT REC_DAT_BOLD LM\"");
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
{
|
HTM_INPUT_TEXT ("FirstName",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME,UsrDat->FirstName,
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
" class=\"REC_C2_BOT_INPUT\"%s",
|
||||||
" id=\"FirstName\" name=\"FirstName\""
|
TypeOfView == Rec_SHA_MY_RECORD_FORM ? " required=\"required\"" :
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
"");
|
||||||
" class=\"REC_C2_BOT_INPUT\"",
|
|
||||||
Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME,
|
|
||||||
UsrDat->FirstName);
|
|
||||||
if (TypeOfView == Rec_SHA_MY_RECORD_FORM)
|
|
||||||
fprintf (Gbl.F.Out," required=\"required\"");
|
|
||||||
fprintf (Gbl.F.Out," />");
|
|
||||||
}
|
|
||||||
else if (UsrDat->FirstName[0])
|
else if (UsrDat->FirstName[0])
|
||||||
fprintf (Gbl.F.Out,"<strong>%s</strong>",UsrDat->FirstName);
|
fprintf (Gbl.F.Out,"<strong>%s</strong>",UsrDat->FirstName);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -3345,12 +3328,8 @@ static void Rec_ShowOriginPlace (struct UsrData *UsrDat,
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
HTM_INPUT_TEXT ("OriginPlace",Usr_MAX_CHARS_ADDRESS,UsrDat->OriginPlace,
|
||||||
" id=\"OriginPlace\" name=\"OriginPlace\""
|
" class=\"REC_C2_BOT_INPUT\"");
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"REC_C2_BOT_INPUT\" />",
|
|
||||||
Usr_MAX_CHARS_ADDRESS,
|
|
||||||
UsrDat->OriginPlace);
|
|
||||||
else if (UsrDat->OriginPlace[0])
|
else if (UsrDat->OriginPlace[0])
|
||||||
fprintf (Gbl.F.Out,"%s",UsrDat->OriginPlace);
|
fprintf (Gbl.F.Out,"%s",UsrDat->OriginPlace);
|
||||||
}
|
}
|
||||||
|
@ -3414,12 +3393,8 @@ static void Rec_ShowLocalAddress (struct UsrData *UsrDat,
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
HTM_INPUT_TEXT ("LocalAddress",Usr_MAX_CHARS_ADDRESS,UsrDat->LocalAddress,
|
||||||
" id=\"LocalAddress\" name=\"LocalAddress\""
|
" class=\"REC_C2_BOT_INPUT\"");
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"REC_C2_BOT_INPUT\" />",
|
|
||||||
Usr_MAX_CHARS_ADDRESS,
|
|
||||||
UsrDat->LocalAddress);
|
|
||||||
else if (UsrDat->LocalAddress[0])
|
else if (UsrDat->LocalAddress[0])
|
||||||
fprintf (Gbl.F.Out,"%s",UsrDat->LocalAddress);
|
fprintf (Gbl.F.Out,"%s",UsrDat->LocalAddress);
|
||||||
}
|
}
|
||||||
|
@ -3490,12 +3465,8 @@ static void Rec_ShowFamilyAddress (struct UsrData *UsrDat,
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
HTM_INPUT_TEXT ("FamilyAddress",Usr_MAX_CHARS_ADDRESS,UsrDat->FamilyAddress,
|
||||||
" id=\"FamilyAddress\" name=\"FamilyAddress\""
|
" class=\"REC_C2_BOT_INPUT\"");
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"REC_C2_BOT_INPUT\" />",
|
|
||||||
Usr_MAX_CHARS_ADDRESS,
|
|
||||||
UsrDat->FamilyAddress);
|
|
||||||
else if (UsrDat->FamilyAddress[0])
|
else if (UsrDat->FamilyAddress[0])
|
||||||
fprintf (Gbl.F.Out,"%s",UsrDat->FamilyAddress);
|
fprintf (Gbl.F.Out,"%s",UsrDat->FamilyAddress);
|
||||||
}
|
}
|
||||||
|
@ -4209,12 +4180,9 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
|
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
|
||||||
Frm_StartFormAnchor (ActChgMyOff,Rec_MY_INS_CTR_DPT_ID);
|
Frm_StartFormAnchor (ActChgMyOff,Rec_MY_INS_CTR_DPT_ID);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Office\" name=\"Office\""
|
HTM_INPUT_TEXT ("Office",Usr_MAX_CHARS_ADDRESS,Gbl.Usrs.Me.UsrDat.Tch.Office,
|
||||||
" maxlength=\"%u\" value=\"%s\""
|
|
||||||
" class=\"REC_C2_BOT_INPUT\""
|
" class=\"REC_C2_BOT_INPUT\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Usr_MAX_CHARS_ADDRESS,
|
|
||||||
Gbl.Usrs.Me.UsrDat.Tch.Office,
|
|
||||||
Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
|
@ -1916,10 +1916,8 @@ void Svy_RequestCreatOrEditSvy (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Title\" name=\"Title\""
|
HTM_INPUT_TEXT ("Title",Svy_MAX_CHARS_SURVEY_TITLE,Svy.Title,
|
||||||
" size=\"45\" maxlength=\"%u\" value=\"%s\""
|
" size=\"45\" required=\"required\"");
|
||||||
" required=\"required\" />",
|
|
||||||
Svy_MAX_CHARS_SURVEY_TITLE,Svy.Title);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
|
@ -917,10 +917,8 @@ static void Syl_PutFormItemSyllabus (bool NewItem,unsigned NumItem,int Level,int
|
||||||
ActModIteSylPra));
|
ActModIteSylPra));
|
||||||
Gbl.Syllabus.ParamNumItem = NumItem;
|
Gbl.Syllabus.ParamNumItem = NumItem;
|
||||||
Syl_PutParamNumItem ();
|
Syl_PutParamNumItem ();
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Txt\""
|
HTM_INPUT_TEXT ("Txt",Syl_MAX_CHARS_TEXT_ITEM,Text,
|
||||||
" size=\"60\" maxlength=\"%u\" value=\"%s\""
|
" size=\"60\" placeholder=\"%s\"",
|
||||||
" placeholder=\"%s\"",
|
|
||||||
Syl_MAX_CHARS_TEXT_ITEM,Text,
|
|
||||||
Txt_Enter_a_new_item_here);
|
Txt_Enter_a_new_item_here);
|
||||||
if (NewItem)
|
if (NewItem)
|
||||||
fprintf (Gbl.F.Out," autofocus=\"autofocus\"");
|
fprintf (Gbl.F.Out," autofocus=\"autofocus\"");
|
||||||
|
|
95
swad_test.c
95
swad_test.c
|
@ -1808,10 +1808,10 @@ static void Tst_ShowFormEditTags (void)
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Frm_StartForm (ActRenTag);
|
Frm_StartForm (ActRenTag);
|
||||||
Par_PutHiddenParamString (NULL,"OldTagTxt",row[1]);
|
Par_PutHiddenParamString (NULL,"OldTagTxt",row[1]);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"NewTagTxt\""
|
HTM_INPUT_TEXT ("NewTagTxt",Tst_MAX_CHARS_TAG,row[1],
|
||||||
" size=\"36\" maxlength=\"%u\" value=\"%s\""
|
"size=\"36\""
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
Tst_MAX_CHARS_TAG,row[1],Gbl.Form.Id);
|
Gbl.Form.Id);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
@ -1887,6 +1887,7 @@ static void Tst_ShowFormConfigTst (void)
|
||||||
extern const char *Txt_Save_changes;
|
extern const char *Txt_Save_changes;
|
||||||
Tst_Pluggable_t Pluggable;
|
Tst_Pluggable_t Pluggable;
|
||||||
Tst_Feedback_t Feedback;
|
Tst_Feedback_t Feedback;
|
||||||
|
char StrMinTimeNxtTstPerQst[20 + 1];
|
||||||
|
|
||||||
/***** Read test configuration from database *****/
|
/***** Read test configuration from database *****/
|
||||||
Tst_GetConfigTstFromDB ();
|
Tst_GetConfigTstFromDB ();
|
||||||
|
@ -1956,11 +1957,11 @@ static void Tst_ShowFormConfigTst (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LB\"");
|
HTM_TD_Begin ("class=\"LB\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
snprintf (StrMinTimeNxtTstPerQst,sizeof (StrMinTimeNxtTstPerQst),
|
||||||
" id=\"MinTimeNxtTstPerQst\" name=\"MinTimeNxtTstPerQst\""
|
"%lu",
|
||||||
" size=\"7\" maxlength=\"7\" value=\"%lu\""
|
|
||||||
" required=\"required\" />",
|
|
||||||
Gbl.Test.Config.MinTimeNxtTstPerQst);
|
Gbl.Test.Config.MinTimeNxtTstPerQst);
|
||||||
|
HTM_INPUT_TEXT ("MinTimeNxtTstPerQst",7,StrMinTimeNxtTstPerQst,
|
||||||
|
"size=\"7\" required=\"required\"");
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -2009,6 +2010,8 @@ static void Tst_ShowFormConfigTst (void)
|
||||||
static void Tst_PutInputFieldNumQst (const char *Field,const char *Label,
|
static void Tst_PutInputFieldNumQst (const char *Field,const char *Label,
|
||||||
unsigned Value)
|
unsigned Value)
|
||||||
{
|
{
|
||||||
|
char StrValue[10 + 1];
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"RM\"");
|
HTM_TD_Begin ("class=\"RM\"");
|
||||||
|
@ -2018,12 +2021,11 @@ static void Tst_PutInputFieldNumQst (const char *Field,const char *Label,
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\""
|
snprintf (StrValue,sizeof (StrValue),
|
||||||
" id=\"%s\" name=\"%s\""
|
"%u",
|
||||||
" size=\"3\" maxlength=\"3\" value=\"%u\""
|
|
||||||
" required=\"required\" />",
|
|
||||||
Field,Field,
|
|
||||||
Value);
|
Value);
|
||||||
|
HTM_INPUT_TEXT (Field,3,StrValue,
|
||||||
|
"size=\"3\" required=\"required\"");
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -4212,10 +4214,14 @@ void Tst_WriteChoiceAnsViewMatch (long MchCod,unsigned QstInd,long QstCod,
|
||||||
|
|
||||||
static void Tst_WriteTextAnsViewTest (unsigned NumQst)
|
static void Tst_WriteTextAnsViewTest (unsigned NumQst)
|
||||||
{
|
{
|
||||||
|
char StrAns[3 + 6 + 1];
|
||||||
|
|
||||||
/***** Write input field for the answer *****/
|
/***** Write input field for the answer *****/
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Ans%06u\""
|
snprintf (StrAns,sizeof (StrAns),
|
||||||
" size=\"40\" maxlength=\"%u\" value=\"\" />",
|
"Ans%06u",
|
||||||
NumQst,Tst_MAX_BYTES_ANSWERS_ONE_QST);
|
NumQst);
|
||||||
|
HTM_INPUT_TEXT (StrAns,Tst_MAX_BYTES_ANSWERS_ONE_QST,"",
|
||||||
|
"size=\"40\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -4412,10 +4418,14 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat,
|
||||||
|
|
||||||
static void Tst_WriteIntAnsViewTest (unsigned NumQst)
|
static void Tst_WriteIntAnsViewTest (unsigned NumQst)
|
||||||
{
|
{
|
||||||
|
char StrAns[3 + 6 + 1];
|
||||||
|
|
||||||
/***** Write input field for the answer *****/
|
/***** Write input field for the answer *****/
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Ans%06u\""
|
snprintf (StrAns,sizeof (StrAns),
|
||||||
" size=\"11\" maxlength=\"11\" value=\"\" />",
|
"Ans%06u",
|
||||||
NumQst);
|
NumQst);
|
||||||
|
HTM_INPUT_TEXT (StrAns,11,"",
|
||||||
|
"size=\"11\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -4527,10 +4537,14 @@ static void Tst_WriteIntAnsAssessTest (struct UsrData *UsrDat,
|
||||||
|
|
||||||
static void Tst_WriteFloatAnsViewTest (unsigned NumQst)
|
static void Tst_WriteFloatAnsViewTest (unsigned NumQst)
|
||||||
{
|
{
|
||||||
|
char StrAns[3 + 6 + 1];
|
||||||
|
|
||||||
/***** Write input field for the answer *****/
|
/***** Write input field for the answer *****/
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Ans%06u\""
|
snprintf (StrAns,sizeof (StrAns),
|
||||||
" size=\"11\" maxlength=\"%u\" value=\"\" />",
|
"Ans%06u",
|
||||||
NumQst,Tst_MAX_BYTES_FLOAT_ANSWER);
|
NumQst);
|
||||||
|
HTM_INPUT_TEXT (StrAns,Tst_MAX_BYTES_FLOAT_ANSWER,"",
|
||||||
|
"size=\"11\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -5024,6 +5038,8 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
|
||||||
bool OptionsDisabled;
|
bool OptionsDisabled;
|
||||||
bool AnswerHasContent;
|
bool AnswerHasContent;
|
||||||
bool DisplayRightColumn;
|
bool DisplayRightColumn;
|
||||||
|
char StrTagTxt[6 + 10 + 1];
|
||||||
|
char StrInteger[20 + 1];
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
if (Gbl.Test.QstCod > 0) // The question already has assigned a code
|
if (Gbl.Test.QstCod > 0) // The question already has assigned a code
|
||||||
|
@ -5109,10 +5125,13 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
|
||||||
|
|
||||||
/***** Input of a new tag *****/
|
/***** Input of a new tag *****/
|
||||||
HTM_TD_Begin ("class=\"RM\"");
|
HTM_TD_Begin ("class=\"RM\"");
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"TagTxt%u\" name=\"TagTxt%u\""
|
snprintf (StrTagTxt,sizeof (StrTagTxt),
|
||||||
" class=\"TAG_TXT\" maxlength=\"%u\" value=\"%s\""
|
"TagTxt%u",
|
||||||
" onchange=\"changeSelTag('%u')\" />",
|
NumTag);
|
||||||
NumTag,NumTag,Tst_MAX_CHARS_TAG,Gbl.Test.Tags.Txt[NumTag],NumTag);
|
HTM_INPUT_TEXT (StrTagTxt,Tst_MAX_CHARS_TAG,StrTagTxt,
|
||||||
|
"class=\"TAG_TXT\""
|
||||||
|
" onchange=\"changeSelTag('%u')\"",
|
||||||
|
NumTag);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -5194,12 +5213,13 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
fprintf (Gbl.F.Out,"%s: ",Txt_Integer_number);
|
fprintf (Gbl.F.Out,"%s: ",Txt_Integer_number);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"AnsInt\""
|
snprintf (StrInteger,sizeof (StrInteger),
|
||||||
" size=\"11\" maxlength=\"11\" value=\"%ld\"",
|
"%ld",
|
||||||
Gbl.Test.Answer.Integer);
|
Gbl.Test.Answer.Integer);
|
||||||
if (Gbl.Test.AnswerType != Tst_ANS_INT)
|
HTM_INPUT_TEXT ("AnsInt",11,StrInteger,
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
"size=\"11\" required=\"required\"%s",
|
||||||
fprintf (Gbl.F.Out," required=\"required\" />");
|
Gbl.Test.AnswerType == Tst_ANS_INT ? "" :
|
||||||
|
" disabled=\"disabled\"");
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
@ -5394,18 +5414,17 @@ static void Tst_PutFloatInputField (const char *Label,const char *Field,
|
||||||
double Value)
|
double Value)
|
||||||
{
|
{
|
||||||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||||
|
char StrFloat[32];
|
||||||
|
|
||||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||||
fprintf (Gbl.F.Out,"%s ",Label);
|
fprintf (Gbl.F.Out,"%s ",Label);
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"%s\""
|
snprintf (StrFloat,sizeof (StrFloat),
|
||||||
" size=\"11\" maxlength=\"%u\""
|
"%lg",
|
||||||
" value=\"%lg\"",
|
|
||||||
Field,
|
|
||||||
Tst_MAX_BYTES_FLOAT_ANSWER,
|
|
||||||
Value);
|
Value);
|
||||||
if (Gbl.Test.AnswerType != Tst_ANS_FLOAT)
|
HTM_INPUT_TEXT (Field,Tst_MAX_BYTES_FLOAT_ANSWER,StrFloat,
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
"size=\"11\" required=\"required\"%s",
|
||||||
fprintf (Gbl.F.Out," required=\"required\" />");
|
Gbl.Test.AnswerType == Tst_ANS_FLOAT ? "" :
|
||||||
|
" disabled=\"disabled\"");
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
11
swad_user.c
11
swad_user.c
|
@ -2610,13 +2610,10 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
|
||||||
HTM_LABEL_Begin ("for=\"UsrId\"");
|
HTM_LABEL_Begin ("for=\"UsrId\"");
|
||||||
Ico_PutIcon ("user.svg",Txt_User[Usr_SEX_UNKNOWN],"CONTEXT_ICO_16x16");
|
Ico_PutIcon ("user.svg",Txt_User[Usr_SEX_UNKNOWN],"CONTEXT_ICO_16x16");
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"UsrId\" name=\"UsrId\""
|
HTM_INPUT_TEXT ("UsrId",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrIdLogin,
|
||||||
" size=\"18\" maxlength=\"%u\" placeholder=\"%s\""
|
" size=\"18\" placeholder=\"%s\""
|
||||||
" value=\"%s\""
|
" autofocus=\"autofocus\" required=\"required\"",
|
||||||
" autofocus=\"autofocus\" required=\"required\" />",
|
Txt_nick_email_or_ID);
|
||||||
Cns_MAX_CHARS_EMAIL_ADDRESS,
|
|
||||||
Txt_nick_email_or_ID,
|
|
||||||
Gbl.Usrs.Me.UsrIdLogin);
|
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** User's password *****/
|
/***** User's password *****/
|
||||||
|
|
Loading…
Reference in New Issue