Version19.51.4

This commit is contained in:
Antonio Cañas Vargas 2019-11-03 11:20:14 +01:00
parent b7d3b75bfb
commit 8e4600cce8
30 changed files with 135 additions and 173 deletions

View File

@ -717,11 +717,11 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
}
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"NewID\" name=\"NewID\""
" size=\"18\" maxlength=\"%u\" value=\"%s\" />"
"<br />",
" size=\"18\" maxlength=\"%u\" value=\"%s\" />",
ID_MAX_BYTES_USR_ID,
UsrDat->IDs.Num ? UsrDat->IDs.List[UsrDat->IDs.Num - 1].ID :
""); // Show the most recent ID
fprintf (Gbl.F.Out,"<br />");
Btn_PutCreateButtonInline (Txt_Add_this_ID);
Frm_EndForm ();
HTM_TD_End ();

View File

@ -1193,10 +1193,9 @@ void Asg_RequestCreatOrEditAsg (void)
HTM_TD_Begin ("class=\"LM\"");
HTM_LABEL_Begin ("class=\"DAT\"");
fprintf (Gbl.F.Out,"%s:"
"<input type=\"text\" name=\"Folder\""
fprintf (Gbl.F.Out,"%s:",Txt_Folder);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Folder\""
" size=\"30\" maxlength=\"%u\" value=\"%s\" />",
Txt_Folder,
Brw_MAX_CHARS_FOLDER,Asg.Folder);
HTM_LABEL_End ();
HTM_TD_End ();
@ -1274,9 +1273,8 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod)
" name=\"WholeCrs\" value=\"Y\"");
if (!Asg_CheckIfAsgIsAssociatedToGrps (AsgCod))
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"uncheckChildren(this,'GrpCods')\" />"
"%s %s",
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
fprintf (Gbl.F.Out," onclick=\"uncheckChildren(this,'GrpCods')\" />");
fprintf (Gbl.F.Out,"%s %s",Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
HTM_LABEL_End ();
HTM_TD_End ();

View File

@ -1220,9 +1220,8 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
" name=\"WholeCrs\" value=\"Y\"");
if (!Att_CheckIfAttEventIsAssociatedToGrps (AttCod))
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"uncheckChildren(this,'GrpCods')\" />"
"%s %s",
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
fprintf (Gbl.F.Out," onclick=\"uncheckChildren(this,'GrpCods')\" />");
fprintf (Gbl.F.Out,"%s %s",Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
HTM_LABEL_End ();
HTM_TD_End ();

View File

@ -2332,10 +2332,9 @@ void Ctr_RequestPhoto (void)
/***** Upload photo *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"file\" name=\"%s\" accept=\"image/*\""
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_File_with_the_photo);
fprintf (Gbl.F.Out,"<input type=\"file\" name=\"%s\" accept=\"image/*\""
" onchange=\"document.getElementById('%s').submit();\" />",
Txt_File_with_the_photo,
Fil_NAME_OF_PARAM_FILENAME_ORG,
Gbl.Form.Id);
HTM_LABEL_End ();

View File

@ -495,7 +495,8 @@ ps2pdf source.ps destination.pdf
// 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)
Version 19.51.4: Nov 02, 2019 Code refactoring in HTML labels. (? lines)
Version 19.51.4: Nov 03, 2019 Code refactoring in HTML labels.
Code refactoring in HTML inputs. (246091 lines)
Version 19.51.3: Nov 02, 2019 Changes in form of exam announcement. (246127 lines)
Version 19.51.2: Nov 02, 2019 Code refactoring in HTML labels. Not finished. (246127 lines)
Version 19.51.1: Nov 02, 2019 Code refactoring in HTML labels. Not finished. (246198 lines)

View File

@ -85,10 +85,9 @@ void Coo_EditMyPrefsOnCookies (void)
" name=\"cookies\" value=\"Y\"");
if (Gbl.Usrs.Me.UsrDat.Prefs.AcceptThirdPartyCookies)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
"%s",
Gbl.Form.Id,
Txt_Accept_third_party_cookies_to_view_multimedia_content_from_other_websites);
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />",
Gbl.Form.Id);
fprintf (Gbl.F.Out,"%s",Txt_Accept_third_party_cookies_to_view_multimedia_content_from_other_websites);
HTM_LABEL_End ();
/* End container */

View File

@ -455,10 +455,10 @@ void Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (bool SetHMS00000
/***** "Yesterday" and "Today" buttons *****/
HTM_TD_Begin ("rowspan=\"2\" class=\"LM\"");
fprintf (Gbl.F.Out,"<input type=\"button\" name=\"Yesterday\" value=\"%s\""
" onclick=\"setDateToYesterday('Start','End');\" />"
"<input type=\"button\" name=\"Today\" value=\"%s\""
" onclick=\"setDateToYesterday('Start','End');\" />",
Txt_Yesterday);
fprintf (Gbl.F.Out,"<input type=\"button\" name=\"Today\" value=\"%s\""
" onclick=\"setDateToToday('Start','End');\" />",
Txt_Yesterday,
Txt_Today);
HTM_TD_End ();
@ -724,8 +724,8 @@ void Dat_PutHiddenParBrowserTZDiff (void)
{
fprintf (Gbl.F.Out,"<input type=\"hidden\""
" id=\"BrowserTZName\" name=\"BrowserTZName\""
" value=\"\" />"
"<input type=\"hidden\""
" value=\"\" />");
fprintf (Gbl.F.Out,"<input type=\"hidden\""
" id=\"BrowserTZDiff\" name=\"BrowserTZDiff\""
" value=\"0\" />");
HTM_SCRIPT_Begin (NULL,NULL);

View File

@ -3269,10 +3269,9 @@ static void Brw_FormToChangeCrsGrpZone (void)
fprintf (Gbl.F.Out,"<input type=\"radio\" name=\"GrpCod\" value=\"-1\"");
if (IsCourseZone)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
"%s",
Gbl.Form.Id,
Gbl.Hierarchy.Crs.FullName);
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />",
Gbl.Form.Id);
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Crs.FullName);
HTM_LABEL_End ();
HTM_LI_End ();
@ -3302,10 +3301,9 @@ static void Brw_FormToChangeCrsGrpZone (void)
GrpDat.GrpCod);
if (IsGroupZone && GrpDat.GrpCod == Gbl.Crs.Grps.GrpCod)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
"%s %s",
Gbl.Form.Id,
GrpDat.GrpTypName,GrpDat.GrpName);
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />",
Gbl.Form.Id);
fprintf (Gbl.F.Out,"%s %s",GrpDat.GrpTypName,GrpDat.GrpName);
HTM_LABEL_End ();
HTM_LI_End ();
}
@ -8345,11 +8343,10 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1])
/***** Folder *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s: "
"<input type=\"text\" name=\"NewFolderName\""
fprintf (Gbl.F.Out,"%s: ",Txt_Folder);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"NewFolderName\""
" size=\"30\" maxlength=\"%u\" value=\"\""
" required=\"required\" />",
Txt_Folder,
Brw_MAX_CHARS_FOLDER);
HTM_LABEL_End ();

View File

@ -1760,9 +1760,9 @@ static void For_PutFormWhichForums (void)
(unsigned) ForumSet);
if (ForumSet == Gbl.Forum.ForumSet)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
"%s",
Gbl.Form.Id,Txt_FORUM_WHICH_FORUM[ForumSet]);
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />",
Gbl.Form.Id);
fprintf (Gbl.F.Out,"%s",Txt_FORUM_WHICH_FORUM[ForumSet]);
HTM_LABEL_End ();
HTM_LI_End ();
}

View File

@ -1276,9 +1276,8 @@ void Inf_FormToSendPage (Inf_InfoSrc_t InfoSrc)
/***** File *****/
HTM_DIV_Begin ("class=\"CM\"");
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"file\" name=\"%s\" />",
Txt_File,
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_File);
fprintf (Gbl.F.Out,"<input type=\"file\" name=\"%s\" />",
Fil_NAME_OF_PARAM_FILENAME_ORG);
HTM_LABEL_End ();
HTM_DIV_End ();
@ -1311,10 +1310,9 @@ void Inf_FormToSendURL (Inf_InfoSrc_t InfoSrc)
/***** Link *****/
HTM_DIV_Begin ("class=\"CM\"");
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"url\" name=\"InfoSrcURL\""
" size=\"50\" maxlength=\"256\" value=\"",
Txt_URL);
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_URL);
fprintf (Gbl.F.Out,"<input type=\"url\" name=\"InfoSrcURL\""
" size=\"50\" maxlength=\"256\" value=\"");
if ((FileURL = fopen (PathFile,"rb")) == NULL)
fprintf (Gbl.F.Out,"http://");
else

