Skip to content

Commit 41aa3a7

Browse files
committed
5124: Improved stuff
1 parent 37c677d commit 41aa3a7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

web/profiles/custom/os2loop/modules/os2loop_cura_login/os2loop_cura_login.routing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
os2loop_cura_login.start:
22
path: '/os2loop-cura-login/start'
33
defaults:
4-
_title: 'Start login hack'
4+
_title: 'Start Cura login'
55
_controller: '\Drupal\os2loop_cura_login\Controller\Os2loopCuraLoginController::start'
66
methods: [GET, POST]
77
requirements:
@@ -10,7 +10,7 @@ os2loop_cura_login.start:
1010
os2loop_cura_login.authenticate:
1111
path: '/os2loop-login-hack/authenticate'
1212
defaults:
13-
_title: 'Authenticate'
13+
_title: 'Authenticate with Cura login'
1414
_controller: '\Drupal\os2loop_cura_login\Controller\Os2loopCuraLoginController::authenticate'
1515
methods: [GET]
1616
requirements:

web/profiles/custom/os2loop/modules/os2loop_cura_login/src/Form/SettingsForm.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Drupal\Core\Form\ConfigFormBase;
99
use Drupal\Core\Form\FormStateInterface;
1010
use Drupal\Core\Logger\RfcLogLevel;
11+
use Drupal\Core\Url;
1112

1213
/**
1314
* Configure OS2Loop Cura login settings for this site.
@@ -79,6 +80,11 @@ public function buildForm(array $form, FormStateInterface $form_state): array {
7980
'#default_value' => $config->get('log_level') ?? RfcLogLevel::ERROR,
8081
];
8182

83+
$authenticationStartUrl = Url::fromRoute('os2loop_cura_login.start')->setAbsolute()->toString(true)->getGeneratedUrl();
84+
$form['info'] = [
85+
'#markup' => $this->t('Use <a href=":url">:url</a> as <code>linkURL</code>.', [':url' => $authenticationStartUrl]),
86+
];
87+
8288
return parent::buildForm($form, $form_state);
8389
}
8490

0 commit comments

Comments
 (0)