diff --git a/swad_changelog.h b/swad_changelog.h
index 84900b330..2cc78521a 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -221,13 +221,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 16.194.6 (2017-04-28)"
+#define Log_PLATFORM_VERSION "SWAD 16.194.7 (2017-04-28)"
#define CSS_FILE "swad16.193.4.css"
#define JS_FILE "swad16.181.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 16.194.7: Apr 28, 2017 Changed dialog to remove record field. (218359 lines)
Version 16.194.6: Apr 28, 2017 Changed dialog to remove an agenda event. (218347 lines)
Version 16.194.5: Apr 28, 2017 Changed dialog to remove a forum thread. (218347 lines)
Version 16.194.4: Apr 28, 2017 Changed dialog to remove an assignment. (218332 lines)
diff --git a/swad_record.c b/swad_record.c
index 7fb1a3d87..174424215 100644
--- a/swad_record.c
+++ b/swad_record.c
@@ -71,6 +71,8 @@ extern struct Globals Gbl;
/*****************************************************************************/
static void Rec_WriteHeadingRecordFields (void);
+
+static void Rec_PutParamFielCod (void);
static void Rec_GetFieldByCod (long FieldCod,char Name[Rec_MAX_BYTES_NAME_FIELD + 1],
unsigned *NumLines,Rec_VisibilityRecordFields_t *Visibility);
@@ -276,7 +278,7 @@ void Rec_ListFieldsRecordsForEdition (void)
fprintf (Gbl.F.Out,"
");
/* Write icon to remove the field */
- fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd);
+ fprintf (Gbl.F.Out," | ");
Act_FormStart (ActReqRemFie);
Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.LstFields.Lst[NumField].FieldCod);
Lay_PutIconRemove ();
@@ -610,7 +612,9 @@ unsigned Rec_CountNumRecordsInCurrCrsWithField (long FieldCod)
/***** Get number of cards with a given field in a course from database *****/
sprintf (Query,"SELECT COUNT(*) FROM crs_records WHERE FieldCod=%ld",
FieldCod);
- return (unsigned) DB_QueryCOUNT (Query,"can not get number of cards with a given field not empty in a course");
+ return (unsigned) DB_QueryCOUNT (Query,"can not get number of cards"
+ " with a given field not empty"
+ " in a course");
}
/*****************************************************************************/
@@ -631,7 +635,8 @@ void Rec_AskConfirmRemFieldWithRecords (unsigned NumRecords)
&Gbl.CurrentCrs.Records.Field.NumLines,
&Gbl.CurrentCrs.Records.Field.Visibility);
- /***** Write mensaje to ask confirmation of deletion *****/
+ /***** Show question and button to remove my photo *****/
+ /* Start alert */
sprintf (Gbl.Message,Txt_Do_you_really_want_to_remove_the_field_X_from_the_records_of_X,
Gbl.CurrentCrs.Records.Field.Name,Gbl.CurrentCrs.Crs.FullName);
if (NumRecords == 1)
@@ -644,13 +649,14 @@ void Rec_AskConfirmRemFieldWithRecords (unsigned NumRecords)
Str_Concat (Gbl.Message,Message_part2,
Lay_MAX_BYTES_ALERT);
}
- Lay_ShowAlert (Lay_WARNING,Gbl.Message);
+ Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Message);
- /***** Button to confirm removing *****/
- Act_FormStart (ActRemFie);
- Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.Field.FieldCod);
- Lay_PutRemoveButton (Txt_Remove_record_field);
- Act_FormEnd ();
+ /* End alert */
+ Lay_ShowAlertAndButton2 (ActRemFie,NULL,Rec_PutParamFielCod,
+ Lay_REMOVE_BUTTON,Txt_Remove_record_field);
+
+ /***** List record fields again *****/
+ Rec_ReqEditRecordFields ();
}
/*****************************************************************************/
@@ -687,6 +693,15 @@ void Rec_RemoveFieldFromDB (void)
Rec_ReqEditRecordFields ();
}
+/*****************************************************************************/
+/********************** Put parameter with field code ************************/
+/*****************************************************************************/
+
+static void Rec_PutParamFielCod (void)
+ {
+ Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.Field.FieldCod);
+ }
+
/*****************************************************************************/
/************** Get the data of a field of records from its code *************/
/*****************************************************************************/
|