View File

@ -1268,7 +1268,7 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
Title);
HTM_LABEL_Begin (NULL);
/****** Checkbox and text *****/
/****** Checkbox *****/
fprintf (Gbl.F.Out,"<input type=\"checkbox\" name=\"%s\" value=\"Y\"",
CheckboxName);
if (Checked)
@ -1279,6 +1279,8 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\"",
Gbl.Form.Id);
fprintf (Gbl.F.Out," />");
/***** Text *****/
if (Text)
if (Text[0])
fprintf (Gbl.F.Out,"&nbsp;%s",

View File

@ -314,10 +314,9 @@ void Log_RequestLogo (Hie_Level_t Scope)
/***** Upload logo *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"file\" name=\"%s\""
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_File_with_the_logo);
fprintf (Gbl.F.Out,"<input type=\"file\" name=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />",
Txt_File_with_the_logo,
Fil_NAME_OF_PARAM_FILENAME_ORG,
Gbl.Form.Id);
HTM_LABEL_End ();

View File

@ -1404,10 +1404,10 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
}
fprintf (Gbl.F.Out,"<input type=\"email\" id=\"NewEmail\" name=\"NewEmail\""
" size=\"18\" maxlength=\"%u\" value=\"%s\" />"
"<br />",
" size=\"18\" maxlength=\"%u\" value=\"%s\" />",
Cns_MAX_CHARS_EMAIL_ADDRESS,
Gbl.Usrs.Me.UsrDat.Email);
fprintf (Gbl.F.Out,"<br />");
Btn_PutCreateButtonInline (NumEmails ? Txt_Change_email : // User already has an email address
Txt_Save_changes); // User has no email address yet
Frm_EndForm ();

View File

@ -128,12 +128,11 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
ActChgNumRowHeaCrs); // Course zone
Brw_PutImplicitParamsFileBrowser ();
HTM_LABEL_Begin (NULL);
fprintf (Gbl.F.Out,"&nbsp;%s: "
"<input type=\"text\" name=\"%s\""
fprintf (Gbl.F.Out,"&nbsp;%s: ",Txt_TABLE_Header);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"%s\""
" size=\"1\" maxlength=\"5\" value=\"%u\""
" class=\"LST_EDIT_ROWS COLOR%u\""
" onchange=\"document.getElementById('%s').submit();\" />",
Txt_TABLE_Header,
Mrk_HeadOrFootStr[Brw_HEADER],Marks.Header,
Gbl.RowEvenOdd,
Gbl.Form.Id);
@ -149,12 +148,11 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
ActChgNumRowFooCrs); // Course zone
Brw_PutImplicitParamsFileBrowser ();
HTM_LABEL_Begin (NULL);
fprintf (Gbl.F.Out,"&nbsp;%s: "
"<input type=\"text\" name=\"%s\""
fprintf (Gbl.F.Out,"&nbsp;%s: ",Txt_TABLE_Footer);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"%s\""
" size=\"1\" maxlength=\"5\" value=\"%u\""
" class=\"LST_EDIT_ROWS COLOR%u\""
" onchange=\"document.getElementById('%s').submit();\" />",
Txt_TABLE_Footer,
Mrk_HeadOrFootStr[Brw_FOOTER],Marks.Footer,
Gbl.RowEvenOdd,
Gbl.Form.Id);

View File

@ -1268,9 +1268,8 @@ static void Mch_ShowLstGrpsToCreateMatch (void)
fprintf (Gbl.F.Out,"<input type=\"checkbox\""
" id=\"WholeCrs\" name=\"WholeCrs\" value=\"Y\""
" checked=\"checked\""
" onclick=\"uncheckChildren(this,'GrpCods')\" />"
"%s %s",
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
" onclick=\"uncheckChildren(this,'GrpCods')\" />");
fprintf (Gbl.F.Out,"%s %s",Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
HTM_LABEL_End ();
HTM_TD_End ();

View File

@ -423,8 +423,8 @@ void Msg_PutHiddenParamsSubjectAndContent (void)
/***** Hidden params to send subject and content.
When the user edit the subject or the content,
they are copied here. *****/
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"HiddenSubject\" value=\"\" />"
"<input type=\"hidden\" name=\"HiddenContent\" value=\"\" />");
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"HiddenSubject\" value=\"\" />");
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"HiddenContent\" value=\"\" />");
}
/*****************************************************************************/
@ -2661,10 +2661,9 @@ void Msg_ShowFormToFilterMsgs (void)
/***** Filter authors/recipients *****/
HTM_TD_Begin ("class=\"LM\"");
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"search\" name=\"FilterFromTo\""
fprintf (Gbl.F.Out,"%s:&nbsp;",TxtFromTo[Gbl.Msg.TypeOfMessages]);
fprintf (Gbl.F.Out,"<input type=\"search\" name=\"FilterFromTo\""
" size=\"20\" maxlength=\"%u\" value=\"%s\" />",
TxtFromTo[Gbl.Msg.TypeOfMessages],
Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME * 3,Gbl.Msg.FilterFromTo);
HTM_LABEL_End ();
HTM_TD_End ();
@ -2672,10 +2671,9 @@ void Msg_ShowFormToFilterMsgs (void)
/***** Filter message content *****/
HTM_TD_Begin ("class=\"LM\"");
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"search\" name=\"FilterContent\""
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_MSG_Content);
fprintf (Gbl.F.Out,"<input type=\"search\" name=\"FilterContent\""
" size=\"20\" maxlength=\"%u\" value=\"%s\" />",
Txt_MSG_Content,
Msg_MAX_CHARS_FILTER_CONTENT,Gbl.Msg.FilterContent);
HTM_LABEL_End ();
HTM_TD_End ();
@ -2701,9 +2699,8 @@ static void Msg_ShowFormToShowOnlyUnreadMessages (void)
" value=\"Y\"");
if (Gbl.Msg.ShowOnlyUnreadMsgs)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />"
"%s",
Txt_only_unread_messages);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"%s",Txt_only_unread_messages);
HTM_LABEL_End ();
}

