🇦🇺Australia brettsh
🇦🇺Australia brettsh
Eventually, I discovered there was a 'change' cmd I could use. So all I needed to dynamically update the field was:
function my_module_address_ajax_callback(array &$form, FormStateInterface $form_state) {
$response = new AjaxResponse();
// Set the individual sub-fields
$form['my_address']['postal_code']['#value'] = $postal_code;
...
// Trigger a change event on the address field to reformat it.
$response->addCommand(new InvokeCommand('[id^="edit-my-address"]', 'change'));
return $response;
🇦🇺Australia brettsh
🇦🇺Australia brettsh
brettsh → created an issue.
💬 | Translate Drupal with GTranslate | Add: Chamorro, Chuukese, Fijian, Marshallese, Tahitian, Tok Pisin, and Tongan
🇦🇺Australia brettsh
💬 | Translate Drupal with GTranslate | Add: Chamorro, Chuukese, Fijian, Marshallese, Tahitian, Tok Pisin, and Tongan
🇦🇺Australia brettsh
brettsh → created an issue.
💬 | SAML Service Provider | Possible to Find Which IdP Within hook_saml_sp_drupal_login_user_attributes_alter?
🇦🇺Australia brettsh
💬 | SAML Service Provider | Possible to Find Which IdP Within hook_saml_sp_drupal_login_user_attributes_alter?
🇦🇺Australia brettsh
💬 | SAML Service Provider | Possible to Find Which IdP Within hook_saml_sp_drupal_login_user_attributes_alter?
🇦🇺Australia brettsh
Well... it's not pretty, but I ended up placing the IdP clas in the session.
I created a class MyModuleSamlSPDrupalLoginController that extended SamlSPDrupalLoginController
Stored $idp in the session:
public function initiate(Idp $idp) {
$_SESSION['my_module_idp'] = $idp;
...
And altered the login route:
protected function alterRoutes(RouteCollection $collection) {
if($route = $collection->get('saml_sp_drupal_login.login')) {
$route->setDefault('_controller', '\Drupal\stv_saml\Controller\StvSamlSPDrupalLoginController::initiate');
}
}
💬 | SAML Service Provider | Possible to Find Which IdP Within hook_saml_sp_drupal_login_user_attributes_alter?
🇦🇺Australia brettsh
💬 | SAML Service Provider | Possible to Find Which IdP Within hook_saml_sp_drupal_login_user_attributes_alter?
🇦🇺Australia brettsh
💬 | SAML Service Provider | Possible to Find Which IdP Within hook_saml_sp_drupal_login_user_attributes_alter?
🇦🇺Australia brettsh
💬 | SAML Service Provider | Possible to Find Which IdP Within hook_saml_sp_drupal_login_user_attributes_alter?
🇦🇺Australia brettsh
BrettSh → created an issue.