Version 15.202.11

This commit is contained in:
Antonio Cañas Vargas 2016-04-23 14:36:02 +02:00
parent b4875e69eb
commit 82110dc74b
2 changed files with 42 additions and 25 deletions

View File

@ -134,13 +134,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.202.10 (2016-04-23)"
#define Log_PLATFORM_VERSION "SWAD 15.202.11 (2016-04-23)"
#define CSS_FILE "swad15.202.css"
#define JS_FILE "swad15.197.js"
// 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 15.202.11:Apr 23, 2016 Code refactoring in record card. (201014 lines)
Version 15.202.10:Apr 23, 2016 Code refactoring in record card. (201000 lines)
Version 15.202.9: Apr 23, 2016 Code refactoring in record card. (200987 lines)
Version 15.202.8: Apr 23, 2016 Code refactoring in record card. (200979 lines)

View File

@ -128,6 +128,9 @@ static void Rec_ShowLocalPhone (struct UsrData *UsrDat,
static void Rec_ShowFamilyAddress (struct UsrData *UsrDat,
bool ShowData,bool DataForm,
const char *ClassForm);
static void Rec_ShowFamilyPhone (struct UsrData *UsrDat,
bool ShowData,bool DataForm,
const char *ClassForm);
static void Rec_WriteLinkToDataProtectionClause (void);
@ -2154,30 +2157,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
/***** Family address *****/
Rec_ShowFamilyAddress (UsrDat,ShowData,DataForm,ClassForm);
/* Family phone */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\""
" style=\"width:%upx;\">"
"%s:"
"</td>"
"<td class=\"REC_DAT_BOLD LEFT_MIDDLE\""
" style=\"width:%upx;\">",
ClassForm,Rec_C1_BOTTOM,Txt_Phone,
Rec_C2_BOTTOM);
if (ShowData)
{
if (DataForm)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FamilyPhone\""
" maxlength=\"%u\" value=\"%s\""
" style=\"width:%upx;\" />",
Usr_MAX_LENGTH_PHONE,
UsrDat->FamilyPhone,
Rec_C2_BOTTOM - 20);
else if (UsrDat->FamilyPhone[0])
fprintf (Gbl.F.Out,"%s",UsrDat->FamilyPhone);
}
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/***** Family phone *****/
Rec_ShowFamilyPhone (UsrDat,ShowData,DataForm,ClassForm);
/* Common comments for all the courses */
fprintf (Gbl.F.Out,"<tr>"
@ -3377,6 +3358,41 @@ static void Rec_ShowFamilyAddress (struct UsrData *UsrDat,
"</tr>");
}
/*****************************************************************************/
/************************ Show user's family phone ***************************/
/*****************************************************************************/
static void Rec_ShowFamilyPhone (struct UsrData *UsrDat,
bool ShowData,bool DataForm,
const char *ClassForm)
{
extern const char *Txt_Phone;
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\""
" style=\"width:%upx;\">"
"%s:"
"</td>"
"<td class=\"REC_DAT_BOLD LEFT_MIDDLE\""
" style=\"width:%upx;\">",
ClassForm,Rec_C1_BOTTOM,Txt_Phone,
Rec_C2_BOTTOM);
if (ShowData)
{
if (DataForm)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FamilyPhone\""
" maxlength=\"%u\" value=\"%s\""
" style=\"width:%upx;\" />",
Usr_MAX_LENGTH_PHONE,
UsrDat->FamilyPhone,
Rec_C2_BOTTOM - 20);
else if (UsrDat->FamilyPhone[0])
fprintf (Gbl.F.Out,"%s",UsrDat->FamilyPhone);
}
fprintf (Gbl.F.Out,"</td>"
"</tr>");
}
/*****************************************************************************/
/*********************** Write a link to netiquette rules ********************/
/*****************************************************************************/