Terms and conditions may not be on the current site as a node

Created on 23 September 2019, almost 5 years ago
Updated 24 July 2023, 11 months ago

The code has a form with a field for a node id to be used as the terms and conditions node:

In commerce_agree_terms/src/Plugin/Commerce/CheckoutPane/AgreeTerms.php:

  $form['nid'] = [
      '#type' => 'entity_autocomplete',
      '#target_type' => 'node',
      '#default_value' => $node,
      '#required' => TRUE,
    ];

However, the terms and conditions may not be a node. Nor are they certain to be on the current site. The current code makes it impossible to enter a URL.

Solution: allow the administrator to enter a link as text, and sanitise it.

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Jeff Veit

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024