1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-22 14:23:05 +02:00

Update ProcessProfile so that Tfa class can add hooks when needed

This commit is contained in:
Ryan Cramer
2020-06-26 09:38:49 -04:00
parent f4642e5fd3
commit 735c118910

View File

@@ -173,6 +173,11 @@ class ProcessProfile extends Process implements ConfigurableModule, WirePageEdit
}
} else if($field->name === 'tfa_type') {
$passRequiredInputfields[] = $inputfield;
if(!$inputfield->val()) {
// initialize manually so it can add hooks (it just does some visual/wording tweaks)
$tfa = $this->wire(new Tfa()); /** @var Tfa $tfa */
$tfa->init();
}
}
$fieldset->add($inputfield);