X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fthemes%2Fcontrib%2Fbootstrap%2Fsrc%2FPlugin%2FSetting%2FAdvanced%2FCdn%2FCdnProvider.php;fp=web%2Fthemes%2Fcontrib%2Fbootstrap%2Fsrc%2FPlugin%2FSetting%2FAdvanced%2FCdn%2FCdnProvider.php;h=078e21160db044d69874be0e201c11abf15921d0;hp=452bbc47ad6d5900978c0644962898d8251133bb;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/themes/contrib/bootstrap/src/Plugin/Setting/Advanced/Cdn/CdnProvider.php b/web/themes/contrib/bootstrap/src/Plugin/Setting/Advanced/Cdn/CdnProvider.php index 452bbc47a..078e21160 100644 --- a/web/themes/contrib/bootstrap/src/Plugin/Setting/Advanced/Cdn/CdnProvider.php +++ b/web/themes/contrib/bootstrap/src/Plugin/Setting/Advanced/Cdn/CdnProvider.php @@ -1,19 +1,14 @@ getValue('cdn_provider', $this->theme->getSetting('cdn_provider')); $group = $this->getGroupElement($form, $form_state); - $group->setProperty('description', '
' . t('NOTE') . ': ' . t('Using one of the "CDN Provider" options below is the preferred method for loading Bootstrap CSS and JS on simpler sites that do not use a site-wide CDN. Using a "CDN Provider" for loading Bootstrap, however, does mean that it depends on a third-party service. There is no obligation or commitment by these third-parties that guarantees any up-time or service quality. If you need to customize Bootstrap and have chosen to compile the source code locally (served from this site), you must disable the "CDN Provider" option below by choosing "- None -" and alternatively enable a site-wide CDN implementation. All local (served from this site) versions of Bootstrap will be superseded by any enabled "CDN Provider" below. Do not do both.') . '
'); + $description_label = $this->t('NOTE'); + $description = $this->t('Using one of the "CDN Provider" options below is the preferred method for loading Bootstrap CSS and JS on simpler sites that do not use a site-wide CDN. Using a "CDN Provider" for loading Bootstrap, however, does mean that it depends on a third-party service. There is no obligation or commitment by these third-parties that guarantees any up-time or service quality. If you need to customize Bootstrap and have chosen to compile the source code locally (served from this site), you must disable the "CDN Provider" option below by choosing "- None -" and alternatively enable a site-wide CDN implementation. All local (served from this site) versions of Bootstrap will be superseded by any enabled "CDN Provider" below. Do not do both.'); + $group->setProperty('description', '
' . $description_label . ': ' . $description . '
'); $group->setProperty('open', !!$default_provider); // Intercept possible manual import of API data via AJAX callback. @@ -137,11 +139,13 @@ class CdnProvider extends SettingBase { // Indicate there was an error retrieving the provider's API data. if ($provider->hasError() || $provider->isImported()) { if ($provider->hasError()) { + $description_label = $this->t('ERROR'); + $description = $this->t('Unable to reach or parse the data provided by the @title API. Ensure the server this website is hosted on is able to initiate HTTP requests. If the request consistently fails, it is likely that there are certain PHP functions that have been disabled by the hosting provider for security reasons. It is possible to manually copy and paste the contents of the following URL into the "Imported @title data" section below.

:provider_api.', [ + '@title' => $provider->getLabel(), + ':provider_api' => $provider->getApi(), + ]); $group->$plugin_id->error = [ - '#markup' => '
' . t('ERROR') . ': ' . t('Unable to reach or parse the data provided by the @title API. Ensure the server this website is hosted on is able to initiate HTTP requests. If the request consistently fails, it is likely that there are certain PHP functions that have been disabled by the hosting provider for security reasons. It is possible to manually copy and paste the contents of the following URL into the "Imported @title data" section below.

:provider_api.', [ - '@title' => $provider->getLabel(), - ':provider_api' => $provider->getApi(), - ]) . '
', + '#markup' => '
' . $description_label . ': ' . $description . '
', '#weight' => -20, ]; }