View File

@ -398,10 +398,10 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
}
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"NewNick\" name=\"NewNick\""
" size=\"18\" maxlength=\"%u\" value=\"@%s\" />"
"<br />",
" size=\"18\" maxlength=\"%u\" value=\"@%s\" />",
1 + Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA,
Gbl.Usrs.Me.UsrDat.Nickname);
fprintf (Gbl.F.Out,"<br />");
Btn_PutCreateButtonInline (NumNicks ? Txt_Change_nickname : // I already have a nickname
Txt_Save_changes); // I have no nickname yet);
Frm_EndForm ();

View File

@ -283,11 +283,10 @@ void Pwd_ShowFormSendNewPwd (void)
/***** User's ID/nickname *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"text\" name=\"UsrId\""
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_nick_email_or_ID);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"UsrId\""
" size=\"8\" maxlength=\"%u\" value=\"%s\""
" required=\"required\" />",
Txt_nick_email_or_ID,
Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrIdLogin);
HTM_LABEL_End ();
@ -739,23 +738,20 @@ void Pwd_PutFormToGetNewPasswordOnce (void)
HTM_TR_Begin (NULL);
/***** Begin form element ****/
/***** Label ****/
HTM_TD_Begin ("class=\"RM\"");
HTM_LABEL_Begin ("for=\"Passwd\" class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:",Txt_Password);
HTM_LABEL_End ();
HTM_TD_End ();
/***** Input ****/
HTM_TD_Begin ("class=\"LM\"");
fprintf (Gbl.F.Out,"<input type=\"password\" id=\"Passwd\" name=\"Paswd\""
" size=\"18\" maxlength=\"%u\" placeholder=\"",
Pwd_MAX_CHARS_PLAIN_PASSWORD);
/***** Placeholder *****/
fprintf (Gbl.F.Out,Txt_HELP_password,
Pwd_MIN_CHARS_PLAIN_PASSWORD);
/***** End form element ****/
fprintf (Gbl.F.Out,"\" required=\"required\" />");
HTM_TD_End ();
@ -777,22 +773,20 @@ void Pwd_PutFormToGetNewPasswordTwice (void)
/* Begin form element */
HTM_TR_Begin (NULL);
/* Label */
HTM_TD_Begin ("class=\"REC_C1_BOT RM\"");
HTM_LABEL_Begin ("for=\"Paswd1\" class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:",Txt_New_password);
HTM_LABEL_End ();
HTM_TD_End ();
/* Input */
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
fprintf (Gbl.F.Out,"<input type=\"password\" id=\"Paswd1\" name=\"Paswd1\""
" size=\"18\" maxlength=\"%u\""
" placeholder=\"",
Pwd_MAX_CHARS_PLAIN_PASSWORD);
/* Placeholder */
fprintf (Gbl.F.Out,Txt_HELP_password,Pwd_MIN_CHARS_PLAIN_PASSWORD);
/* End form element */
fprintf (Gbl.F.Out,"\" required=\"required\" />");
HTM_TD_End ();
@ -802,22 +796,20 @@ void Pwd_PutFormToGetNewPasswordTwice (void)
/* Begin form element */
HTM_TR_Begin (NULL);
/* Label */
HTM_TD_Begin ("class=\"REC_C1_BOT RM\"");
HTM_LABEL_Begin ("for=\"Paswd2\" class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:",Txt_Retype_new_password);
HTM_LABEL_End ();
HTM_TD_End ();
/* Input */
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
fprintf (Gbl.F.Out,"<input type=\"password\" id=\"Paswd2\" name=\"Paswd2\""
" size=\"18\" maxlength=\"%u\""
" placeholder=\"",
Pwd_MAX_CHARS_PLAIN_PASSWORD);
/* Placeholder */
fprintf (Gbl.F.Out,Txt_HELP_password,Pwd_MIN_CHARS_PLAIN_PASSWORD);
/* End form element */
fprintf (Gbl.F.Out,"\" required=\"required\" />");
HTM_TD_End ();
@ -889,20 +881,24 @@ void Pwd_AskForConfirmationOnDangerousAction (void)
extern const char *Txt_For_security_enter_your_password;
HTM_DIV_Begin ("class=\"CM\" style=\"margin:12px;\"");
/***** Checkbox *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"<input type=\"checkbox\" name=\"Consent\" value=\"Y\" />"
"%s",
Txt_I_understand_that_this_action_can_not_be_undone);
fprintf (Gbl.F.Out,"<input type=\"checkbox\" name=\"Consent\" value=\"Y\" />");
fprintf (Gbl.F.Out,"%s",Txt_I_understand_that_this_action_can_not_be_undone);
HTM_LABEL_End ();
fprintf (Gbl.F.Out,"<br />");
/***** Password *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"password\" name=\"OthUsrPwd\""
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_For_security_enter_your_password);
fprintf (Gbl.F.Out,"<input type=\"password\" name=\"OthUsrPwd\""
" size=\"16\" maxlength=\"%u\""
" autocomplete=\"off\" required=\"required\" />",
Txt_For_security_enter_your_password,
Pwd_MAX_CHARS_PLAIN_PASSWORD);
HTM_LABEL_End ();
HTM_DIV_End ();
}

View File

@ -336,10 +336,9 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat)
/***** Form to upload photo *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"file\" name=\"%s\" accept=\"image/*\""
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_File_with_the_photo);
fprintf (Gbl.F.Out,"<input type=\"file\" name=\"%s\" accept=\"image/*\""
" onchange=\"document.getElementById('%s').submit();\" />",
Txt_File_with_the_photo,
Fil_NAME_OF_PARAM_FILENAME_ORG,
Gbl.Form.Id);
HTM_LABEL_End ();

View File

@ -185,9 +185,8 @@ static void Pri_PutFormVisibility (const char *TxtLabel,
else
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
Gbl.Form.Id);
fprintf (Gbl.F.Out," />"
"%s",
Txt_PRIVACY_OPTIONS[Visibility]);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"%s",Txt_PRIVACY_OPTIONS[Visibility]);
HTM_LABEL_End ();
HTM_LI_End ();
}

View File

@ -205,10 +205,9 @@ void Prf_RequestUserProfile (void)
/* By default, the nickname is filled with my nickname
If no user logged ==> the nickname is empty */
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"text\" name=\"usr\""
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_Nickname);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"usr\""
" size=\"18\" maxlength=\"%u\" value=\"@%s\" />",
Txt_Nickname,
Nck_MAX_BYTES_NICKNAME_FROM_FORM,
Gbl.Usrs.Me.UsrDat.Nickname);
HTM_LABEL_End ();

