diff --git a/swad_HTML.c b/swad_HTML.c
index fca99476..7562e2c4 100644
--- a/swad_HTML.c
+++ b/swad_HTML.c
@@ -971,9 +971,9 @@ void HTM_INPUT_TEXT (const char *Name,unsigned MaxLength,const char *Value,bool
int NumBytesPrinted;
char *Attr;
- fprintf (Gbl.F.Out,"");
}
-void HTM_INPUT_NUMBER (const char *Name,long Min,long Max,long Value,bool Disabled)
+void HTM_INPUT_NUMBER (const char *Name,long Min,long Max,long Value,bool Disabled,
+ const char *fmt,...)
{
- fprintf (Gbl.F.Out,"");
}
diff --git a/swad_HTML.h b/swad_HTML.h
index d04757ab..3572dfe4 100644
--- a/swad_HTML.h
+++ b/swad_HTML.h
@@ -125,8 +125,10 @@ void HTM_INPUT_FILE (const char *Name,const char *Accept,bool SubmitOnChange,
void HTM_INPUT_BUTTON (const char *Name,const char *Value,const char *Attr);
void HTM_INPUT_IMAGE (const char *URL,const char *Icon,const char *Title,const char *Class);
void HTM_INPUT_PASSWORD (const char *Name,const char *PlaceHolder,
- const char *AutoComplete,bool Required);
-void HTM_INPUT_NUMBER (const char *Name,long Min,long Max,long Value,bool Disabled);
+ const char *AutoComplete,bool Required,
+ const char *fmt,...);
+void HTM_INPUT_NUMBER (const char *Name,long Min,long Max,long Value,bool Disabled,
+ const char *fmt,...);
void HTM_INPUT_RADIO (const char *Name,bool SubmitOnClick,
const char *fmt,...);
void HTM_INPUT_CHECKBOX (const char *Name,bool SubmitOnChange,
diff --git a/swad_ID.c b/swad_ID.c
index 52ec65f3..acfa1c03 100644
--- a/swad_ID.c
+++ b/swad_ID.c
@@ -717,7 +717,7 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
UsrDat->IDs.Num ? UsrDat->IDs.List[UsrDat->IDs.Num - 1].ID :
"", // Show the most recent ID
false,
- "size=\"18\"");
+ "id=\"NewID\" size=\"18\"");
HTM_BR ();
Btn_PutCreateButtonInline (Txt_Add_this_ID);
Frm_EndForm ();
diff --git a/swad_account.c b/swad_account.c
index 0be988e8..09dc9e34 100644
--- a/swad_account.c
+++ b/swad_account.c
@@ -380,7 +380,7 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_TEXT ("NewNick",1 + Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA,
NewNicknameWithArroba,false,
- "size=\"18\" placeholder=\"%s\" required=\"required\"",
+ "id=\"NewNick\" size=\"18\" placeholder=\"%s\" required=\"required\"",
Txt_HELP_nickname);
HTM_TD_End ();
@@ -397,7 +397,7 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_EMAIL ("NewEmail",Cns_MAX_CHARS_EMAIL_ADDRESS,NewEmail,
- "size=\"18\" placeholder=\"%s\" required=\"required\"",
+ "id=\"NewEmail\" size=\"18\" placeholder=\"%s\" required=\"required\"",
Txt_HELP_email);
HTM_TD_End ();
diff --git a/swad_agenda.c b/swad_agenda.c
index 14d2b5a8..b63c31c7 100644
--- a/swad_agenda.c
+++ b/swad_agenda.c
@@ -1507,7 +1507,7 @@ void Agd_RequestCreatOrEditEvent (void)
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_TEXT ("Event",Agd_MAX_CHARS_EVENT,AgdEvent.Event,false,
- "size=\"45\" required=\"required\"");
+ "id=\"Event\" size=\"45\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
@@ -1523,7 +1523,7 @@ void Agd_RequestCreatOrEditEvent (void)
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_TEXT ("Location",Agd_MAX_CHARS_LOCATION,AgdEvent.Location,false,
- "size=\"45\" required=\"required\"");
+ "id=\"Location\" size=\"45\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_assignment.c b/swad_assignment.c
index 61b2abab..981e2222 100644
--- a/swad_assignment.c
+++ b/swad_assignment.c
@@ -1175,7 +1175,7 @@ void Asg_RequestCreatOrEditAsg (void)
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_TEXT ("Title",Asg_MAX_CHARS_ASSIGNMENT_TITLE,Asg.Title,false,
- "size=\"45\" required=\"required\"");
+ "id=\"Title\" size=\"45\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_attendance.c b/swad_attendance.c
index a63a7799..c94f168b 100644
--- a/swad_attendance.c
+++ b/swad_attendance.c
@@ -1111,7 +1111,7 @@ void Att_RequestCreatOrEditAttEvent (void)
HTM_TD_Begin ("class=\"LT\"");
HTM_INPUT_TEXT ("Title",Att_MAX_CHARS_ATTENDANCE_EVENT_TITLE,Att.Title,false,
- "size=\"45\"");
+ "id=\"Title\" size=\"45\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_centre.c b/swad_centre.c
index 82f8b266..c10cd04c 100644
--- a/swad_centre.c
+++ b/swad_centre.c
@@ -467,7 +467,7 @@ static void Ctr_Configuration (bool PrintView)
/* Form to change centre full name */
Frm_StartForm (ActRenCtrFulCfg);
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Gbl.Hierarchy.Ctr.FullName,true,
- "class=\"INPUT_FULL_NAME\"");
+ "id=\"FullName\" class=\"INPUT_FULL_NAME\"");
Frm_EndForm ();
}
else // I can not edit centre full name
@@ -493,7 +493,7 @@ static void Ctr_Configuration (bool PrintView)
/* Form to change centre short name */
Frm_StartForm (ActRenCtrShoCfg);
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Gbl.Hierarchy.Ctr.ShrtName,true,
- "class=\"INPUT_SHORT_NAME\"");
+ "id=\"ShortName\" class=\"INPUT_SHORT_NAME\"");
Frm_EndForm ();
}
else // I can not edit centre short name
diff --git a/swad_changelog.h b/swad_changelog.h
index 9022a2b1..5f1f8d1e 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
-#define Log_PLATFORM_VERSION "SWAD 19.65.3 (2019-11-12)"
+#define Log_PLATFORM_VERSION "SWAD 19.65.4 (2019-11-12)"
#define CSS_FILE "swad19.47.css"
#define JS_FILE "swad19.65.js"
/*
@@ -496,6 +496,7 @@ ps2pdf source.ps destination.pdf
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
// TODO: Code refactoring in HTML h1, title, meta, video, p, iframe, input hidden, area
+ Version 19.65.4: Nov 12, 2019 Fixed bug in HTML input texts. (246505 lines)
Version 19.65.3: Nov 12, 2019 Fixed bug in listing of students' works. (246455 lines)
Version 19.65.2: Nov 12, 2019 Fixed bug in JavaScript. (246454 lines)
Version 19.65.1: Nov 12, 2019 Fixed bug in degree configuration. (246452 lines)
diff --git a/swad_course.c b/swad_course.c
index a89ed217..4dadeece 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -293,7 +293,7 @@ static void Crs_Configuration (bool PrintView)
/* Form to change course full name */
Frm_StartForm (ActRenCrsFulCfg);
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Gbl.Hierarchy.Crs.FullName,true,
- "class=\"INPUT_FULL_NAME\"");
+ "id=\"FullName\" class=\"INPUT_FULL_NAME\"");
Frm_EndForm ();
}
else // I can not edit course full name
@@ -319,7 +319,7 @@ static void Crs_Configuration (bool PrintView)
/* Form to change course short name */
Frm_StartForm (ActRenCrsShoCfg);
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Gbl.Hierarchy.Crs.ShrtName,true,
- "class=\"INPUT_SHORT_NAME\"");
+ "id=\"ShortName\" class=\"INPUT_SHORT_NAME\"");
Frm_EndForm ();
}
else // I can not edit course short name
@@ -377,7 +377,7 @@ static void Crs_Configuration (bool PrintView)
Frm_StartForm (ActChgInsCrsCodCfg);
HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
Gbl.Hierarchy.Crs.InstitutionalCrsCod,true,
- "size=\"%u\"",
+ "id=\"InsCrsCod\" size=\"%u\"",
Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD);
Frm_EndForm ();
}
diff --git a/swad_degree.c b/swad_degree.c
index c6776eb6..b64e2e27 100644
--- a/swad_degree.c
+++ b/swad_degree.c
@@ -395,7 +395,7 @@ static void Deg_Configuration (bool PrintView)
/* Form to change degree full name */
Frm_StartForm (ActRenDegFulCfg);
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Gbl.Hierarchy.Deg.FullName,true,
- "class=\"INPUT_FULL_NAME\"");
+ "id=\"FullName\" class=\"INPUT_FULL_NAME\"");
Frm_EndForm ();
}
else // I can not edit degree full name
@@ -421,7 +421,7 @@ static void Deg_Configuration (bool PrintView)
/* Form to change degree short name */
Frm_StartForm (ActRenDegShoCfg);
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Gbl.Hierarchy.Deg.ShrtName,true,
- "class=\"INPUT_SHORT_NAME\"");
+ "id=\"ShortName\" class=\"INPUT_SHORT_NAME\"");
Frm_EndForm ();
}
else // I can not edit degree short name
diff --git a/swad_enrolment.c b/swad_enrolment.c
index 0197fe4e..87e0108c 100644
--- a/swad_enrolment.c
+++ b/swad_enrolment.c
@@ -383,7 +383,7 @@ void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction,void (*FuncParams)
HTM_LABEL_End ();
HTM_INPUT_TEXT ("OtherUsrIDNickOrEMail",Cns_MAX_CHARS_EMAIL_ADDRESS,"",false,
- "size=\"18\" required=\"required\"");
+ "id=\"OtherUsrIDNickOrEMail\" size=\"18\" required=\"required\"");
/***** Send button*****/
Btn_PutConfirmButton (Txt_Continue);
diff --git a/swad_exam.c b/swad_exam.c
index 3689a04c..de13111c 100644
--- a/swad_exam.c
+++ b/swad_exam.c
@@ -1102,7 +1102,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
HTM_INPUT_TEXT ("CrsName",Hie_MAX_CHARS_FULL_NAME,Gbl.ExamAnns.ExaDat.CrsFullName,false,
- "size=\"30\"");
+ "id=\"CrsName\" size=\"30\"");
else
{
HTM_STRONG_Begin ();
@@ -1153,7 +1153,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
HTM_INPUT_TEXT ("ExamSession",Exa_MAX_CHARS_SESSION,Gbl.ExamAnns.ExaDat.Session,false,
- "size=\"30\"");
+ "id=\"ExamSession\" size=\"30\"");
else
HTM_Txt (Gbl.ExamAnns.ExaDat.Session);
HTM_TD_End ();
diff --git a/swad_file_browser.c b/swad_file_browser.c
index bd2bd70e..780ab90e 100644
--- a/swad_file_browser.c
+++ b/swad_file_browser.c
@@ -8529,7 +8529,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow)
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_TEXT ("NewLinkName",Brw_MAX_CHARS_FOLDER,"",false,
- "size=\"30\"");
+ "id=\"NewLinkName\" size=\"30\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_forum.c b/swad_forum.c
index 448a7569..66e12daf 100644
--- a/swad_forum.c
+++ b/swad_forum.c
@@ -3904,7 +3904,7 @@ static void For_WriteFormForumPst (bool IsReply,const char *Subject)
HTM_INPUT_TEXT ("Subject",Cns_MAX_CHARS_SUBJECT,
IsReply ? Subject :
"",false,
- "class=\"MSG_SUBJECT\" required=\"required\"");
+ "id=\"Subject\" class=\"MSG_SUBJECT\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_game.c b/swad_game.c
index 680a4d73..0259382c 100644
--- a/swad_game.c
+++ b/swad_game.c
@@ -1146,7 +1146,7 @@ static void Gam_PutFormsEditionGame (struct Game *Game,bool ItsANewGame)
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_TEXT ("Title",Gam_MAX_CHARS_TITLE,Game->Title,false,
- "size=\"45\" required=\"required\"");
+ "id=\"Title\" size=\"45\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_institution.c b/swad_institution.c
index 54d50603..f8685674 100644
--- a/swad_institution.c
+++ b/swad_institution.c
@@ -408,7 +408,7 @@ static void Ins_Configuration (bool PrintView)
/* Form to change institution full name */
Frm_StartForm (ActRenInsFulCfg);
HTM_INPUT_TEXT ("FullName",Hie_MAX_CHARS_FULL_NAME,Gbl.Hierarchy.Ins.FullName,true,
- "class=\"INPUT_FULL_NAME\"");
+ "id=\"FullName\" class=\"INPUT_FULL_NAME\"");
Frm_EndForm ();
}
else // I can not edit institution full name
@@ -434,7 +434,7 @@ static void Ins_Configuration (bool PrintView)
/* Form to change institution short name */
Frm_StartForm (ActRenInsShoCfg);
HTM_INPUT_TEXT ("ShortName",Hie_MAX_CHARS_SHRT_NAME,Gbl.Hierarchy.Ins.ShrtName,true,
- "class=\"INPUT_SHORT_NAME\"");
+ "id=\"ShortName\" class=\"INPUT_SHORT_NAME\"");
Frm_EndForm ();
}
else // I can not edit institution short name
diff --git a/swad_mail.c b/swad_mail.c
index e3a77d7c..c5b47bc1 100644
--- a/swad_mail.c
+++ b/swad_mail.c
@@ -1390,7 +1390,7 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
}
HTM_INPUT_EMAIL ("NewEmail",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrDat.Email,
- "size=\"18\"");
+ "id=\"NewEmail\" size=\"18\"");
HTM_BR ();
Btn_PutCreateButtonInline (NumEmails ? Txt_Change_email : // User already has an email address
Txt_Save_changes); // User has no email address yet
diff --git a/swad_match.c b/swad_match.c
index 341f53a3..2481257f 100644
--- a/swad_match.c
+++ b/swad_match.c
@@ -1207,7 +1207,7 @@ static void Mch_PutFormNewMatch (struct Game *Game)
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_TEXT ("Title",Gam_MAX_CHARS_TITLE,Game->Title,false,
- "size=\"45\" required=\"required\"");
+ "id=\"Title\" size=\"45\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_media.c b/swad_media.c
index 245a7afb..d2830503 100644
--- a/swad_media.c
+++ b/swad_media.c
@@ -387,10 +387,10 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
Frm_SetUniqueId (Id);
/***** Start media uploader container *****/
- HTM_DIV_Begin ("class=\"MED_UPLOADER\""); // container
+ HTM_DIV_Begin ("class=\"MED_UPLOADER\""); // container
/***** Icon 'clip' *****/
- HTM_DIV_Begin ("id=\"%s_med_ico\"",Id); // _med_ico
+ HTM_DIV_Begin ("id=\"%s_med_ico\"",Id); // _med_ico
HTM_A_Begin ("href=\"\" onclick=\"mediaActivateMediaUploader('%s');return false;\"",
Id);
Ico_PutIcon ("paperclip.svg",Txt_Multimedia,"ICO_HIGHLIGHT ICOx16");
@@ -452,8 +452,7 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
HTM_INPUT_TEXT (ParamUploadMedia.Title,Med_MAX_CHARS_TITLE,"",false, // _tit
"id=\"%s_tit\" class=\"%s\""
" placeholder=\"%s\""
- " disabled=\"disabled\""
- " style=\"display:none;\"",
+ " disabled=\"disabled\" style=\"display:none;\"",
Id,ClassInput,Txt_Title_attribution);
HTM_DIV_End (); // _tit
@@ -461,10 +460,10 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
Box_BoxEnd ();
/***** End media uploader *****/
- HTM_DIV_End (); // container _med_upl
+ HTM_DIV_End (); // container _med_upl
/***** End media uploader container *****/
- HTM_DIV_End (); // container
+ HTM_DIV_End (); // container
}
/*****************************************************************************/
diff --git a/swad_network.c b/swad_network.c
index 7ddd2203..31d0d996 100644
--- a/swad_network.c
+++ b/swad_network.c
@@ -318,11 +318,14 @@ void Net_ShowFormMyWebsAndSocialNets (void)
DB_FreeMySQLResult (&mysql_res);
/***** Row for this web / social network *****/
+ snprintf (StrName,sizeof (StrName),
+ "URL%u",
+ (unsigned) NumURL);
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"REC_C1_BOT LM\"");
- HTM_LABEL_Begin ("for=\"URL%u\" class=\"%s\"",
- (unsigned) NumURL,The_ClassFormInBox[Gbl.Prefs.Theme]);
+ HTM_LABEL_Begin ("for=\"%s\" class=\"%s\"",
+ StrName,The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_IMG (Cfg_URL_ICON_PUBLIC,Net_WebsAndSocialNetworksIcons[NumURL],Net_WebsAndSocialNetworksTitle[NumURL],
"class=\"CONTEXT_ICO_16x16\" style=\"margin-right:6px;\"");
HTM_TxtF ("%s:",Net_WebsAndSocialNetworksTitle[NumURL]);
@@ -330,11 +333,8 @@ void Net_ShowFormMyWebsAndSocialNets (void)
HTM_TD_End ();
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
- snprintf (StrName,sizeof (StrName),
- "URL%u",
- (unsigned) NumURL);
HTM_INPUT_URL (StrName,URL,false,
- "class=\"REC_C2_BOT_INPUT\"");
+ "id=\"%s\" class=\"REC_C2_BOT_INPUT\"",StrName);
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_password.c b/swad_password.c
index 6f7acd7a..5caa22d3 100644
--- a/swad_password.c
+++ b/swad_password.c
@@ -691,7 +691,8 @@ void Pwd_ShowFormChgMyPwd (void)
HTM_TD_End ();
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
- HTM_INPUT_PASSWORD ("UsrPwd",NULL,"off",true);
+ HTM_INPUT_PASSWORD ("UsrPwd",NULL,"off",true,
+ "id=\"UsrPwd\"");
HTM_TD_End ();
HTM_TR_End ();
@@ -741,7 +742,8 @@ void Pwd_PutFormToGetNewPasswordOnce (void)
/***** Input ****/
HTM_TD_Begin ("class=\"LM\"");
- HTM_INPUT_PASSWORD ("Paswd",Txt_HELP_password,NULL,true);
+ HTM_INPUT_PASSWORD ("Paswd",Txt_HELP_password,NULL,true,
+ "id=\"Paswd\"");
HTM_TD_End ();
HTM_TR_End ();
@@ -771,7 +773,8 @@ void Pwd_PutFormToGetNewPasswordTwice (void)
/* Input */
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
- HTM_INPUT_PASSWORD ("Paswd1",Txt_HELP_password,NULL,true);
+ HTM_INPUT_PASSWORD ("Paswd1",Txt_HELP_password,NULL,true,
+ "id=\"Paswd1\"");
HTM_TD_End ();
HTM_TR_End ();
@@ -789,7 +792,8 @@ void Pwd_PutFormToGetNewPasswordTwice (void)
/* Input */
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
- HTM_INPUT_PASSWORD ("Paswd2",Txt_HELP_password,NULL,true);
+ HTM_INPUT_PASSWORD ("Paswd2",Txt_HELP_password,NULL,true,
+ "id=\"Paswd2\"");
HTM_TD_End ();
HTM_TR_End ();
@@ -873,7 +877,8 @@ void Pwd_AskForConfirmationOnDangerousAction (void)
/***** Password *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s: ",Txt_For_security_enter_your_password);
- HTM_INPUT_PASSWORD ("OthUsrPwd",NULL,"off",true);
+ HTM_INPUT_PASSWORD ("OthUsrPwd",NULL,"off",true,
+ NULL);
HTM_LABEL_End ();
HTM_DIV_End ();
diff --git a/swad_project.c b/swad_project.c
index 7a5c9ff8..10d97e60 100644
--- a/swad_project.c
+++ b/swad_project.c
@@ -3313,7 +3313,7 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_TEXT ("Title",Prj_MAX_CHARS_PROJECT_TITLE,Prj->Title,false,
- "size=\"45\" required=\"required\"");
+ "id=\"Title\" size=\"45\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
@@ -3367,7 +3367,8 @@ static void Prj_PutFormProject (struct Project *Prj,bool ItsANewProject)
HTM_TD_End ();
HTM_TD_Begin ("class=\"LM\"");
- HTM_INPUT_NUMBER ("NumStds",(long) 0,(long) UINT_MAX,(long) Prj->NumStds,false);
+ HTM_INPUT_NUMBER ("NumStds",(long) 0,(long) UINT_MAX,(long) Prj->NumStds,false,
+ NULL);
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_record.c b/swad_record.c
index 3837f0db..1af752f1 100644
--- a/swad_record.c
+++ b/swad_record.c
@@ -3176,7 +3176,7 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat,
HTM_TD_Begin ("class=\"REC_C2_BOT REC_DAT_BOLD LM\"");
if (ICanEdit)
HTM_INPUT_TEXT ("Surname1",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME,UsrDat->Surname1,false,
- "class=\"REC_C2_BOT_INPUT\"%s",
+ "id=\"Surname1\" class=\"REC_C2_BOT_INPUT\"%s",
TypeOfView == Rec_SHA_MY_RECORD_FORM ? " required=\"required\"" :
"");
else if (UsrDat->Surname1[0])
@@ -3212,7 +3212,7 @@ static void Rec_ShowSurname2 (struct UsrData *UsrDat,
if (ICanEdit)
HTM_INPUT_TEXT ("Surname2",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME,
UsrDat->Surname2,false,
- "class=\"REC_C2_BOT_INPUT\"");
+ "id=\"Surname2\" class=\"REC_C2_BOT_INPUT\"");
else if (UsrDat->Surname2[0])
{
HTM_STRONG_Begin ();
@@ -3250,7 +3250,7 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,
if (ICanEdit)
HTM_INPUT_TEXT ("FirstName",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME,
UsrDat->FirstName,false,
- "class=\"REC_C2_BOT_INPUT\"%s",
+ "id=\"FirstName\" class=\"REC_C2_BOT_INPUT\"%s",
TypeOfView == Rec_SHA_MY_RECORD_FORM ? " required=\"required\"" :
"");
else if (UsrDat->FirstName[0])
@@ -3340,7 +3340,7 @@ static void Rec_ShowOriginPlace (struct UsrData *UsrDat,
if (ICanEdit)
HTM_INPUT_TEXT ("OriginPlace",Usr_MAX_CHARS_ADDRESS,
UsrDat->OriginPlace,false,
- "class=\"REC_C2_BOT_INPUT\"");
+ "id=\"OriginPlace\" class=\"REC_C2_BOT_INPUT\"");
else if (UsrDat->OriginPlace[0])
HTM_Txt (UsrDat->OriginPlace);
}
@@ -3406,7 +3406,7 @@ static void Rec_ShowLocalAddress (struct UsrData *UsrDat,
if (ICanEdit)
HTM_INPUT_TEXT ("LocalAddress",Usr_MAX_CHARS_ADDRESS,
UsrDat->LocalAddress,false,
- "class=\"REC_C2_BOT_INPUT\"");
+ "id=\"LocalAddress\" class=\"REC_C2_BOT_INPUT\"");
else if (UsrDat->LocalAddress[0])
HTM_Txt (UsrDat->LocalAddress);
}
@@ -3438,7 +3438,7 @@ static void Rec_ShowLocalPhone (struct UsrData *UsrDat,
{
if (ICanEdit)
HTM_INPUT_TEL ("LocalPhone",UsrDat->LocalPhone,false,
- " class=\"REC_C2_BOT_INPUT\"");
+ "id=\"LocalPhone\" class=\"REC_C2_BOT_INPUT\"");
else if (UsrDat->LocalPhone[0])
{
HTM_A_Begin ("href=\"tel:%s\" class=\"REC_DAT_BOLD\"",UsrDat->LocalPhone);
@@ -3475,7 +3475,7 @@ static void Rec_ShowFamilyAddress (struct UsrData *UsrDat,
if (ICanEdit)
HTM_INPUT_TEXT ("FamilyAddress",Usr_MAX_CHARS_ADDRESS,
UsrDat->FamilyAddress,false,
- "class=\"REC_C2_BOT_INPUT\"");
+ "id=\"FamilyAddress\" class=\"REC_C2_BOT_INPUT\"");
else if (UsrDat->FamilyAddress[0])
HTM_Txt (UsrDat->FamilyAddress);
}
@@ -3507,7 +3507,7 @@ static void Rec_ShowFamilyPhone (struct UsrData *UsrDat,
{
if (ICanEdit)
HTM_INPUT_TEL ("FamilyPhone",UsrDat->FamilyPhone,false,
- " class=\"REC_C2_BOT_INPUT\"");
+ "id=\"FamilyPhone\" class=\"REC_C2_BOT_INPUT\"");
else if (UsrDat->FamilyPhone[0])
{
HTM_A_Begin ("href=\"tel:%s\" class=\"REC_DAT_BOLD\"",UsrDat->FamilyPhone);
@@ -4161,7 +4161,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
Frm_StartFormAnchor (ActChgMyOff,Rec_MY_INS_CTR_DPT_ID);
HTM_INPUT_TEXT ("Office",Usr_MAX_CHARS_ADDRESS,Gbl.Usrs.Me.UsrDat.Tch.Office,true,
- "class=\"REC_C2_BOT_INPUT\"");
+ "id=\"Office\" class=\"REC_C2_BOT_INPUT\"");
Frm_EndForm ();
HTM_TD_End ();
@@ -4179,7 +4179,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
Frm_StartFormAnchor (ActChgMyOffPho,Rec_MY_INS_CTR_DPT_ID);
HTM_INPUT_TEL ("OfficePhone",Gbl.Usrs.Me.UsrDat.Tch.OfficePhone,true,
- " class=\"REC_C2_BOT_INPUT\"");
+ "id=\"OfficePhone\" class=\"REC_C2_BOT_INPUT\"");
Frm_EndForm ();
HTM_TD_End ();
diff --git a/swad_survey.c b/swad_survey.c
index 24cf6174..f25c517b 100644
--- a/swad_survey.c
+++ b/swad_survey.c
@@ -1918,7 +1918,7 @@ void Svy_RequestCreatOrEditSvy (void)
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_TEXT ("Title",Svy_MAX_CHARS_SURVEY_TITLE,Svy.Title,false,
- "size=\"45\" required=\"required\"");
+ "id=\"Title\" size=\"45\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_test.c b/swad_test.c
index a6a412d7..70578251 100644
--- a/swad_test.c
+++ b/swad_test.c
@@ -364,7 +364,8 @@ void Tst_ShowFormAskTst (void)
(long) Gbl.Test.Config.Min,
(long) Gbl.Test.Config.Max,
(long) Gbl.Test.Config.Def,
- Gbl.Test.Config.Min == Gbl.Test.Config.Max);
+ Gbl.Test.Config.Min == Gbl.Test.Config.Max,
+ "id=\"NumQst\"");
HTM_TD_End ();
HTM_TR_End ();
@@ -1958,7 +1959,7 @@ static void Tst_ShowFormConfigTst (void)
"%lu",
Gbl.Test.Config.MinTimeNxtTstPerQst);
HTM_INPUT_TEXT ("MinTimeNxtTstPerQst",Cns_MAX_DECIMAL_DIGITS_ULONG,StrMinTimeNxtTstPerQst,false,
- "size=\"7\" required=\"required\"");
+ "id=\"MinTimeNxtTstPerQst\" size=\"7\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
@@ -2021,7 +2022,7 @@ static void Tst_PutInputFieldNumQst (const char *Field,const char *Label,
"%u",
Value);
HTM_INPUT_TEXT (Field,Cns_MAX_DECIMAL_DIGITS_UINT,StrValue,false,
- "size=\"3\" required=\"required\"");
+ "id=\"%s\" size=\"3\" required=\"required\"",Field);
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_user.c b/swad_user.c
index 36d36258..15e8368a 100644
--- a/swad_user.c
+++ b/swad_user.c
@@ -2613,7 +2613,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
Ico_PutIcon ("user.svg",Txt_User[Usr_SEX_UNKNOWN],"CONTEXT_ICO_16x16");
HTM_LABEL_End ();
HTM_INPUT_TEXT ("UsrId",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrIdLogin,false,
- "size=\"18\" placeholder=\"%s\""
+ "id=\"UsrId\" size=\"18\" placeholder=\"%s\""
" autofocus=\"autofocus\" required=\"required\"",
Txt_nick_email_or_ID);
HTM_DIV_End ();
@@ -2623,7 +2623,8 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
HTM_LABEL_Begin ("for=\"UsrPwd\"");
Ico_PutIcon ("key.svg",Txt_Password,"CONTEXT_ICO_16x16");
HTM_LABEL_End ();
- HTM_INPUT_PASSWORD ("UsrPwd",Txt_password,NULL,false);
+ HTM_INPUT_PASSWORD ("UsrPwd",Txt_password,NULL,false,
+ "id=\"UsrPwd\"");
HTM_DIV_End ();
/***** End table, send button and end box *****/