forked from Plugin-JF-Onkostar/osc-variant
Extract method to apply form field profile part
This commit is contained in:
@@ -30,8 +30,9 @@ use serde::{Deserialize, Serialize};
|
||||
use crate::model::onkostar_editor::OnkostarEditor;
|
||||
use crate::model::requirements::{Requirement, Requires};
|
||||
use crate::model::{
|
||||
apply_profile_to_form_entry, Ansichten, Comparable, Entries, Filter, FolderContent, FormEntry,
|
||||
FormEntryContainer, Listable, MenuCategory, PlausibilityRules, RefEntries, Script, Sortable,
|
||||
apply_profile_to_form_entry, apply_profile_to_form_field, Ansichten, Comparable, Entries,
|
||||
Filter, FolderContent, FormEntry, FormEntryContainer, Listable, MenuCategory,
|
||||
PlausibilityRules, RefEntries, Script, Sortable,
|
||||
};
|
||||
use crate::model::{Haeufigkeiten, Ordner};
|
||||
use crate::profile::Profile;
|
||||
@@ -170,11 +171,10 @@ impl FormEntryContainer for DataForm {
|
||||
});
|
||||
|
||||
// Hide form field using filter set to "false" if requested
|
||||
profile_form.form_fields.iter().for_each(|form_field| {
|
||||
if entry.name == form_field.name && form_field.hide {
|
||||
entry.hide()
|
||||
}
|
||||
});
|
||||
profile_form
|
||||
.form_fields
|
||||
.iter()
|
||||
.for_each(|form_field| apply_profile_to_form_field(entry, form_field));
|
||||
|
||||
if let Some(menu_category) = &profile_form.menu_category {
|
||||
self.menu_category = Some(MenuCategory {
|
||||
|
||||
Reference in New Issue
Block a user