View File

@ -3767,9 +3767,8 @@ void Prj_ShowFormConfig (void)
" name=\"Editable\" value=\"Y\"");
if (Gbl.Prjs.Config.Editable)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />"
"%s",
Txt_Editable_by_non_editing_teachers);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"%s",Txt_Editable_by_non_editing_teachers);
HTM_LABEL_End ();
HTM_TD_End ();

View File

@ -3126,9 +3126,8 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
(unsigned) Sex);
if (Sex == Gbl.Usrs.Me.UsrDat.Sex)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," required=\"required\" />"
"%s %s",
Usr_StringsSexIcons[Sex],Txt_SEX_SINGULAR_Abc[Sex]);
fprintf (Gbl.F.Out," required=\"required\" />");
fprintf (Gbl.F.Out,"%s %s",Usr_StringsSexIcons[Sex],Txt_SEX_SINGULAR_Abc[Sex]);
HTM_LABEL_End ();
}
HTM_TD_End ();

View File

@ -560,8 +560,8 @@ void Rol_WriteSelectorRoles (unsigned RolesAllowed,unsigned RolesSelected,
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
Gbl.Form.Id);
fprintf (Gbl.F.Out," />"
"%s",Txt_ROLES_PLURAL_abc[Role][Usr_SEX_UNKNOWN]);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"%s",Txt_ROLES_PLURAL_abc[Role][Usr_SEX_UNKNOWN]);
HTM_LABEL_End ();
fprintf (Gbl.F.Out,"<br />");
}

