Adopt SummerCMS v0.1.1 admin features
Datepickers on native time.Time / lagoon.Date fields, file uploads on materials, readings and class sessions managed from the course form (course_id made nullable).
This commit is contained in:
@@ -14,9 +14,10 @@ const (
|
||||
PermMaterials = "jz.bm.access_materials"
|
||||
)
|
||||
|
||||
// temporalHooks checks a model's Date and DateTime columns before every admin
|
||||
// save and answers a bad value as a 422 on its field. lagoon.Validate has no
|
||||
// date rules, so the model checks them itself (models.TemporalValidator).
|
||||
// temporalHooks checks the order of a model's dates before every admin save
|
||||
// and answers a bad value as a 422 on its field. lagoon.Validate cannot
|
||||
// compare two fields, so the model checks them itself
|
||||
// (models.TemporalValidator).
|
||||
type temporalHooks struct{}
|
||||
|
||||
func (temporalHooks) FormBeforeCreate(_ context.Context, model any) error {
|
||||
|
||||
Reference in New Issue
Block a user