diff --git a/css/swad_desktop.css b/css/swad_desktop.css index 2f1142808..7c4e0b4e4 100644 --- a/css/swad_desktop.css +++ b/css/swad_desktop.css @@ -154,6 +154,104 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;} .DAY_EVENT {border:solid 1px; border-color:white; background-color:#FFF080;} .TODAY_EVENT {border:solid 1px; border-color:#50B800; background-color:#FFF080;} +/********************************* Buttons ***********************************/ +.BT_CREATE + { + background-color:#5BC33B; + border:1px solid #518741; + } +.BT_CONFIRM + { + background-color:#55ACEE; + border:1px solid #3B88C3; + } +.BT_REMOVE + { + background-color:#EF5555; + border:1px solid #C33B3B; + } +.BT_SUBMIT + { + color:white; + font-size:16px; + font-weight:bold; + line-height:normal; + margin:8px; + padding:8px 16px; + border-radius:4px; + box-shadow:0 1px 0 rgba(255, 255, 255, 0.15) inset; + } +.BT_SUBMIT_INLINE + { + color:white; + font-size:12px; + font-weight:bold; + line-height:normal; + margin:0 4px; + padding:4px 8px; + border-radius:4px; + box-shadow:0 1px 0 rgba(255, 255, 255, 0.15) inset; + } +.BT_SUBMIT:hover + { + background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2)); + } +.BT_SUBMIT_INLINE:hover + { + background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2)); + } + +/* + +.signin-wrapper .primary-btn { + font-size: 18px; + padding: 9px 13px; +} +.primary-btn, .following.first-hover .follow-btn:hover, .following .follow-btn, .following .follow-button.cancel-hover-style:hover, .following .follow-button, .notifying .device-follow-button, .button-group-item .content.selected { + background-color: #55acee; + background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.05)); + border: 1px solid #3b88c3; + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset; + color: #fff; +} +.btn { + background-color: #f5f8fa; + background-image: linear-gradient(#fff, #f5f8fa); +} +.btn { + background-color: #ccd6dd; + background-repeat: no-repeat; + border: 1px solid #e1e8ed; + border-radius: 4px; + color: #66757f; + cursor: pointer; + display: inline-block; + font-size: 14px; + font-weight: bold; + line-height: normal; + padding: 8px 16px; + position: relative; +} +button { + border: 0 none; +} +button { + background: none repeat scroll 0 0 transparent; + border: 0 none; + padding: 0; +} +button, html input[type="button"], input[type="reset"], input[type="submit"] { + cursor: pointer; +} +button, select { + text-transform: none; +} +button { + overflow: visible; +} + +*/ + /********************************** Notice ***********************************/ .NOTICE_CONTAINER diff --git a/swad_ID.c b/swad_ID.c index 6b3348b06..322f50c61 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -402,7 +402,7 @@ void ID_ShowFormOthIDs (void) /***** Form to change IDs *****/ /* Show user's record */ - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"
" "" "" - "" - "" - "" - "" + "" "" @@ -544,7 +546,7 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) } /***** Write help text *****/ - fprintf (Gbl.F.Out,"" "" "", Txt_Create_account); @@ -201,7 +203,7 @@ void Acc_ShowFormChangeMyAccount (void) fprintf (Gbl.F.Out,""); /***** Start table *****/ - Lay_StartRoundFrameTable10 ("80%",2,Txt_User_account); + Lay_StartRoundFrameTable10 (NULL,2,Txt_User_account); /***** Nickname *****/ Nck_ShowFormChangeUsrNickname (); @@ -250,7 +252,8 @@ static void Acc_PrintAccountSeparator (void) /***** Separator *****/ fprintf (Gbl.F.Out,"" - "" "", @@ -324,12 +327,12 @@ static bool Acc_GetParamsNewAccount (char *NewNicknameWithoutArroba, /***** Step 1/3: Get new nickname from form *****/ Par_GetParToText ("NewNick",NewNicknameWithArroba,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA); + strncpy (NewNicknameWithoutArroba,NewNicknameWithArroba,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA); + NewNicknameWithoutArroba[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA] = '\0'; if (Nck_CheckIfNickWithArrobaIsValid (NewNicknameWithArroba)) // If new nickname is valid { /***** Remove arrobas at the beginning *****/ - strncpy (NewNicknameWithoutArroba,NewNicknameWithArroba,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA); - NewNicknameWithoutArroba[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA] = '\0'; Str_RemoveLeadingArrobas (NewNicknameWithoutArroba); /***** Check if the new nickname matches any of the nicknames of other users *****/ @@ -620,11 +623,9 @@ void Acc_AskIfCompletelyEliminateAccount (bool ItsMe) /* Ask for consent on dangerous actions */ Pwd_AskForConfirmationOnDangerousAction (); - fprintf (Gbl.F.Out,"
" - "" - "
", - ItsMe ? Txt_Completely_eliminate_me : - Txt_Completely_eliminate_user); + Lay_PutRemoveButton (ItsMe ? Txt_Completely_eliminate_me : + Txt_Completely_eliminate_user); + Act_FormEnd (); } else diff --git a/swad_announcement.c b/swad_announcement.c index 48ed29f5e..61e6e0b66 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -320,15 +320,14 @@ void Ann_ShowFormAnnouncement (void) extern const char *Txt_Users; extern const char *Txt_Create_announcement; + /***** Form start *****/ Act_FormStart (ActRcvAnn); + /***** Start frame *****/ + Lay_StartRoundFrameTable10 (NULL,2,Txt_New_announcement); + /***** Message subject and body *****/ - fprintf (Gbl.F.Out,"
"); Rec_ShowSharedUsrRecord (Rec_RECORD_LIST,&Gbl.Usrs.Other.UsrDat); @@ -445,12 +445,12 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) { if (NumID == 0) fprintf (Gbl.F.Out,"
" + "" "%s:" "", + "", The_ClassFormul[Gbl.Prefs.Theme],Txt_ID); else // NumID >= 1 fprintf (Gbl.F.Out,"
"); @@ -514,12 +514,12 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) if (UsrDat->IDs.Num < ID_MAX_IDS_PER_USER) { fprintf (Gbl.F.Out,"
" + "" "%s:" "", + "", The_ClassFormul[Gbl.Prefs.Theme], UsrDat->IDs.Num ? Txt_Another_ID : // A new user's ID Txt_ID); // The first user's ID @@ -530,13 +530,15 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) Act_FormStart (ActNewIDOth); Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod); } - fprintf (Gbl.F.Out,"" - "", - 16, + fprintf (Gbl.F.Out,"", ID_MAX_LENGTH_USR_ID, UsrDat->IDs.Num ? UsrDat->IDs.List[UsrDat->IDs.Num - 1].ID : - "", // Show the most recent ID - Txt_Add_this_ID); + ""); // Show the most recent ID + fprintf (Gbl.F.Out,""); + Lay_PutCreateButtonInline (Txt_Add_this_ID); Act_FormEnd (); fprintf (Gbl.F.Out,"
"); if (ItsMe) fprintf (Gbl.F.Out,"%s ", diff --git a/swad_account.c b/swad_account.c index 8196c47f3..19adaa436 100644 --- a/swad_account.c +++ b/swad_account.c @@ -160,7 +160,9 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith /***** Send button and form end *****/ fprintf (Gbl.F.Out,"
" - "" + "" "
" + "" "
" "
" - "" - "" - "" - "" - "" + fprintf (Gbl.F.Out,"" "" @@ -347,8 +346,6 @@ void Ann_ShowFormAnnouncement (void) "" "", The_ClassFormul[Gbl.Prefs.Theme], - Txt_New_announcement, - The_ClassFormul[Gbl.Prefs.Theme], Txt_MSG_Subject, The_ClassFormul[Gbl.Prefs.Theme], Txt_MSG_Message); @@ -365,10 +362,19 @@ void Ann_ShowFormAnnouncement (void) Rol_WriteSelectorRoles (1 << Rol_ROLE_STUDENT | 1 << Rol_ROLE_TEACHER); fprintf (Gbl.F.Out,"" - "" - "
%s
" "%s: " "
"); + ""); - Lay_PutSendButton (Txt_Create_announcement); + /***** Button to create announcement *****/ + fprintf (Gbl.F.Out,"" + ""); + Lay_PutCreateButton (Txt_Create_announcement); + fprintf (Gbl.F.Out,"" + ""); + + /***** End frame *****/ + Lay_EndRoundFrameTable10 (); + + /***** Form end *****/ Act_FormEnd (); } diff --git a/swad_assignment.c b/swad_assignment.c index 5913ade56..985ca2267 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -934,10 +934,7 @@ void Asg_AskRemAssignment (void) sprintf (Gbl.Message,Txt_Do_you_really_want_to_remove_the_assignment_X, Asg.Title); Lay_ShowAlert (Lay_WARNING,Gbl.Message); - fprintf (Gbl.F.Out,"
" - "" - "
", - Txt_Remove_assignment); + Lay_PutRemoveButton (Txt_Remove_assignment); Act_FormEnd (); /***** Show assignments again *****/ @@ -1240,8 +1237,10 @@ void Asg_RequestCreatOrEditAsg (void) Lay_EndRoundFrameTable10 (); /***** New assignment *****/ - Lay_PutSendButton (ItsANewAssignment ? Txt_Create_assignment : - Txt_Modify_assignment); + if (ItsANewAssignment) + Lay_PutCreateButton (Txt_Create_assignment); + else + Lay_PutConfirmButton (Txt_Modify_assignment); /***** Form end *****/ Act_FormEnd (); diff --git a/swad_attendance.c b/swad_attendance.c index bd7a6aed8..fe6461d86 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -896,10 +896,7 @@ void Att_AskRemAttEvent (void) sprintf (Gbl.Message,Txt_Do_you_really_want_to_remove_the_event_X, Att.Title); Lay_ShowAlert (Lay_WARNING,Gbl.Message); - fprintf (Gbl.F.Out,"
" - "" - "
", - Txt_Remove_event); + Lay_PutRemoveButton (Txt_Remove_event); Act_FormEnd (); /***** Show attendance events again *****/ @@ -1207,8 +1204,10 @@ void Att_RequestCreatOrEditAttEvent (void) Lay_EndRoundFrameTable10 (); /***** New attendance event *****/ - Lay_PutSendButton (ItsANewAttEvent ? Txt_Create_event : - Txt_Modify_event); + if (ItsANewAttEvent) + Lay_PutCreateButton (Txt_Create_event); + else + Lay_PutConfirmButton (Txt_Modify_event); /***** Form end *****/ Act_FormEnd (); @@ -1943,7 +1942,7 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att) if (Att->Open) { /***** Send button *****/ - Lay_PutSendButton (Txt_Save); + Lay_PutConfirmButton (Txt_Save); Act_FormEnd (); } } @@ -2022,7 +2021,7 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att) Lay_EndRoundFrameTable10 (); /***** Send button *****/ - Lay_PutSendButton (Txt_Save); + Lay_PutConfirmButton (Txt_Save); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -2664,7 +2663,7 @@ void Usr_ReqListAttendanceStdsCrs (void) Att_FreeListAttEvents (); /* Send button */ - Lay_PutSendButton (Txt_Show_list); + Lay_PutConfirmButton (Txt_Show_list); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -2949,7 +2948,7 @@ static void Att_PutButtonToShowDetails (char *StrAttCodsSelected) Usr_PutHiddenParUsrCodAll (ActSeeLstAttStd,Gbl.Usrs.Select.All); if (StrAttCodsSelected[0]) Par_PutHiddenParamString ("AttCods",StrAttCodsSelected); - Lay_PutSendButton (Txt_Show_more_details); + Lay_PutConfirmButton (Txt_Show_more_details); Act_FormEnd (); fprintf (Gbl.F.Out,""); } diff --git a/swad_banner.c b/swad_banner.c index 51d50ef77..d18e6d190 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -779,11 +779,10 @@ static void Ban_PutFormToCreateBanner (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_banner); + ""); + Lay_PutCreateButton (Txt_Create_banner); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); diff --git a/swad_centre.c b/swad_centre.c index 5762c9cb8..1369e0a8d 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -1870,15 +1870,15 @@ void Ctr_RequestPhoto (void) "" "" "" - "" - "" - "" - "" - "", + "", The_ClassFormul[Gbl.Prefs.Theme], Txt_File_with_the_photo, - Fil_NAME_OF_PARAM_FILENAME_ORG, - Txt_Upload_photo); + Fil_NAME_OF_PARAM_FILENAME_ORG); + Lay_PutCreateButton (Txt_Upload_photo); + fprintf (Gbl.F.Out,"" + "" + ""); + Act_FormEnd (); } @@ -2090,11 +2090,10 @@ static void Ctr_PutFormToCreateCentre (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_centre); + ""); + Lay_PutCreateButton (Txt_Create_centre); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); diff --git a/swad_changelog.h b/swad_changelog.h index 5003ac28e..f1fae22cc 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.100.3 (2015/03/24)" +#define Log_PLATFORM_VERSION "SWAD 14.101 (2015/03/24)" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 /* + Version 14.101: Mar 24, 2015 Fixed bug in form to create a new account. + Fixed bug in statistics. + New design of buttons. (183753 lines) Version 14.100.3: Mar 24, 2015 Fixed bug in link to institution in record. (183753 lines) Version 14.100.2: Mar 24, 2015 Changes in profile. Link to institution in record. (183752 lines) diff --git a/swad_country.c b/swad_country.c index 4a33dc53f..b2ef8c44b 100644 --- a/swad_country.c +++ b/swad_country.c @@ -1748,11 +1748,10 @@ static void Cty_PutFormToCreateCountry (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_country); + ""); + Lay_PutCreateButton (Txt_Create_country); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); diff --git a/swad_course.c b/swad_course.c index f99466aae..df022c4aa 100644 --- a/swad_course.c +++ b/swad_course.c @@ -441,7 +441,7 @@ static void Crs_Configuration (bool PrintView) /***** End form *****/ if (IsForm) { - Lay_PutSendButton (Txt_Save); + Lay_PutConfirmButton (Txt_Save); Act_FormEnd (); } } @@ -1774,11 +1774,10 @@ static void Crs_PutFormToCreateCourse (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_course); + ""); + Lay_PutCreateButton (Txt_Create_course); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); @@ -3432,7 +3431,7 @@ void Crs_AskRemoveOldCrss (void) fprintf (Gbl.F.Out,""); /***** Send button*****/ - Lay_PutSendButton (Txt_Eliminate); + Lay_PutRemoveButton (Txt_Eliminate); Act_FormEnd (); fprintf (Gbl.F.Out,""); } diff --git a/swad_degree.c b/swad_degree.c index 895572396..190789908 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -1793,11 +1793,10 @@ static void Deg_PutFormToCreateDegType (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_type_of_degree); + ""); + Lay_PutCreateButton (Txt_Create_type_of_degree); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); @@ -1962,11 +1961,10 @@ static void Deg_PutFormToCreateDegree (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_degree); + ""); + Lay_PutCreateButton (Txt_Create_degree); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); diff --git a/swad_department.c b/swad_department.c index 3bc28d65d..1bee5d979 100644 --- a/swad_department.c +++ b/swad_department.c @@ -947,11 +947,10 @@ static void Dpt_PutFormToCreateDepartment (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_department); + ""); + Lay_PutCreateButton (Txt_Create_department); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); diff --git a/swad_enrollment.c b/swad_enrollment.c index 44b95e525..5a45b9846 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -269,7 +269,7 @@ void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction) Usr_MAX_BYTES_USR_LOGIN); /***** Send button*****/ - Lay_PutSendButton (Txt_Continue); + Lay_PutConfirmButton (Txt_Continue); Act_FormEnd (); } @@ -616,7 +616,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (void) The_ClassTitle[Gbl.Prefs.Theme], Txt_Step_5_Confirm_the_enrollment_removing); Pwd_AskForConfirmationOnDangerousAction (); - Lay_PutSendButton (Txt_Confirm); + Lay_PutConfirmButton (Txt_Confirm); /***** End of form *****/ Act_FormEnd (); @@ -680,7 +680,7 @@ void Enr_AskRemoveOldUsrs (void) fprintf (Gbl.F.Out,""); /***** Send button*****/ - Lay_PutSendButton (Txt_Eliminate); + Lay_PutRemoveButton (Txt_Eliminate); Act_FormEnd (); fprintf (Gbl.F.Out,""); } @@ -1749,7 +1749,7 @@ void Enr_AskRemAllStdsThisCrs (void) Act_FormStart (ActRemAllStdCrs); Grp_PutParamAllGroups (); Pwd_AskForConfirmationOnDangerousAction (); - Lay_PutSendButton (Txt_Remove_students); + Lay_PutRemoveButton (Txt_Remove_students); Act_FormEnd (); } else @@ -2043,7 +2043,7 @@ void Enr_AskIfRejectSignUp (void) Act_FormStart (ActRejSignUp); Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EncryptedUsrCod); - Lay_PutSendButton (Txt_Reject); + Lay_PutConfirmButton (Txt_Reject); Act_FormEnd (); } else @@ -2184,7 +2184,7 @@ void Enr_ShowEnrollmentRequests (void) ""); /* Form end */ fprintf (Gbl.F.Out,""); - Lay_PutSendButton (Txt_Update); + Lay_PutConfirmButton (Txt_Update); Act_FormEnd (); /***** Build query *****/ @@ -2505,7 +2505,7 @@ void Enr_ShowEnrollmentRequests (void) Act_FormStart (ActReqMdfUsr); Crs_PutParamCrsCod (Crs.CrsCod); Usr_PutParamOtherUsrCodEncrypted (UsrDat.EncryptedUsrCod); - Lay_PutSendButton (Txt_Register); + Lay_PutCreateButton (Txt_Register); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -2515,7 +2515,7 @@ void Enr_ShowEnrollmentRequests (void) Act_FormStart (ActReqRejSignUp); Crs_PutParamCrsCod (Crs.CrsCod); Usr_PutParamOtherUsrCodEncrypted (UsrDat.EncryptedUsrCod); - Lay_PutSendButton (Txt_Reject); + Lay_PutConfirmButton (Txt_Reject); Act_FormEnd (); fprintf (Gbl.F.Out,"" ""); @@ -2877,7 +2877,7 @@ static void Enr_ShowFormToEditOtherUsr (void) /***** Which action, register or removing? *****/ if (Enr_PutActionsRegRemOneUsr (ItsMe)) - Lay_PutSendButton (Txt_Confirm); + Lay_PutConfirmButton (Txt_Confirm); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -3202,10 +3202,7 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName) Act_FormStart (Enr_ActNewAdm[Scope]); Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EncryptedUsrCod); - fprintf (Gbl.F.Out,"
" - "" - "
", - Txt_Register_user_IN_A_COURSE_OR_DEGREE); + Lay_PutConfirmButton (Txt_Register_user_IN_A_COURSE_OR_DEGREE); Act_FormEnd (); } } @@ -3468,9 +3465,8 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat,bool ItsMe) Act_FormStart (ActRemUsrCrs); Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod); Pwd_AskForConfirmationOnDangerousAction (); - fprintf (Gbl.F.Out,"", - ItsMe ? Txt_Remove_me_from_this_course : - Txt_Remove_user_from_this_course); + Lay_PutRemoveButton (ItsMe ? Txt_Remove_me_from_this_course : + Txt_Remove_user_from_this_course); Act_FormEnd (); fprintf (Gbl.F.Out,""); } @@ -3568,11 +3564,8 @@ static void Enr_AskIfRemAdm (bool ItsMe,Sco_Scope_t Scope,const char *InsCtrDegN Act_FormStart (Enr_ActRemAdm[Scope]); Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EncryptedUsrCod); - fprintf (Gbl.F.Out,"
" - "" - "
", - ItsMe ? Txt_Remove_me_as_an_administrator : - Txt_Remove_user_as_an_administrator); + Lay_PutRemoveButton (ItsMe ? Txt_Remove_me_as_an_administrator : + Txt_Remove_user_as_an_administrator); Act_FormEnd (); } else diff --git a/swad_exam.c b/swad_exam.c index 331e525e6..10f12eb57 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -739,9 +739,9 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_ extern const char *Txt_minutes; extern const char *Txt_Edit_announcement_of_exam; extern const char *Txt_Edit; - extern const char *Txt_Send_announcement_of_exam; extern const char *Txt_Remove_announcement_of_exam; extern const char *Txt_Remove; + extern const char *Txt_Publish_announcement_OF_EXAM; const char *StyleTitle = "CONV_TIT"; const char *StyleForm = "CONV_NEG"; const char *StyleNormal = "CONV"; @@ -772,7 +772,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_ StyleForm = The_ClassFormul[Gbl.Prefs.Theme]; /***** Start form *****/ Act_FormStart (ActRcvExaAnn); - if (ExaCod >= 0) + if (ExaCod > 0) Par_PutHiddenParamLong ("ExaCod",ExaCod); break; } @@ -1263,7 +1263,10 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_ QR_ExamAnnnouncement (); break; case Exa_FORM_VIEW: - Lay_PutSendButton (Txt_Send_announcement_of_exam); + if (ExaCod > 0) + Lay_PutConfirmButton (Txt_Publish_announcement_OF_EXAM); + else + Lay_PutCreateButton (Txt_Publish_announcement_OF_EXAM); Act_FormEnd (); break; } diff --git a/swad_file_browser.c b/swad_file_browser.c index d86a6e6b0..fde2eab77 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -2870,7 +2870,7 @@ void Brw_AskEditWorksCrs (void) Lay_EndRoundFrameTable10 (); /* Button to send the form */ - Lay_PutSendButton (Txt_View_works); + Lay_PutConfirmButton (Txt_View_works); Act_FormEnd (); fprintf (Gbl.F.Out,""); } @@ -5892,11 +5892,10 @@ void Brw_AskRemFileFromTree (void) sprintf (Gbl.Message,Txt_Do_you_really_want_to_remove_FILE_OR_LINK_X, FileNameToShow); Lay_ShowAlert (Lay_WARNING,Gbl.Message); - fprintf (Gbl.F.Out,"
" - "" - "
", - Gbl.FileBrowser.FileType == Brw_IS_FILE ? Txt_Remove_file : - Txt_Remove_link); + + Lay_PutRemoveButton (Gbl.FileBrowser.FileType == Brw_IS_FILE ? Txt_Remove_file : + Txt_Remove_link); + Act_FormEnd (); } else @@ -6046,10 +6045,7 @@ static void Brw_AskConfirmRemoveFolderNotEmpty (void) sprintf (Gbl.Message,Txt_Do_you_really_want_to_remove_the_folder_X, Gbl.FileBrowser.FilFolLnkName); Lay_ShowAlert (Lay_WARNING,Gbl.Message); - fprintf (Gbl.F.Out,"
" - "" - "
", - Txt_Remove_folder); + Lay_PutRemoveButton (Txt_Remove_folder); Act_FormEnd (); } @@ -7665,7 +7661,7 @@ static void Brw_PutFormToCreateAFolder (const char *FileNameToShow) The_ClassFormul[Gbl.Prefs.Theme],Txt_Folder); /* Button to send */ - Lay_PutSendButton (Txt_Create_folder); + Lay_PutCreateButton (Txt_Create_folder); Act_FormEnd (); /***** End frame *****/ @@ -7754,7 +7750,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow) Par_PutHiddenParamChar ("FullTree",'Y'); /* Button to send */ - Lay_PutSendButton (Txt_FILE_UPLOAD_Done); + Lay_PutConfirmButton (Txt_FILE_UPLOAD_Done); Act_FormEnd (); /***** End frame *****/ @@ -7804,7 +7800,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow) Fil_NAME_OF_PARAM_FILENAME_ORG); /* Button to send */ - Lay_PutSendButton (Txt_Upload_file); + Lay_PutCreateButton (Txt_Upload_file); Act_FormEnd (); /***** End frame *****/ @@ -7851,7 +7847,7 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow) Brw_ParamListFiles (Brw_IS_FOLDER,Gbl.FileBrowser.Priv.PathInTreeExceptFileOrFolder,Gbl.FileBrowser.FilFolLnkName); /* Button to send */ - Lay_PutSendButton (Txt_Paste); + Lay_PutCreateButton (Txt_Paste); Act_FormEnd (); /***** End frame *****/ @@ -7912,7 +7908,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) The_ClassFormul[Gbl.Prefs.Theme],Txt_URL,PATH_MAX); /* Button to send */ - Lay_PutSendButton (Txt_Create_link); + Lay_PutCreateButton (Txt_Create_link); Act_FormEnd (); /***** End frame *****/ @@ -9060,7 +9056,7 @@ void Brw_ShowFileMetadata (void) if (ICanEdit) // I can edit file properties { - Lay_PutSendButton (Txt_Save_file_properties); + Lay_PutConfirmButton (Txt_Save_file_properties); Act_FormEnd (); } diff --git a/swad_forum.c b/swad_forum.c index b00477c3a..d9f45129d 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -3750,7 +3750,7 @@ void For_WriteFormForumPst (bool IsReply,long ThrCod,const char *Subject) The_ClassFormul[Gbl.Prefs.Theme], Txt_MSG_Message); - Lay_PutSendButton (Txt_Send_message); + Lay_PutCreateButton (Txt_Send_message); Act_FormEnd (); } @@ -3965,10 +3965,7 @@ void For_ReqDelThr (void) Act_FormStart (For_ActionsDelThrFor[Gbl.Forum.ForumType]); For_PutAllHiddenParamsForum (); For_PutHiddenParamThrCod (ThrCod); - fprintf (Gbl.F.Out,"
" - "" - "
", - Txt_Remove_thread); + Lay_PutRemoveButton (Txt_Remove_thread); Act_FormEnd (); } diff --git a/swad_group.c b/swad_group.c index b81f5aafa..33eab3d86 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1560,8 +1560,8 @@ void Grp_ReqRegisterInGrps (void) NumGrpsIBelong = Grp_ShowLstGrpsToChgMyGrps ((Gbl.Usrs.Me.LoggedRole == Rol_ROLE_STUDENT)); /***** End form *****/ - Lay_PutSendButton (NumGrpsIBelong ? Txt_Change_my_groups : - Txt_Enroll_in_groups); + Lay_PutConfirmButton (NumGrpsIBelong ? Txt_Change_my_groups : + Txt_Enroll_in_groups); Act_FormEnd (); } else // This course has not groups @@ -2146,11 +2146,10 @@ static void Grp_PutFormToCreateGroupType (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_type_of_group); + ""); + Lay_PutCreateButton (Txt_Create_type_of_group); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); @@ -2231,11 +2230,10 @@ static void Grp_PutFormToCreateGroup (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_group); + ""); + Lay_PutCreateButton (Txt_Create_group); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); @@ -3308,7 +3306,7 @@ static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps) fprintf (Gbl.F.Out,"
"); Act_FormStart (ActRemGrpTyp); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod); - Lay_PutSendButton (Txt_Remove_type_of_group); + Lay_PutRemoveButton (Txt_Remove_type_of_group); Act_FormEnd (); fprintf (Gbl.F.Out,"
"); } @@ -3347,7 +3345,7 @@ static void Grp_AskConfirmRemGrp (void) fprintf (Gbl.F.Out,"
"); Act_FormStart (ActRemGrp); Grp_PutParamGrpCod (GrpDat.GrpCod); - Lay_PutSendButton (Txt_Remove_group); + Lay_PutRemoveButton (Txt_Remove_group); Act_FormEnd (); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_holiday.c b/swad_holiday.c index 606ceaaaa..e9eb25287 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -1011,11 +1011,10 @@ static void Hld_PutFormToCreateHoliday (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_holiday); + ""); + Lay_PutCreateButton (Txt_Create_holiday); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); diff --git a/swad_indicator.c b/swad_indicator.c index 809639077..4e59c91a7 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -168,7 +168,7 @@ void Ind_ReqIndicatorsCourses (void) /* Form end */ fprintf (Gbl.F.Out,"" ""); - Lay_PutSendButton (Txt_Update_indicators); + Lay_PutConfirmButton (Txt_Update_indicators); Act_FormEnd (); /***** Get courses from database *****/ @@ -190,7 +190,7 @@ void Ind_ReqIndicatorsCourses (void) Par_PutHiddenParamLong ("OthDegTypCod",Gbl.Stat.DegTypCod); Par_PutHiddenParamLong ("DptCod",Gbl.Stat.DptCod); Par_PutHiddenParamLong ("Indicators",Gbl.Stat.NumIndicators); - Lay_PutSendButton (Txt_Show_more_details); + Lay_PutConfirmButton (Txt_Show_more_details); Act_FormEnd (); /* End table */ @@ -456,7 +456,7 @@ static void Ind_PutButtonToConfirmIWantToSeeBigList (unsigned NumCrss) Par_PutHiddenParamChar ("ShowBigList",'Y'); /***** Send button *****/ - Lay_PutSendButton (Txt_Show_anyway); + Lay_PutConfirmButton (Txt_Show_anyway); Act_FormEnd (); fprintf (Gbl.F.Out,""); } diff --git a/swad_info.c b/swad_info.c index 8a46561bc..49a648f65 100644 --- a/swad_info.c +++ b/swad_info.c @@ -1004,7 +1004,7 @@ void Inf_FormToEnterIntegratedEditor (Inf_InfoSrc_t InfoSrc,Inf_InfoType_t InfoT Act_FormStart (Inf_ActionsInfo[InfoSrc][InfoType]); /***** Send button *****/ - Lay_PutSendButton (Txt_Edit); + Lay_PutConfirmButton (Txt_Edit); /***** End form *****/ Act_FormEnd (); @@ -1022,7 +1022,7 @@ void Inf_FormToEnterPlainTextEditor (Inf_InfoSrc_t InfoSrc,Inf_InfoType_t InfoTy Act_FormStart (Inf_ActionsInfo[InfoSrc][InfoType]); /***** Send button *****/ - Lay_PutSendButton (Txt_Edit_text); + Lay_PutConfirmButton (Txt_Edit_text); /***** End form *****/ Act_FormEnd (); @@ -1040,7 +1040,7 @@ void Inf_FormToEnterRichTextEditor (Inf_InfoSrc_t InfoSrc,Inf_InfoType_t InfoTyp Act_FormStart (Inf_ActionsInfo[InfoSrc][InfoType]); /***** Send button *****/ - Lay_PutSendButton (Txt_Edit_text); + Lay_PutConfirmButton (Txt_Edit_text); /***** End form *****/ Act_FormEnd (); @@ -1074,7 +1074,7 @@ void Inf_FormToSendPage (Inf_InfoSrc_t InfoSrc,Inf_InfoType_t InfoType) Fil_NAME_OF_PARAM_FILENAME_ORG); /***** Send button *****/ - Lay_PutSendButton (Txt_Upload_file); + Lay_PutCreateButton (Txt_Upload_file); /***** End form *****/ Act_FormEnd (); @@ -1119,7 +1119,7 @@ void Inf_FormToSendURL (Inf_InfoSrc_t InfoSrc,Inf_InfoType_t InfoType) ""); /***** Send button *****/ - Lay_PutSendButton (Txt_Send_URL); + Lay_PutCreateButton (Txt_Send_URL); /***** End form *****/ Act_FormEnd (); @@ -1729,7 +1729,7 @@ void Inf_EditPlainTxtInfo (void) // fprintf (Gbl.F.Out,"
"); /***** Send and undo buttons *****/ - Lay_PutSendButton (Txt_Send); + Lay_PutCreateButton (Txt_Send); Act_FormEnd (); } @@ -1789,7 +1789,7 @@ void Inf_EditRichTxtInfo (void) // fprintf (Gbl.F.Out,"
"); /***** Send and undo buttons *****/ - Lay_PutSendButton (Txt_Send); + Lay_PutCreateButton (Txt_Send); Act_FormEnd (); } diff --git a/swad_institution.c b/swad_institution.c index d3268a43f..226364d8b 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -1851,11 +1851,10 @@ static void Ins_PutFormToCreateInstitution (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_institution); + ""); + Lay_PutCreateButton (Txt_Create_institution); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); diff --git a/swad_layout.c b/swad_layout.c index b60d3494e..281d13b33 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1002,12 +1002,50 @@ void Lay_PutCalculateIcon (const char *Alt,const char *Text, /********************** Put a button to submit a form ************************/ /*****************************************************************************/ -void Lay_PutSendButton (const char *TextSendButton) +void Lay_PutCreateButton (const char *Text) { fprintf (Gbl.F.Out,"
" - "" + "" "
", - TextSendButton); + Text); + } + +void Lay_PutCreateButtonInline (const char *Text) + { + fprintf (Gbl.F.Out,"", + Text); + } + +void Lay_PutConfirmButton (const char *Text) + { + fprintf (Gbl.F.Out,"
" + "" + "
", + Text); + } + +void Lay_PutConfirmButtonInline (const char *Text) + { + fprintf (Gbl.F.Out,"", + Text); + } + +void Lay_PutRemoveButton (const char *Text) + { + fprintf (Gbl.F.Out,"
" + "" + "
", + Text); } /*****************************************************************************/ diff --git a/swad_layout.h b/swad_layout.h index b8a939bd7..12b0f29f6 100644 --- a/swad_layout.h +++ b/swad_layout.h @@ -92,7 +92,13 @@ void Lay_PutSendIcon (const char *Icon,const char *Alt,const char *Text); void Lay_PutCalculateIcon (const char *Alt,const char *Text, const char *StaticIconId, const char *AnimatedIconId); -void Lay_PutSendButton (const char *TextSendButton); + +void Lay_PutCreateButton (const char *Text); +void Lay_PutCreateButtonInline (const char *Text); +void Lay_PutConfirmButton (const char *Text); +void Lay_PutConfirmButtonInline (const char *Text); +void Lay_PutRemoveButton (const char *Text); + void Lay_StartRoundFrameTable10 (const char *Width,unsigned CellPadding,const char *Title); void Lay_StartRoundFrameTable10Shadow (const char *Width,unsigned CellPadding); void Lay_EndRoundFrameTable10 (void); diff --git a/swad_link.c b/swad_link.c index 9069cdda2..f4f62e777 100644 --- a/swad_link.c +++ b/swad_link.c @@ -623,11 +623,10 @@ static void Lnk_PutFormToCreateLink (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_link); + ""); + Lay_PutCreateButton (Txt_Create_link); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); diff --git a/swad_logo.c b/swad_logo.c index 682446418..d2b80b4c0 100644 --- a/swad_logo.c +++ b/swad_logo.c @@ -298,15 +298,14 @@ void Log_RequestLogo (Sco_Scope_t Scope) "" "" "" - "" - "" - "" - "" - "", + "", The_ClassFormul[Gbl.Prefs.Theme], Txt_File_with_the_logo, - Fil_NAME_OF_PARAM_FILENAME_ORG, - Txt_Upload_logo); + Fil_NAME_OF_PARAM_FILENAME_ORG); + Lay_PutCreateButton (Txt_Upload_logo); + fprintf (Gbl.F.Out,"" + "" + ""); Act_FormEnd (); } diff --git a/swad_mail.c b/swad_mail.c index a13dc0032..418a9715d 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -686,11 +686,10 @@ static void Mai_PutFormToCreateMailDomain (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_mail_domain); + ""); + Lay_PutCreateButton (Txt_Create_mail_domain); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); @@ -1048,28 +1047,34 @@ void Mai_ShowFormChangeUsrEmail (void) Confirmed = (Str_ConvertToUpperLetter (row[1][0]) == 'Y'); if (NumEmail == 1) + { /* The first mail is the current one */ fprintf (Gbl.F.Out,"" - "" + "" "%s:" "" - "", The_ClassFormul[Gbl.Prefs.Theme],Txt_Current_email); + } else // NumEmail >= 2 { + fprintf (Gbl.F.Out,""); if (NumEmail == 2) - fprintf (Gbl.F.Out,"" - "" - "%s:" - "" - "", - The_ClassFormul[Gbl.Prefs.Theme],Txt_Other_emails); - else // NumEmail >= 3 - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"" + "%s:", + NumEmails - 1, + The_ClassFormul[Gbl.Prefs.Theme], + Txt_Other_emails); + fprintf (Gbl.F.Out,"" + ""); /* Form to remove old e-mail */ Act_FormStart (ActRemOldMai); @@ -1110,39 +1115,40 @@ void Mai_ShowFormChangeUsrEmail (void) /* Form to change the email */ if (NumEmail > 1 || !Confirmed) { + fprintf (Gbl.F.Out,"" + ""); Act_FormStart (ActChgMai); - fprintf (Gbl.F.Out," " - "", - row[0], // E-mail - NumEmail == 1 ? Txt_Confirm_email : - Txt_Use_this_email); + fprintf (Gbl.F.Out,"", + row[0]); // E-mail + Lay_PutConfirmButtonInline (NumEmail == 1 ? Txt_Confirm_email : + Txt_Use_this_email); Act_FormEnd (); + fprintf (Gbl.F.Out,""); } - if (NumEmail == 1 || - NumEmail == NumEmails) - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,"" + ""); } /***** Form to enter new e-mail *****/ fprintf (Gbl.F.Out,"" - "" + "" "%s:" "" - "", + "", The_ClassFormul[Gbl.Prefs.Theme], NumEmails ? Txt_New_email : // A new e-mail Txt_Email); // The first e-mail Act_FormStart (ActChgMai); - fprintf (Gbl.F.Out,"" - "", + fprintf (Gbl.F.Out,"", Cns_MAX_BYTES_STRING, - Gbl.Usrs.Me.UsrDat.Email, - NumEmails ? Txt_Change_email : // I already have an e-mail address - Txt_Save); // I have no e-mail address yet + Gbl.Usrs.Me.UsrDat.Email); + fprintf (Gbl.F.Out,"" + ""); + Lay_PutCreateButtonInline (NumEmails ? Txt_Change_email : // I already have an e-mail address + Txt_Save); // I have no e-mail address yet); Act_FormEnd (); fprintf (Gbl.F.Out,"" ""); diff --git a/swad_message.c b/swad_message.c index f8a5a7021..3b8faddad 100644 --- a/swad_message.c +++ b/swad_message.c @@ -340,7 +340,7 @@ static void Msg_PutFormMsgUsrs (const char *Content) fprintf (Gbl.F.Out,""); /***** Send and undo buttons *****/ - Lay_PutSendButton (Txt_Send_message); + Lay_PutCreateButton (Txt_Send_message); Act_FormEnd (); } @@ -781,10 +781,7 @@ void Msg_ReqDelAllRecMsgs (void) Act_FormStart (ActDelAllRcvMsg); Msg_PutHiddenParamsMsgsFilters (); - fprintf (Gbl.F.Out,"
" - "" - "
", - Txt_Delete_messages_received); + Lay_PutRemoveButton (Txt_Delete_messages_received); Act_FormEnd (); } @@ -818,10 +815,7 @@ void Msg_ReqDelAllSntMsgs (void) Lay_ShowAlert (Lay_WARNING,Gbl.Message); Act_FormStart (ActDelAllSntMsg); Msg_PutHiddenParamsMsgsFilters (); - fprintf (Gbl.F.Out,"
" - "" - "
", - Txt_Delete_messages_sent); + Lay_PutRemoveButton (Txt_Delete_messages_sent); Act_FormEnd (); } @@ -1555,7 +1549,7 @@ static void Msg_ShowSentOrReceivedMessages (Msg_TypeOfMessages_t TypeOfMessages) Msg_GetParamOnlyUnreadMsgs (); Msg_ShowFormToShowOnlyUnreadMessages (); } - Lay_PutSendButton (Txt_View_messages); + Lay_PutConfirmButton (Txt_View_messages); Act_FormEnd (); if (TypeOfMessages == Msg_MESSAGES_RECEIVED) diff --git a/swad_nickname.c b/swad_nickname.c index 2951d556d..9d397f3c3 100644 --- a/swad_nickname.c +++ b/swad_nickname.c @@ -211,26 +211,27 @@ void Nck_ShowFormChangeUsrNickname (void) if (NumNick == 1) /* The first nickname is the current one */ fprintf (Gbl.F.Out,"" - "" + "" "%s:" "" - "", + "", The_ClassFormul[Gbl.Prefs.Theme],Txt_Current_nickname); else // NumNick >= 2 { + fprintf (Gbl.F.Out,""); if (NumNick == 2) - fprintf (Gbl.F.Out,"" - "" - "%s:" - "" - "", - The_ClassFormul[Gbl.Prefs.Theme],Txt_Other_nicknames); - else // NumNick >= 3 - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"" + "%s:", + NumNicks - 1, + The_ClassFormul[Gbl.Prefs.Theme], + Txt_Other_nicknames); + fprintf (Gbl.F.Out,"" + ""); /* Form to remove old nickname */ Act_FormStart (ActRemOldNic); @@ -260,39 +261,38 @@ void Nck_ShowFormChangeUsrNickname (void) /* Form to change the nickname */ if (NumNick > 1) { + fprintf (Gbl.F.Out,"" + ""); Act_FormStart (ActChgNic); - fprintf (Gbl.F.Out," " - "" - "", - row[0], // Nickname - Txt_Use_this_nickname); + fprintf (Gbl.F.Out,"", + row[0]); // Nickname + Lay_PutConfirmButtonInline (Txt_Use_this_nickname); Act_FormEnd (); } - if (NumNick == 1 || - NumNick == NumNicks) - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,"" + ""); } /***** Form to enter new nickname *****/ fprintf (Gbl.F.Out,"" - "" + "" "%s:" "" - "", + "", The_ClassFormul[Gbl.Prefs.Theme], NumNicks ? Txt_New_nickname : // A new nickname Txt_Nickname); // The first nickname Act_FormStart (ActChgNic); - fprintf (Gbl.F.Out,"" - "", + fprintf (Gbl.F.Out,"", 1 + Nck_MAX_LENGTH_NICKNAME_WITHOUT_ARROBA, - Gbl.Usrs.Me.UsrDat.Nickname, - NumNicks ? Txt_Change_nickname : // I already have a nickname - Txt_Save); // I have no nickname yet + Gbl.Usrs.Me.UsrDat.Nickname); + fprintf (Gbl.F.Out,"" + ""); + Lay_PutCreateButtonInline (NumNicks ? Txt_Change_nickname : // I already have a nickname + Txt_Save); // I have no nickname yet); Act_FormEnd (); fprintf (Gbl.F.Out,"" ""); diff --git a/swad_notice.c b/swad_notice.c index f6b1ffa0d..b08b1019f 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -93,15 +93,14 @@ void Not_ShowFormNotice (void) Gbl.CurrentCrs.Crs.FullName); Lay_ShowAlert (Lay_INFO,Gbl.Message); + /***** Form start *****/ Act_FormStart (ActRcvNot); - fprintf (Gbl.F.Out,"" - "" - "" - "" - "" - "" + + /***** Start frame *****/ + Lay_StartRoundFrameTable10 (NULL,2,Txt_New_notice); + + /***** Message body *****/ + fprintf (Gbl.F.Out,"" "" - "" - "
" - "%s" - "
" "%s: " @@ -109,13 +108,21 @@ void Not_ShowFormNotice (void) "" "" "
", - The_ClassFormul[Gbl.Prefs.Theme], - Txt_New_notice, + "", The_ClassFormul[Gbl.Prefs.Theme], Txt_MSG_Message); - Lay_PutSendButton (Txt_Create_notice); + + /***** Button to create announcement *****/ + fprintf (Gbl.F.Out,"" + ""); + Lay_PutCreateButton (Txt_Create_notice); + fprintf (Gbl.F.Out,"" + ""); + + /***** End frame *****/ + Lay_EndRoundFrameTable10 (); + + /***** Form end *****/ Act_FormEnd (); } diff --git a/swad_notification.c b/swad_notification.c index 0d6ec4ed6..c31d7f1f7 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -1741,7 +1741,7 @@ void Ntf_PutFormChangeNotifSentByEMail (void) /***** End form *****/ fprintf (Gbl.F.Out,""); - Lay_PutSendButton (Txt_Save_changes); + Lay_PutConfirmButton (Txt_Save_changes); Act_FormEnd (); /***** End table *****/ diff --git a/swad_password.c b/swad_password.c index 8203a9fc0..c412b9b69 100644 --- a/swad_password.c +++ b/swad_password.c @@ -232,7 +232,7 @@ void Pwd_ShowFormSendNewPwd (void) The_ClassFormul[Gbl.Prefs.Theme],Txt_nick_email_or_ID,Usr_MAX_LENGTH_USR_LOGIN,Gbl.Usrs.Me.UsrIdLogin); /***** End form *****/ - Lay_PutSendButton (Txt_Email_new_password); + Lay_PutConfirmButton (Txt_Email_new_password); Act_FormEnd (); } @@ -676,11 +676,10 @@ void Pwd_ShowFormChgPwd (void) /***** Send button and end form *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Save); + ""); + Lay_PutConfirmButton (Txt_Save); + fprintf (Gbl.F.Out,"" + ""); Lay_EndRoundFrameTable10 (); Act_FormEnd (); } @@ -760,7 +759,7 @@ void Pwd_ShowFormOthPwd (void) fprintf (Gbl.F.Out,""); /* End form */ - Lay_PutSendButton (Txt_Save); + Lay_PutConfirmButton (Txt_Save); Act_FormEnd (); } else diff --git a/swad_photo.c b/swad_photo.c index 8203b0f39..6a5677ac9 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -267,16 +267,15 @@ void Pho_ReqPhoto (const struct UsrData *UsrDat,bool PhotoExists,const char *Pho "" "" "" - "" - "" - "" - "" - "", + "", The_ClassFormul[Gbl.Prefs.Theme], Txt_File_with_the_photo, Fil_NAME_OF_PARAM_FILENAME_ORG, - UsrDat->UsrCod, - Txt_Upload_photo); + UsrDat->UsrCod); + Lay_PutCreateButton (Txt_Upload_photo); + fprintf (Gbl.F.Out,"" + "" + ""); Act_FormEnd (); } diff --git a/swad_place.c b/swad_place.c index 803aa3813..9dd4cb2db 100644 --- a/swad_place.c +++ b/swad_place.c @@ -720,11 +720,10 @@ static void Plc_PutFormToCreatePlace (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_place); + ""); + Lay_PutCreateButton (Txt_Create_place); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); diff --git a/swad_plugin.c b/swad_plugin.c index 2ae93474f..53df2ed97 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -914,11 +914,10 @@ static void Plg_PutFormToCreatePlugin (void) /***** Send button *****/ fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_plugin); + ""); + Lay_PutCreateButton (Txt_Create_plugin); + fprintf (Gbl.F.Out,"" + ""); /***** End of frame *****/ Lay_EndRoundFrameTable10 (); diff --git a/swad_preference.c b/swad_preference.c index 4f60e4dab..9924e34a9 100644 --- a/swad_preference.c +++ b/swad_preference.c @@ -273,7 +273,7 @@ void Pre_AskChangeLanguage (void) /***** Send button *****/ Act_FormStart (ActChgLan); Par_PutHiddenParamUnsigned ("Lan",(unsigned) Gbl.Prefs.Language); - Lay_PutSendButton (Txt_Switch_to_LANGUAGE[Gbl.Prefs.Language]); + Lay_PutConfirmButton (Txt_Switch_to_LANGUAGE[Gbl.Prefs.Language]); Act_FormEnd (); Gbl.Prefs.Language = CurrentLanguage; // Restore current language diff --git a/swad_profile.c b/swad_profile.c index 101571879..cc3420e58 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -157,7 +157,7 @@ static void Prf_RequestUserProfileWithDefaultNickname (const char *DefaultNickna DefaultNickname); /***** Send button*****/ - Lay_PutSendButton (Txt_Continue); + Lay_PutConfirmButton (Txt_Continue); Act_FormEnd (); /***** End frame *****/ diff --git a/swad_record.c b/swad_record.c index 5051e24f1..e1940832a 100644 --- a/swad_record.c +++ b/swad_record.c @@ -90,7 +90,7 @@ static void Rec_PutLinkToChangeMySocialNetworks (void); void Rec_ReqEditRecordFields (void) { extern const char *Txt_There_are_no_record_fields_in_the_course_X; - extern const char *Txt_Record_fields_in_X; + extern const char *Txt_Record_fields; /***** Form to edit the fields of the records *****/ /***** Get list of fields of records in current course *****/ @@ -99,11 +99,7 @@ void Rec_ReqEditRecordFields (void) /***** List the current fields of records for edit them *****/ if (Gbl.CurrentCrs.Records.LstFields.Num) // Fields found... { - sprintf (Gbl.Message,Txt_Record_fields_in_X, - Gbl.CurrentCrs.Crs.FullName); - Lay_WriteTitle (Gbl.Message); - - Lay_StartRoundFrameTable10 (NULL,0,NULL); + Lay_StartRoundFrameTable10 (NULL,2,Txt_Record_fields); Rec_ListFieldsRecordsForEdition (); Lay_EndRoundFrameTable10 (); } @@ -273,7 +269,6 @@ void Rec_ListFieldsRecordsForEdition (void) void Rec_ShowFormCreateRecordField (void) { - extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_New_record_field; extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY]; extern const char *Txt_Create_record_field; @@ -283,16 +278,7 @@ void Rec_ShowFormCreateRecordField (void) Act_FormStart (ActNewFie); /***** Start of frame *****/ - Lay_StartRoundFrameTable10 (NULL,0,NULL); - - /***** Message *****/ - fprintf (Gbl.F.Out,"" - "" - "%s:" - "" - "", - The_ClassFormul[Gbl.Prefs.Theme],Txt_New_record_field); + Lay_StartRoundFrameTable10 (NULL,0,Txt_New_record_field); /***** Write heading *****/ Rec_WriteHeadingRecordFields (); @@ -332,16 +318,21 @@ void Rec_ShowFormCreateRecordField (void) Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]); } - /***** End of form *****/ fprintf (Gbl.F.Out,"" "" ""); + /***** Send button *****/ + fprintf (Gbl.F.Out,"" + ""); + Lay_PutCreateButton (Txt_Create_record_field); + fprintf (Gbl.F.Out,"" + ""); + /***** End of frame *****/ Lay_EndRoundFrameTable10 (); - /***** Send button *****/ - Lay_PutSendButton (Txt_Create_record_field); + /***** End of form *****/ Act_FormEnd (); } @@ -590,10 +581,7 @@ void Rec_AskConfirmRemFieldWithRecords (unsigned NumRecords) /***** Button to confirm removing *****/ Act_FormStart (ActRemFie); Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.Field.FieldCod); - fprintf (Gbl.F.Out,"
" - "" - "
", - Txt_Remove_record_field); + Lay_PutRemoveButton (Txt_Remove_record_field); Act_FormEnd (); } @@ -1484,7 +1472,7 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat) { extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_RECORD_FIELD_VISIBILITY_RECORD[Rec_NUM_TYPES_VISIBILITY]; - extern const char *Txt_Send; + extern const char *Txt_Save; unsigned RecordWidth = Rec_RECORD_WIDTH_WIDE; char StrRecordWidth[10+1]; unsigned FrameWidth = 10; @@ -1649,7 +1637,7 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat) if (DataForm) { - Lay_PutSendButton (Txt_Send); + Lay_PutConfirmButton (Txt_Save); Act_FormEnd (); } } @@ -1877,7 +1865,7 @@ void Rec_ShowFormSignUpWithMyCommonRecord (void) fprintf (Gbl.F.Out,"
"); Act_FormStart (ActSignUp); Rec_ShowSharedUsrRecord (Rec_FORM_SIGN_UP,&Gbl.Usrs.Me.UsrDat); - Lay_PutSendButton (Txt_Sign_up); + Lay_PutConfirmButton (Txt_Sign_up); Act_FormEnd (); fprintf (Gbl.F.Out,"
"); } @@ -1912,7 +1900,7 @@ void Rec_ShowFormMyCommRecord (void) /***** My record *****/ Act_FormStart (ActChgMyData); Rec_ShowSharedUsrRecord (Rec_FORM_MY_COMMON_RECORD,&Gbl.Usrs.Me.UsrDat); - Lay_PutSendButton (Txt_Save_changes); + Lay_PutConfirmButton (Txt_Save_changes); Rec_WriteLinkToDataProtectionClause (); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -1969,7 +1957,7 @@ void Rec_ShowFormOtherNewCommonRecord (struct UsrData *UsrDat) if (Gbl.CurrentCrs.Grps.NumGrps) // This course has groups? Grp_ShowLstGrpsToChgOtherUsrsGrps (UsrDat->UsrCod); - Lay_PutSendButton (Txt_Register); + Lay_PutConfirmButton (Txt_Register); Act_FormEnd (); fprintf (Gbl.F.Out,""); } diff --git a/swad_search.c b/swad_search.c index f0b9f1ef9..5095ca131 100644 --- a/swad_search.c +++ b/swad_search.c @@ -271,9 +271,8 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Sco Sch_PutFormToSearch (Gbl.Prefs.IconsURL); /***** Send button *****/ - fprintf (Gbl.F.Out,"
" - "", - Txt_Search); + fprintf (Gbl.F.Out,"
"); + Lay_PutConfirmButton (Txt_Search); /***** Form end *****/ fprintf (Gbl.F.Out,"" diff --git a/swad_statistic.c b/swad_statistic.c index 0d0eb8426..83b0ec9fb 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -94,7 +94,6 @@ struct Sta_StatsForum static void Sta_PutFormToRequestAccessesCrs (void); -static void Sta_PutSeeAccessesButton (void); static void Sta_WriteSelectorCountType (void); static void Sta_WriteSelectorAction (void); static bool Sta_SeeAccesses (void); @@ -388,10 +387,11 @@ static void Sta_PutFormToRequestAccessesCrs (void) void Sta_AskSeeCrsAccesses (void) { extern const char *The_ClassFormul[The_NUM_THEMES]; - extern const char *Txt_No_teachers_or_students_found; extern const char *Txt_distributed_by; extern const char *Txt_STAT_CLICK_STAT_TYPES[Sta_NUM_TYPES_CLICK_STATS]; extern const char *Txt_results_per_page; + extern const char *Txt_Show_visits; + extern const char *Txt_No_teachers_or_students_found; static unsigned long RowsPerPage[] = {10,20,30,40,50,100,500,1000,5000,10000,50000,100000}; #define NUM_OPTIONS_ROWS_PER_PAGE (sizeof (RowsPerPage) / sizeof (RowsPerPage[0])) Sta_ClicksStatType_t ClicksStatType; @@ -505,13 +505,13 @@ void Sta_AskSeeCrsAccesses (void) } fprintf (Gbl.F.Out,")" "" - ""); + "" + ""); /***** Submit button *****/ - Sta_PutSeeAccessesButton (); + Lay_PutConfirmButton (Txt_Show_visits); /***** Form end *****/ - fprintf (Gbl.F.Out,""); Act_FormEnd (); /* Free the memory used by the list of users */ @@ -541,6 +541,7 @@ void Sta_AskSeeGblAccesses (void) extern const char *Txt_Scope; extern const char *Txt_distributed_by; extern const char *Txt_STAT_CLICK_STAT_TYPES[Sta_NUM_TYPES_CLICK_STATS]; + extern const char *Txt_Show_visits; Sta_Role_t RoleStat; Sta_ClicksStatType_t ClicksStatType; @@ -633,32 +634,16 @@ void Sta_AskSeeGblAccesses (void) Txt_STAT_CLICK_STAT_TYPES[ClicksStatType]); } fprintf (Gbl.F.Out,"" - ""); + "" + ""); /***** Submit button *****/ - Sta_PutSeeAccessesButton (); + Lay_PutConfirmButton (Txt_Show_visits); /***** Form end *****/ - fprintf (Gbl.F.Out,""); Act_FormEnd (); } -/*****************************************************************************/ -/********************** Put submit button to see accesses ********************/ -/*****************************************************************************/ - -static void Sta_PutSeeAccessesButton (void) - { - extern const char *Txt_Show_visits; - - fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Show_visits); - } - /*****************************************************************************/ /****** Put selectors for type of access count and for degree or course ******/ /*****************************************************************************/ @@ -822,7 +807,7 @@ static bool Sta_SeeAccesses (void) struct UsrData UsrDat; unsigned NumUsr = 0; const char *Ptr; - char StrRole[16+1]; + char StrRole[256]; char StrQueryCountType[256]; unsigned NumDays; char ActTxt[Act_MAX_LENGTH_ACTION_TXT+1]; @@ -1060,6 +1045,7 @@ static bool Sta_SeeAccesses (void) Gbl.DateRange.DateEnd.Month, Gbl.DateRange.DateEnd.Day); strcat (Query,QueryAux); + switch (StatsGlobalOrCourse) { case STAT_GLOBAL: @@ -1099,6 +1085,7 @@ static bool Sta_SeeAccesses (void) LogTable,Gbl.CurrentCrs.Crs.CrsCod); strcat (Query,QueryAux); } + /* Type of users */ switch (Gbl.Stat.Role) { @@ -3643,8 +3630,7 @@ void Sta_ReqUseOfPlatform (void) ""); /***** Submit button *****/ - fprintf (Gbl.F.Out,"", - Txt_Show_statistic); + Lay_PutConfirmButton (Txt_Show_statistic); /***** Form end *****/ Act_FormEnd (); diff --git a/swad_survey.c b/swad_survey.c index 21f12dd30..e7f9b696e 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -425,7 +425,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,bool Sh Svy_PutHiddenParamSvyOrderType (); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); - Lay_PutSendButton (Txt_Answer_survey); + Lay_PutConfirmButton (Txt_Answer_survey); Act_FormEnd (); } /* Possible button to see the result of the survey */ @@ -436,7 +436,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,bool Sh Svy_PutHiddenParamSvyOrderType (); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); - Lay_PutSendButton (Txt_View_survey_results); + Lay_PutConfirmButton (Txt_View_survey_results); Act_FormEnd (); } } @@ -1270,10 +1270,7 @@ void Svy_AskRemSurvey (void) sprintf (Gbl.Message,Txt_Do_you_really_want_to_remove_the_survey_X, Svy.Title); Lay_ShowAlert (Lay_WARNING,Gbl.Message); - fprintf (Gbl.F.Out,"
" - "" - "
", - Txt_Remove_survey); + Lay_PutRemoveButton (Txt_Remove_survey); Act_FormEnd (); /***** Show surveys again *****/ @@ -1373,10 +1370,7 @@ void Svy_AskResetSurvey (void) sprintf (Gbl.Message,Txt_Do_you_really_want_to_reset_the_survey_X, Svy.Title); Lay_ShowAlert (Lay_WARNING,Gbl.Message); - fprintf (Gbl.F.Out,"
" - "" - "
", - Txt_Reset_survey); + Lay_PutConfirmButton (Txt_Reset_survey); Act_FormEnd (); /***** Show surveys again *****/ @@ -1600,7 +1594,7 @@ void Svy_RequestCreatOrEditSvy (void) Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); - /***** Table start *****/ + /***** Start frame *****/ Lay_StartRoundFrameTable10 (NULL,2, ItsANewSurvey ? Txt_New_survey : Txt_Edit_survey); @@ -1627,7 +1621,7 @@ void Svy_RequestCreatOrEditSvy (void) "%s:" "" "" - "" + "" "" "", Txt_Title, @@ -1699,12 +1693,18 @@ void Svy_RequestCreatOrEditSvy (void) /***** Groups *****/ Svy_ShowLstGrpsToEditSurvey (Svy.SvyCod); - /***** Table end *****/ - Lay_EndRoundFrameTable10 (); - /***** Button to create/modify survey *****/ - Lay_PutSendButton (ItsANewSurvey ? Txt_Create_survey : - Txt_Modify_survey); + fprintf (Gbl.F.Out,"" + ""); + if (ItsANewSurvey) + Lay_PutCreateButton (Txt_Create_survey); + else + Lay_PutConfirmButton (Txt_Modify_survey); + fprintf (Gbl.F.Out,"" + ""); + + /***** End frame *****/ + Lay_EndRoundFrameTable10 (); /***** Form end *****/ Act_FormEnd (); @@ -1779,7 +1779,7 @@ static void Svy_ShowLstGrpsToEditSurvey (long SvyCod) "" "", Txt_Groups); - Lay_StartRoundFrameTable10 (NULL,0,NULL); + Lay_StartRoundFrameTable10 ("100%",0,NULL); /***** First row: checkbox to select the whole course *****/ fprintf (Gbl.F.Out,"" @@ -2391,7 +2391,7 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,ch extern const char *Txt_Stem; extern const char *Txt_Type; extern const char *Txt_SURVEY_STR_ANSWER_TYPES[Svy_NUM_ANS_TYPES]; - extern const char *Txt_Send; + extern const char *Txt_Save; char Query[512]; MYSQL_RES *mysql_res; MYSQL_ROW row; @@ -2452,19 +2452,15 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,ch if (SvyQst->QstCod > 0) // If the question already has assigned a code Svy_PutParamQstCod (SvyQst->QstCod); - fprintf (Gbl.F.Out,"
"); - - /***** Show message *****/ + /***** Start frame *****/ if (SvyQst->QstCod > 0) // If the question already has assigned a code { - sprintf (Gbl.Message,"%s %u", + sprintf (Gbl.Title,"%s %u", Txt_Question,SvyQst->QstInd + 1); // Question index may be 0, 1, 2, 3,... - Lay_WriteTitle (Gbl.Message); + Lay_StartRoundFrameTable10 (NULL,2,Gbl.Title); } else - Lay_WriteTitle (Txt_New_question); - - fprintf (Gbl.F.Out,""); + Lay_StartRoundFrameTable10 (NULL,2,Txt_New_question); /***** Stem *****/ fprintf (Gbl.F.Out,"" @@ -2534,13 +2530,24 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,ch "" ""); } - - /***** Send and undo buttons *****/ fprintf (Gbl.F.Out,"
" - "" - "" - "
"); - Lay_PutSendButton (Txt_Send); + "" + ""); + + /***** Send button *****/ + fprintf (Gbl.F.Out,"" + ""); + if (SvyQst->QstCod > 0) // If the question already has assigned a code + Lay_PutConfirmButton (Txt_Save); + else + Lay_PutCreateButton (Txt_Save); + fprintf (Gbl.F.Out,"" + ""); + + /***** End frame *****/ + Lay_EndRoundFrameTable10 (); + + /***** End form *****/ Act_FormEnd (); Svy_FreeTextChoiceAnswers (SvyQst,NumAnswers); @@ -3100,7 +3107,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ Lay_EndRoundFrameTable10 (); /***** Button to create/modify survey *****/ - Lay_PutSendButton (Txt_Send_survey); + Lay_PutConfirmButton (Txt_Send_survey); /***** Form end *****/ Act_FormEnd (); diff --git a/swad_test.c b/swad_test.c index d2bac1be3..00c66209f 100644 --- a/swad_test.c +++ b/swad_test.c @@ -287,12 +287,11 @@ void Tst_ShowFormAskTst (void) if (Gbl.Test.Config.Min == Gbl.Test.Config.Max) fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," />" + "" ""); /***** Send button *****/ - fprintf (Gbl.F.Out,"" - "", - Txt_Generate_exam); + Lay_PutConfirmButton (Txt_Generate_exam); Act_FormEnd (); } } @@ -417,7 +416,7 @@ void Tst_ShowNewTestExam (void) Txt_Allow_teachers_to_consult_this_exam); /* End form */ - Lay_PutSendButton (Txt_Done_assess_exam); + Lay_PutConfirmButton (Txt_Done_assess_exam); Act_FormEnd (); /***** Set test status *****/ @@ -1141,12 +1140,11 @@ void Tst_ShowFormAskEditTsts (void) fprintf (Gbl.F.Out,""); Dat_WriteFormIniEndDates (); - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,"" + ""); /***** Send button *****/ - fprintf (Gbl.F.Out,"" - "", - Txt_Show_questions); + Lay_PutConfirmButton (Txt_Show_questions); Act_FormEnd (); } @@ -1716,7 +1714,7 @@ static void Tst_ShowFormConfigTst (void) /***** End form *****/ fprintf (Gbl.F.Out,""); Lay_EndRoundFrameTable10 (); - Lay_PutSendButton (Txt_Save); + Lay_PutConfirmButton (Txt_Save); Act_FormEnd (); } @@ -4521,7 +4519,7 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) fprintf (Gbl.F.Out,"" "" ""); - Lay_PutSendButton (Txt_Save); + Lay_PutConfirmButton (Txt_Save); Act_FormEnd (); Tst_FreeTextChoiceAnswers (); @@ -5994,7 +5992,7 @@ void Tst_SelUsrsToSeeUsrsTstExams (void) /***** Button to send the form *****/ fprintf (Gbl.F.Out,"" ""); - Lay_PutSendButton (Txt_See_exams); + Lay_PutConfirmButton (Txt_See_exams); Act_FormEnd (); } } @@ -6029,7 +6027,7 @@ void Tst_SelDatesToSeeMyTstExams (void) fprintf (Gbl.F.Out,""); /***** Button to send the form *****/ - Lay_PutSendButton (Txt_See_exams); + Lay_PutConfirmButton (Txt_See_exams); Act_FormEnd (); } diff --git a/swad_test_import.c b/swad_test_import.c index 576c15fb0..748362918 100644 --- a/swad_test_import.c +++ b/swad_test_import.c @@ -148,15 +148,14 @@ void TsI_ShowFormImportQstsFromXML (void) "" "" "" - "" - "" - "" - "" - "", + "", The_ClassFormul[Gbl.Prefs.Theme], Txt_XML_file, - Fil_NAME_OF_PARAM_FILENAME_ORG, - Txt_Upload_file); + Fil_NAME_OF_PARAM_FILENAME_ORG); + Lay_PutCreateButton (Txt_Upload_file); + fprintf (Gbl.F.Out,"" + "" + ""); Act_FormEnd (); fprintf (Gbl.F.Out,""); } diff --git a/swad_text.c b/swad_text.c index aefa866f1..cbf02fa3b 100644 --- a/swad_text.c +++ b/swad_text.c @@ -2349,17 +2349,17 @@ const char *Txt_Another_ID = const char *Txt_Add_this_ID = #if L==0 - "Afegir aquest ID (DNI/cèdula)"; + "Afegir aquest ID"; #elif L==1 "Fügen Sie diese Ausweis-Nr."; #elif L==2 "Add this ID"; #elif L==3 - "Añadir este ID (DNI/cédula)"; + "Añadir este ID"; #elif L==4 "Ajouter ce numéro d'identité"; #elif L==5 - "Añadir este ID (DNI/cédula)"; // Okoteve traducción + "Añadir este ID"; // Okoteve traducción #elif L==6 "Aggiungi questa carta d'identità"; #elif L==7 @@ -27940,25 +27940,25 @@ const char *Txt_RECORD_FIELD_VISIBILITY_RECORD[Rec_NUM_TYPES_VISIBILITY] = #endif }; -const char *Txt_Record_fields_in_X = // Warning: it is very important to include %s in the following sentences +const char *Txt_Record_fields = #if L==0 - "Camps de fitxes en %s:"; + "Camps de fitxes"; #elif L==1 - "Record fields in %s:"; // Need Übersetzung + "Record fields"; // Need Übersetzung #elif L==2 - "Record fields in %s:"; + "Record fields"; #elif L==3 - "Campos de fichas en %s:"; + "Campos de fichas"; #elif L==4 - "Record fields in %s:"; // Besoin de traduction + "Record fields"; // Besoin de traduction #elif L==5 - "Campos de fichas en %s:"; // Okoteve traducción + "Campos de fichas"; // Okoteve traducción #elif L==6 - "Campo schede in %s:"; + "Campo schede"; #elif L==7 - "Rekord w dziedzinie %s:"; + "Rekord w dziedzinie"; #elif L==8 - "Record fields in %s:"; // Necessita de tradução + "Record fields"; // Necessita de tradução #endif const char *Txt_Recipients = @@ -33866,25 +33866,25 @@ const char *Txt_Send = "Enviar"; #endif -const char *Txt_Send_announcement_of_exam = +const char *Txt_Publish_announcement_OF_EXAM = #if L==0 - "Enviar convocatoria de examen"; // Necessita traduccio + "Publicar convocatòria"; #elif L==1 - "Senden Aufruf für Prüfung"; + "Veröffentlichen Aufruf"; #elif L==2 - "Send announcement of exam"; + "Publish announcement"; #elif L==3 - "Enviar convocatoria de examen"; + "Publicar convocatoria"; #elif L==4 - "Envoyer convocation à l'examen"; + "Publier convocation"; #elif L==5 - "Enviar convocatoria de examen"; // Okoteve traducción + "Publicar convocatoria"; // Okoteve traducción #elif L==6 - "Invia sessione d'esame"; + "Pubblicare sessione"; #elif L==7 - "Send announcement of exam"; // Potrzebujesz tlumaczenie + "Publikuje zaproszenie"; #elif L==8 - "Enviar chamada para o exame"; + "Publicar chamada"; #endif const char *Txt_Send_message = diff --git a/swad_user.c b/swad_user.c index 83fb5ff07..f32a8ffde 100644 --- a/swad_user.c +++ b/swad_user.c @@ -1337,6 +1337,7 @@ void Usr_WriteFormLogin (void) extern const char *Txt_New_on_PLATFORM_Sign_up; extern const char *Txt_Create_account; extern const char *Txt_Enter_from_X; + extern const char *Txt_User; extern const char *Txt_nick_email_or_ID; extern const char *Txt_Password; extern const char *Txt_Log_in; @@ -1376,7 +1377,8 @@ void Usr_WriteFormLogin (void) "" "" "" + " size=\"25\" maxlength=\"%u\"" + " placeholder=\"%s\" value=\"%s\" />" "" "" "" @@ -1386,12 +1388,13 @@ void Usr_WriteFormLogin (void) "" "" "" + " size=\"25\" maxlength=\"%u\" />" "" "", The_ClassFormul[Gbl.Prefs.Theme], - Txt_nick_email_or_ID, + Txt_User, Usr_MAX_LENGTH_USR_LOGIN, + Txt_nick_email_or_ID, Gbl.Usrs.Me.UsrIdLogin, The_ClassFormul[Gbl.Prefs.Theme], Txt_Password, @@ -1400,7 +1403,9 @@ void Usr_WriteFormLogin (void) /***** Send button and form end *****/ fprintf (Gbl.F.Out,"" "" - "" + "" "" "", Txt_Log_in); @@ -4318,7 +4323,7 @@ static void Usr_PutButtonToConfirmIWantToSeeBigList (unsigned NumUsrs) Par_PutHiddenParamChar ("ShowBigList",'Y'); /***** Send button *****/ - Lay_PutSendButton (Txt_Show_anyway); + Lay_PutConfirmButton (Txt_Show_anyway); Act_FormEnd (); fprintf (Gbl.F.Out,""); } @@ -6382,7 +6387,7 @@ void Usr_SeeGuests (void) Lay_EndRoundFrameTable10 (); /* Send button */ - Lay_PutSendButton (Txt_Show_records); + Lay_PutConfirmButton (Txt_Show_records); Act_FormEnd (); fprintf (Gbl.F.Out,""); } @@ -6548,7 +6553,7 @@ void Usr_SeeStudents (void) /* Send button */ if (ICanViewRecords) { - Lay_PutSendButton (Txt_Show_records); + Lay_PutConfirmButton (Txt_Show_records); Act_FormEnd (); } @@ -6687,7 +6692,7 @@ void Usr_SeeTeachers (void) if (ICanViewRecords) { /* Send button */ - Lay_PutSendButton (Txt_Show_records); + Lay_PutConfirmButton (Txt_Show_records); Act_FormEnd (); }