View File

@ -446,8 +446,8 @@ void Sta_AskShowCrsHits (void)
(unsigned) Sta_CLICKS_DETAILED);
if (Gbl.Stat.ClicksGroupedBy == Sta_CLICKS_CRS_DETAILED_LIST)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"enableDetailedClicks()\" />"
"%s",
fprintf (Gbl.F.Out," onclick=\"enableDetailedClicks()\" />");
fprintf (Gbl.F.Out,"%s",
Txt_STAT_CLICKS_GROUPED_BY[Sta_CLICKS_CRS_DETAILED_LIST]);
HTM_LABEL_End ();

View File

@ -2097,9 +2097,8 @@ static void Svy_ShowLstGrpsToEditSurvey (long SvyCod)
" id=\"WholeCrs\" name=\"WholeCrs\" value=\"Y\"");
if (!Svy_CheckIfSvyIsAssociatedToGrps (SvyCod))
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"uncheckChildren(this,'GrpCods')\" />"
"%s %s",
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
fprintf (Gbl.F.Out," onclick=\"uncheckChildren(this,'GrpCods')\" />");
fprintf (Gbl.F.Out,"%s %s",Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
HTM_LABEL_End ();
HTM_TD_End ();
@ -2755,8 +2754,8 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
(unsigned) AnsType);
if (AnsType == SvyQst->AnswerType)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />"
"%s",Txt_SURVEY_STR_ANSWER_TYPES[AnsType]);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"%s",Txt_SURVEY_STR_ANSWER_TYPES[AnsType]);
HTM_LABEL_End ();
fprintf (Gbl.F.Out,"<br />");
}

