public static ModelFieldsAccessibility DefaultCouncilFieldsInfo(ModelFieldsAccessibility.Kind?defaultKind = null)
        {
            ModelFieldsAccessibility fieldsInfo = DefaultFieldsInfo(defaultKind);

            fieldsInfo.MarkComplexBatch(
                () => EmailForm.DefaultFieldsInfo(ModelFieldsAccessibility.Kind.Editable),
                new[]
            {
                nameof(NominationsAlmostOverEmail),
                nameof(VotingStartedEmail),
                nameof(VotingAlmostOverEmail),
            }
                );

            return(fieldsInfo);
        }
Exemple #2
0
        public static ModelFieldsAccessibility DefaultFieldsInfo(ModelFieldsAccessibility.Kind?defaultKind = null)
        {
            ModelFieldsAccessibility fieldsInfo = new ModelFieldsAccessibility
            {
                DefaultKind = defaultKind
            };

            fieldsInfo.MarkComplex(nameof(Nominations), ElectionPhaseForm.DefaultFieldsInfo(defaultKind));
            fieldsInfo.MarkComplex(nameof(Voting), ElectionPhaseForm.DefaultFieldsInfo(defaultKind));

            fieldsInfo.MarkComplexBatch(
                () => EmailForm.DefaultFieldsInfo(ModelFieldsAccessibility.Kind.Editable),
                new[]
            {
                nameof(NominationsStartedEmail),
                nameof(PostNominationsEmail),
                nameof(PostVotingEmail),
                nameof(ResultsPublishedEmail),
            }
                );

            return(fieldsInfo);
        }