View File

@ -154,9 +154,9 @@ void Syl_PutFormWhichSyllabus (void)
(unsigned) WhichSyllabus);
if (WhichSyllabus == Gbl.Syllabus.WhichSyllabus)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
"%s",
Gbl.Form.Id,Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyllabus]);
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />",
Gbl.Form.Id);
fprintf (Gbl.F.Out,"%s",Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyllabus]);
HTM_LABEL_End ();
HTM_LI_End ();
}

View File

@ -475,9 +475,8 @@ void Tst_ShowNewTest (void)
fprintf (Gbl.F.Out,"<input type=\"checkbox\" name=\"Save\" value=\"Y\"");
if (Gbl.Test.AllowTeachers)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />"
"&nbsp;%s",
Txt_Allow_teachers_to_consult_this_test);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"&nbsp;%s",Txt_Allow_teachers_to_consult_this_test);
HTM_LABEL_End ();
HTM_DIV_End ();
@ -1141,9 +1140,8 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
ParamUploadMedia.Action,Med_ACTION_NO_MEDIA);
if (OptionsDisabled)
fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out," />"
"%s",
Txt_No_image_video);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"%s",Txt_No_image_video);
HTM_LABEL_End ();
fprintf (Gbl.F.Out,"<br />");
@ -1154,9 +1152,8 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
ParamUploadMedia.Action,Med_ACTION_KEEP_MEDIA);
if (OptionsDisabled)
fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out," />"
"%s",
Txt_Current_image_video);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"%s",Txt_Current_image_video);
HTM_LABEL_End ();
Med_ShowMedia (Media,
"TEST_MED_EDIT_ONE_CONTAINER",
@ -1171,9 +1168,8 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
Med_ACTION_NEW_MEDIA); // Replace existing image by new image
if (OptionsDisabled)
fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out," />"
"%s: ",
Txt_Change_image_video);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"%s: ",Txt_Change_image_video);
HTM_LABEL_End ();
Med_PutMediaUploader (NumMediaInForm,"TEST_MED_INPUT");
@ -1710,9 +1706,8 @@ static void Tst_ShowFormSelTags (unsigned long NumRows,MYSQL_RES *mysql_res,
fprintf (Gbl.F.Out,"<input type=\"checkbox\" name=\"AllTags\" value=\"Y\"");
if (Gbl.Test.Tags.All)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"togglecheckChildren(this,'ChkTag');\" />"
"&nbsp;%s",
Txt_All_tags);
fprintf (Gbl.F.Out," onclick=\"togglecheckChildren(this,'ChkTag');\" />");
fprintf (Gbl.F.Out,"&nbsp;%s",Txt_All_tags);
HTM_LABEL_End ();
HTM_TD_End ();
@ -1753,9 +1748,8 @@ static void Tst_ShowFormSelTags (unsigned long NumRows,MYSQL_RES *mysql_res,
fprintf (Gbl.F.Out," checked=\"checked\"");
}
}
fprintf (Gbl.F.Out," onclick=\"checkParent(this,'AllTags');\" />"
"&nbsp;%s",
row[1]);
fprintf (Gbl.F.Out," onclick=\"checkParent(this,'AllTags');\" />");
fprintf (Gbl.F.Out,"&nbsp;%s",row[1]);
HTM_LABEL_End ();
HTM_TD_End ();
@ -1922,9 +1916,8 @@ static void Tst_ShowFormConfigTst (void)
(unsigned) Pluggable);
if (Pluggable == Gbl.Test.Config.Pluggable)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />"
"%s",
Txt_TST_PLUGGABLE[Pluggable]);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"%s",Txt_TST_PLUGGABLE[Pluggable]);
HTM_LABEL_End ();
fprintf (Gbl.F.Out,"<br />");
}
@ -1989,9 +1982,8 @@ static void Tst_ShowFormConfigTst (void)
(unsigned) Feedback);
if (Feedback == Gbl.Test.Config.Feedback)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />"
"%s",
Txt_TST_STR_FEEDBACK[Feedback]);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"%s",Txt_TST_STR_FEEDBACK[Feedback]);
HTM_LABEL_End ();
fprintf (Gbl.F.Out,"<br />");
}
@ -2340,9 +2332,8 @@ static void Tst_ShowFormAnswerTypes (unsigned NumCols)
fprintf (Gbl.F.Out,"<input type=\"checkbox\" name=\"AllAnsTypes\" value=\"Y\"");
if (Gbl.Test.AllAnsTypes)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"togglecheckChildren(this,'AnswerType');\" />"
"&nbsp;%s",
Txt_All_types_of_answers);
fprintf (Gbl.F.Out," onclick=\"togglecheckChildren(this,'AnswerType');\" />");
fprintf (Gbl.F.Out,"&nbsp;%s",Txt_All_types_of_answers);
HTM_LABEL_End ();
HTM_TD_End ();
@ -2366,9 +2357,8 @@ static void Tst_ShowFormAnswerTypes (unsigned NumCols)
if (Tst_ConvertFromUnsignedStrToAnsTyp (UnsignedStr) == AnsType)
fprintf (Gbl.F.Out," checked=\"checked\"");
}
fprintf (Gbl.F.Out," onclick=\"checkParent(this,'AllAnsTypes');\" />"
"&nbsp;%s",
Txt_TST_STR_ANSWER_TYPES[AnsType]);
fprintf (Gbl.F.Out," onclick=\"checkParent(this,'AllAnsTypes');\" />");
fprintf (Gbl.F.Out,"&nbsp;%s",Txt_TST_STR_ANSWER_TYPES[AnsType]);
HTM_LABEL_End ();
HTM_TD_End ();
@ -5184,9 +5174,8 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
(unsigned) AnsType);
if (AnsType == Gbl.Test.AnswerType)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"enableDisableAns(this.form);\" />"
"%s&nbsp;",
Txt_TST_STR_ANSWER_TYPES[AnsType]);
fprintf (Gbl.F.Out," onclick=\"enableDisableAns(this.form);\" />");
fprintf (Gbl.F.Out,"%s&nbsp;",Txt_TST_STR_ANSWER_TYPES[AnsType]);
HTM_LABEL_End ();
fprintf (Gbl.F.Out,"<br />");
}
@ -5204,10 +5193,9 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
HTM_TD_Begin ("class=\"LT\"");
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"text\" name=\"AnsInt\""
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_Integer_number);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"AnsInt\""
" size=\"11\" maxlength=\"11\" value=\"%ld\"",
Txt_Integer_number,
Gbl.Test.Answer.Integer);
if (Gbl.Test.AnswerType != Tst_ANS_INT)
fprintf (Gbl.F.Out," disabled=\"disabled\"");
@ -5250,9 +5238,8 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
if (Gbl.Test.AnswerType != Tst_ANS_UNIQUE_CHOICE &&
Gbl.Test.AnswerType != Tst_ANS_MULTIPLE_CHOICE)
fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out," />"
"%s",
Txt_Shuffle);
fprintf (Gbl.F.Out," />");
fprintf (Gbl.F.Out,"%s",Txt_Shuffle);
HTM_LABEL_End ();
HTM_TD_End ();
@ -5409,11 +5396,11 @@ static void Tst_PutFloatInputField (const char *Label,const char *Field,
extern const char *The_ClassFormInBox[The_NUM_THEMES];
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s&nbsp;"
"<input type=\"text\" name=\"%s\""
fprintf (Gbl.F.Out,"%s&nbsp;",Label);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"%s\""
" size=\"11\" maxlength=\"%u\""
" value=\"%lg\"",
Label,Field,
Field,
Tst_MAX_BYTES_FLOAT_ANSWER,
Value);
if (Gbl.Test.AnswerType != Tst_ANS_FLOAT)
@ -5436,9 +5423,8 @@ static void Tst_PutTFInputField (const char *Label,char Value)
fprintf (Gbl.F.Out," checked=\"checked\"");
if (Gbl.Test.AnswerType != Tst_ANS_TRUE_FALSE)
fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out," required=\"required\" />"
"%s",
Label);
fprintf (Gbl.F.Out," required=\"required\" />");
fprintf (Gbl.F.Out,"%s",Label);
HTM_LABEL_End ();
}

View File

@ -142,10 +142,9 @@ void TsI_ShowFormImportQstsFromXML (void)
/***** Write a form to import questions *****/
Frm_StartForm (ActImpTstQst);
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:&nbsp;"
"<input type=\"file\" name=\"%s\" accept=\".xml\""
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_XML_file);
fprintf (Gbl.F.Out,"<input type=\"file\" name=\"%s\" accept=\".xml\""
" onchange=\"document.getElementById('%s').submit();\" />",
Txt_XML_file,
Fil_NAME_OF_PARAM_FILENAME_ORG,
Gbl.Form.Id);
HTM_LABEL_End ();

View File

@ -6403,9 +6403,9 @@ static void Usr_PutCheckboxListWithPhotos (void)
" value=\"Y\"");
if (Gbl.Usrs.Listing.WithPhotos)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
"%s",
Gbl.Form.Id,Txt_Display_photos);
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />",
Gbl.Form.Id);
fprintf (Gbl.F.Out,"%s",Txt_Display_photos);
HTM_LABEL_End ();
}
@ -8355,6 +8355,7 @@ static void Usr_ShowOneListUsrsOption (Usr_ListUsrsOption_t ListUsrsAction,
if (ListUsrsAction == Gbl.Usrs.Selected.Option)
fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />");
HTM_LABEL_Begin ("for=\"ListUsrsAction%u\"",(unsigned) ListUsrsAction);
fprintf (Gbl.F.Out,"%s",Label);
HTM_LABEL_End ();