Commit adb2b2f6 authored by CeraRose's avatar CeraRose Committed by jrockowitz

Issue #2989270 by JKerschner: Various nonfunctional typo fixes

parent 1d4f70d3
......@@ -6,7 +6,7 @@
*/
/**
* Verticall center range input.
* Vertical center range input.
*/
.form-type-range input[type="range"] {
display: table-cell;
......
......@@ -18,7 +18,7 @@ use Drupal\webform\WebformInterface;
* done via an update hook.
*
* @param bool $reset
* If set TRUE old admin settings will be completly deleted.
* If set TRUE old admin settings will be completely deleted.
*
* @see drush_webform_repair()
*/
......
......@@ -1016,7 +1016,7 @@ function webform_update_8046() {
* Webform config data.
*
* @return array
* Webform config data with 'webfor_actions' element.
* Webform config data with 'webform_actions' element.
*/
function _webform_update_8046_convert_data(array $data) {
$button_names = [
......@@ -1200,7 +1200,7 @@ function webform_update_8057() {
}
/**
* Issue #2888076: Redirect users to login page when trying to access the a protected webform file.
* Issue #2888076: Redirect users to login page when trying to access a protected webform file.
*/
function webform_update_8058() {
_webform_update_admin_settings();
......@@ -2420,7 +2420,7 @@ function webform_update_8136() {
* Update #counter_* attributes.
*
* Replace 'X' in counter message with '%d' and
* move '#counter_message' to '#counter_maxiumum_message'.
* move '#counter_message' to '#counter_maximum_message'.
*
* @param array $element
* A form element.
......
......@@ -2,7 +2,7 @@
/**
* @file
* Theme hooks, preprocessor, and suggesttions.
* Theme hooks, preprocessor, and suggestions.
*/
use Drupal\file\Entity\File;
......
......@@ -481,8 +481,8 @@ function _template_progress_webform_set_title(array &$variables, $strip_tags = F
* - current_page: The current wizard page.
*/
function template_preprocess_webform_progress(array &$variables) {
/** @var \Drupal\webform\WebformLibrariesManagerInterface $libaries_manager */
$libaries_manager = \Drupal::service('webform.libraries_manager');
/** @var \Drupal\webform\WebformLibrariesManagerInterface $libraries_manager */
$libraries_manager = \Drupal::service('webform.libraries_manager');
/** @var \Drupal\webform\WebformInterface $webform */
$webform = $variables['webform'];
......@@ -499,7 +499,7 @@ function template_preprocess_webform_progress(array &$variables) {
if ($webform->getSetting('wizard_progress_bar')) {
$variables['bar'] = [
'#theme' => ($libaries_manager->isIncluded('progress-tracker')) ? 'webform_progress_tracker' : 'webform_progress_bar',
'#theme' => ($libraries_manager->isIncluded('progress-tracker')) ? 'webform_progress_tracker' : 'webform_progress_bar',
'#webform' => $webform,
'#current_page' => $current_page,
'#operation' => $operation,
......
......@@ -22,7 +22,7 @@
var $form = $(this);
var $tabs = $form.find('.webform-tabs');
// Get only the main details elements and ingnore all nested details.
// Get only the main details elements and ignore all nested details.
var selector = ($tabs.length) ? '.webform-tab' : '.js-webform-details-toggle';
var $details = $form.find('details').filter(function() {
// @todo Figure out how to optimize the below code.
......
......@@ -73,7 +73,7 @@
});
// Input onchange clears signature pad if value is empty.
// Onchage events handlers are triggered when a webform is
// Onchange events handlers are triggered when a webform is
// hidden or shown.
// @see webform.states.js
// @see triggerEventHandlers()
......
......@@ -19,7 +19,7 @@
};
/**
* Boostrap element help icon.
* Bootstrap element help icon.
*
* @type {Drupal~behavior}
*/
......
......@@ -167,7 +167,7 @@ class WebformImageSelectImages extends ConfigEntityBase implements WebformImageS
$images = [];
}
// Alter iamges using hook_webform_image_select_images_alter()
// Alter images using hook_webform_image_select_images_alter()
// and/or hook_webform_image_select_images_WEBFORM_IMAGE_SELECT_IMAGES_ID_alter() hook.
// @see webform.api.php
\Drupal::moduleHandler()->alter('webform_image_select_images_' . $id, $images, $element);
......
......@@ -34,7 +34,7 @@ interface WebformImageSelectImagesInterface extends ConfigEntityInterface {
* A webform image select element.
*
* @return array
* An associative array of iamge.
* An associative array of images.
*/
public static function getElementImages(array &$element);
......
......@@ -113,18 +113,18 @@ class WebformNodeReferencesListController extends EntityListBuilder implements C
* The node type storage class.
* @param \Drupal\Core\Config\Entity\ConfigEntityStorageInterface $field_config_storage
* The field config storage class.
* @param \Drupal\webform\WebformSubmissionStorageInterface $webform_submsision_storage
* @param \Drupal\webform\WebformSubmissionStorageInterface $webform_submission_storage
* The webform submission storage class.
* @param \Drupal\webform\WebformEntityReferenceManagerInterface $webform_entity_reference_manager
* The webform entity reference manager.
*/
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, DateFormatterInterface $date_formatter, ConfigEntityStorageInterface $node_type_storage, ConfigEntityStorageInterface $field_config_storage, WebformSubmissionStorageInterface $webform_submsision_storage, WebformEntityReferenceManagerInterface $webform_entity_reference_manager) {
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, DateFormatterInterface $date_formatter, ConfigEntityStorageInterface $node_type_storage, ConfigEntityStorageInterface $field_config_storage, WebformSubmissionStorageInterface $webform_submission_storage, WebformEntityReferenceManagerInterface $webform_entity_reference_manager) {
parent::__construct($entity_type, $storage);
$this->dateFormatter = $date_formatter;
$this->nodeTypeStorage = $node_type_storage;
$this->fieldConfigStorage = $field_config_storage;
$this->submissionStorage = $webform_submsision_storage;
$this->submissionStorage = $webform_submission_storage;
$this->webformEntityReferenceManager = $webform_entity_reference_manager;
$this->nodeTypes = [];
......
......@@ -29,7 +29,7 @@ class WebformNodeAccessTest extends WebformNodeTestBase {
}
/**
* Tests webform node access perimissions.
* Tests webform node access permissions.
*
* @see \Drupal\webform\Tests\WebformSubmissionAccessTest::testWebformSubmissionAccessPermissions
*/
......
......@@ -52,7 +52,7 @@ class WebformNodeUninstallTest extends KernelTestBase {
$node = Node::create(['title' => $this->randomString(), 'type' => 'webform']);
$node->save();
// Check webform node module can't be ininstalled.
// Check webform node module can't be uninstalled.
$validation_reasons = \Drupal::service('module_installer')->validateUninstall(['webform_node']);
$this->assertEqual(['To uninstall Webform node, delete all content that has the Webform content type.'], $validation_reasons['webform_node']);
......
......@@ -44,7 +44,7 @@ class WebformScheduledEmailController extends ControllerBase implements Containe
* Runs cron task for webform scheduled email handler.
*
* @param \Drupal\webform\WebformInterface $webform
* The webform containg a scheduled email handler.
* The webform containing a scheduled email handler.
* @param string|null $handler_id
* A webform handler id.
*
......
......@@ -10,7 +10,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides the webform templates filter webform.
*/
class WebformtemplatesFilterForm extends FormBase {
class WebformTemplatesFilterForm extends FormBase {
/**
* {@inheritdoc}
......
......@@ -175,7 +175,7 @@ thead th .dropbutton {
}
/**
* Element (/admin/structure/webform/manage/[webform_id]/element/add/[elment_type])
* Element (/admin/structure/webform/manage/[webform_id]/element/add/[element_type])
* @see \Drupal\webform\Plugin\WebformElementBase::form
*/
.form--inline.webform-ui-element-form-inline--input .form-item {
......
......@@ -143,7 +143,7 @@ abstract class WebformUiElementTypeFormBase extends FormBase {
}
/**
* Never trigge validation.
* Never trigger validation.
*/
public function noValidate(array &$form, FormStateInterface $form_state) {
$form_state->clearErrors();
......
......@@ -15,7 +15,7 @@ class WebformSubmissionAccess {
* Check whether a webform submissions' webform has wizard pages.
*
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submisison.
* A webform submission.
*
* @return \Drupal\Core\Access\AccessResultInterface
* The access result.
......
......@@ -40,7 +40,7 @@ class WebformContributeController extends ControllerBase implements ContainerInj
protected $contributeManager;
/**
* Constructs a WebfomrContributeController object.
* Constructs a WebformContributeController object.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The configuration object factory.
......
......@@ -33,7 +33,7 @@ class WebformPluginHandlerController extends ControllerBase implements Container
protected $pluginManager;
/**
* Constructs a WebformPluginHanderController object.
* Constructs a WebformPluginHandlerController object.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The factory for configuration objects.
......
......@@ -257,7 +257,7 @@ class WebformCodeMirror extends Textarea {
$template = $element['#value'];
$form_object = $form_state->getFormObject();
try {
// If form object has getWebform mehthod. validate Twig template
// If form object has getWebform method. validate Twig template
// using a temporary webform submission context.
if (method_exists($form_object, 'getWebform')) {
/** @var \Drupal\webform\WebformInterface $webform */
......
......@@ -32,7 +32,7 @@ class WebformLikert extends FormElement {
'#sticky' => TRUE,
'#questions' => [],
'#questions_description_display' => 'description',
// Using #answers insteads of #options to prevent triggering
// Using #answers instead of #options to prevent triggering
// \Drupal\Core\Form\FormValidator::performRequiredValidation().
'#answers' => [],
'#answers_description_display' => 'description',
......@@ -155,7 +155,7 @@ class WebformLikert extends FormElement {
// so that it can hidden but accessible to screen readers
// when Likert is displayed in grid on desktop.
// Wrap help and description in
// span.webform-likert-(help|description).hidden to block screeen
// span.webform-likert-(help|description).hidden to block screen
// readers except on mobile.
// @see webform.element.likert.css
$row[$answer_key]['#title_display'] = 'after';
......
......@@ -17,7 +17,7 @@ if (class_exists('\Drupal\file\Element\ManagedFile')) {
abstract class WebformManagedFileBase extends ManagedFile {
/**
* The the types of files that the server accepts.
* The types of files that the server accepts.
*
* @var string
*
......
......@@ -300,7 +300,7 @@ class WebformMultiple extends FormElement {
* @param array $sub_elements
* The sub element.
* @param array $required_states
* An associative array of required states froim the main element's
* An associative array of required states from the main element's
* visible/hidden states.
*/
protected static function initializeElementRecursive(array $element, FormStateInterface $form_state, array &$complete_form, array &$sub_elements, array $required_states) {
......@@ -662,7 +662,7 @@ class WebformMultiple extends FormElement {
}
/**
* Set element row default value recusively.
* Set element row default value recursively.
*
* @param array $element
* The element.
......@@ -679,7 +679,7 @@ class WebformMultiple extends FormElement {
}
/**
* Set element row default value recusively.
* Set element row default value recursively.
*
* @param array $element
* The element.
......
......@@ -80,7 +80,7 @@ class WebformSubmissionDeleteForm extends ContentEntityDeleteForm {
protected function actions(array $form, FormStateInterface $form_state) {
// Issue #2582295: Confirmation cancel links are incorrect if installed in
// a subdirectory
// Work-around: Remove sudirectory from destination before generating
// Work-around: Remove subdirectory from destination before generating
// actions.
$request = $this->getRequest();
$destination = $request->query->get('destination');
......
......@@ -103,7 +103,7 @@ abstract class WebformEntityReferenceFormatterBase extends EntityReferenceFormat
$config = \Drupal::config('webform.settings');
\Drupal::service('renderer')->addCacheableDependency($elements, $config);
// Track if the webfor is updated.
// Track if the webform is updated.
\Drupal::service('renderer')->addCacheableDependency($elements, $webform);
// Calculate the max-age based on the open/close data/time for the item
......
......@@ -93,7 +93,7 @@ class Range extends NumericBase {
$properties = ['#min', '#max', '#step', '#disabled'];
$output += array_intersect_key($element, array_combine($properties, $properties));
// Copy custom output properties to ouput element.
// Copy custom output properties to output element.
foreach ($element as $key => $value) {
if (strpos($key, '#output__') === 0) {
$output_key = str_replace('#output__', '#', $key);
......
......@@ -14,7 +14,7 @@ use Drupal\webform\WebformInterface;
use Drupal\webform\WebformSubmissionInterface;
/**
* Provides a base clase for 'webform_computed' elements.
* Provides a base class for 'webform_computed' elements.
*/
abstract class WebformComputedBase extends WebformElementBase implements WebformElementDisplayOnInterface {
......
......@@ -862,7 +862,7 @@ class EmailWebformHandler extends WebformHandlerBase implements WebformHandlerMe
if ($this->configuration['html'] && $this->supportsHtml()) {
// Apply optional global format to body.
// NOTE: $message['body'] is not passed-thru Xss::filter() to allow
// style tags to be supoported.
// style tags to be supported.
if ($format = $this->configFactory->get('webform.settings')->get('html_editor.mail_format')) {
$build = [
'#type' => 'processed_text',
......@@ -918,7 +918,7 @@ class EmailWebformHandler extends WebformHandlerBase implements WebformHandlerMe
$emails[] = $email_options[self::DEFAULT_OPTION];
}
// Get submission email addresseses as an array.
// Get submission email addresses as an array.
$options_element_value = $webform_submission->getElementData($element_name);
if (is_array($options_element_value)) {
$options_values = $options_element_value;
......@@ -1329,7 +1329,7 @@ class EmailWebformHandler extends WebformHandlerBase implements WebformHandlerMe
}
/**
* Build A select other element for email addresss and names.
* Build A select other element for email address and names.
*
* @param string $name
* The element's key.
......@@ -1489,10 +1489,10 @@ class EmailWebformHandler extends WebformHandlerBase implements WebformHandlerMe
$mapping_options[self::DEFAULT_OPTION] = $this->t('Default (This email address will always be included)');
// Set placeholder emails.
$destination_placeholde_emails = ['example@example.com', '[site:mail]'];
$destination_placeholder_emails = ['example@example.com', '[site:mail]'];
if ($role_options) {
$role_names = array_keys($role_options);
$destination_placeholde_emails[] = ($role_names[0] === '[webform_role:authenticated]' && isset($role_names[1])) ? $role_names[1] : $role_names[0];
$destination_placeholder_emails[] = ($role_names[0] === '[webform_role:authenticated]' && isset($role_names[1])) ? $role_names[1] : $role_names[0];
}
$element[$options_name] = [
'#type' => 'webform_mapping',
......@@ -1510,7 +1510,7 @@ class EmailWebformHandler extends WebformHandlerBase implements WebformHandlerMe
'#destination__allow_tokens' => TRUE,
'#destination__title' => $this->t('Email addresses'),
'#destination__description' => NULL,
'#destination__placeholder' => implode(', ', $destination_placeholde_emails),
'#destination__placeholder' => implode(', ', $destination_placeholder_emails),
];
}
else {
......
......@@ -76,7 +76,7 @@ class RemotePostWebformHandler extends WebformHandlerBase {
protected $elementManager;
/**
* List of unsupported webforem submission properties.
* List of unsupported webform submission properties.
*
* The below properties will not being included in a remote post.
*
......@@ -629,10 +629,10 @@ class RemotePostWebformHandler extends WebformHandlerBase {
}
/**
* Determine if converting anoynmous submissions to authenticated is enabled.
* Determine if converting anonymous submissions to authenticated is enabled.
*
* @return bool
* TRUE if converting anoynmous submissions to authenticated is enabled.
* TRUE if converting anonymous submissions to authenticated is enabled.
*/
protected function isConvertEnabled() {
return $this->isDraftEnabled() && ($this->getWebform()->getSetting('form_convert_anonymous') === TRUE);
......
......@@ -104,7 +104,7 @@ abstract class WebformHandlerBase extends PluginBase implements WebformHandlerIn
* webform. Make sure not include any services as a dependency injection
* that directly connect to the database. This will prevent
* "LogicException: The database connection is not serializable." exceptions
* from being thrown when a form is serialized via an Ajax callaback and/or
* from being thrown when a form is serialized via an Ajax callback and/or
* form build.
*
* @param array $configuration
......
......@@ -14,7 +14,7 @@ class WebformRouteSubscriber extends RouteSubscriberBase {
* {@inheritdoc}
*/
protected function alterRoutes(RouteCollection $collection) {
// Reove 'Contribute' route if explicitly disabled or the Contribute module
// Remove 'Contribute' route if explicitly disabled or the Contribute module
// is installed.
if (\Drupal::config('webform.settings')->get('ui.contribute_disabled') || \Drupal::moduleHandler()->moduleExists('contribute')) {
$collection->remove('webform.contribute');
......
......@@ -3,7 +3,7 @@
namespace Drupal\webform\Tests\Element;
/**
* Tests for webform element radioss.
* Tests for webform element radios.
*
* @group Webform
*/
......
......@@ -60,7 +60,7 @@ class WebformHandlerEmailMappingTest extends WebformTestBase {
$this->assertText("Checkboxes sent to saturday@example.com,sunday@example.com from $site_name [$site_mail].");
$this->assertNoText('Email not sent for Checkboxes handler because a To, CC, or BCC email was not provided.');
// Check that checkbxoes other option email sent.
// Check that checkboxes other option email sent.
$edit = [
'radios_other[radios]' => '_other_',
'radios_other[other]' => '{Other}',
......
......@@ -69,7 +69,7 @@ class WebformSettingsConfidentialTest extends WebformTestBase {
$this->drupalGet('webform/test_form_confidential');
$this->assertRaw('View your previous submission');
// Check that anonymous submissison is not converted to authenticated.
// Check that anonymous submission is not converted to authenticated.
// @see \Drupal\webform\WebformSubmissionStorage::userLogin
$this->drupalLogin($this->rootUser);
$webform_submission = $this->loadSubmission($sid);
......
......@@ -64,7 +64,7 @@ class WebformWizardLinksTest extends WebformWizardTestBase {
->setSetting('wizard_preview_link', TRUE)
->save();
// Check progess bar is not linked.
// Check progress bar is not linked.
$this->drupalGet('webform/test_form_wizard_links');
$this->assertNoCssSelect('.webform-wizard-pages-links[data-wizard-progress-link="true"]');
$this->assertCssSelect('.webform-wizard-pages-links[data-wizard-preview-link="true"]');
......
......@@ -3,7 +3,7 @@
namespace Drupal\webform\Utility;
/**
* Helper class webform accessiblity methods.
* Helper class webform accessibility methods.
*/
class WebformAccessibilityHelper {
......
......@@ -471,7 +471,7 @@ class WebformContributeManager implements WebformContributeManagerInterface {
* The remote URI.
*
* @return mixed|null
* The returned data. Tequests to *.json files will be decoded.
* The returned data. Requests to *.json files will be decoded.
*/
protected function get($uri) {
if (isset($this->cachedData[$uri])) {
......
......@@ -333,7 +333,7 @@ class WebformSubmissionConditionsValidator implements WebformSubmissionCondition
foreach ($conditions as $index => $value) {
if (is_string($value) && in_array($value, ['and', 'or', 'xor'])) {
$condition_logic = $value;
// If OR conditional logic operatator, check current condition
// If OR conditional logic operator, check current condition
// results.
if ($condition_logic === 'or' && array_sum($condition_results)) {
return TRUE;
......@@ -370,7 +370,7 @@ class WebformSubmissionConditionsValidator implements WebformSubmissionCondition
foreach ($condition as $sub_condition) {
$sub_condition_results[] = $this->checkCondition($element, $selector, $sub_condition, $webform_submission);
}
// Evalute sub-conditions using the 'OR' operator.
// Evaluate sub-conditions using the 'OR' operator.
$condition_results[$selector] = (boolean) array_sum($sub_condition_results);
}
else {
......
......@@ -113,7 +113,7 @@ interface WebformSubmissionExporterInterface {
/**
* Get the values from the webform's user input or webform state values.
*
* @paran array $input
* @param array $values
* An associative array of user input or webform state values.
*
* @return array
......
......@@ -354,7 +354,7 @@ interface WebformSubmissionInterface extends ContentEntityInterface, EntityOwner
* Gets the webform submission's secure tokenized URL.
*
* @return \Drupal\Core\Url
* The the webform submission's secure tokenized URL.
* The webform submission's secure tokenized URL.
*/
public function getTokenUrl();
......@@ -375,7 +375,7 @@ interface WebformSubmissionInterface extends ContentEntityInterface, EntityOwner
public function invokeWebformElements($method);
/**
* Convert anonymous submission to authenicated.
* Convert anonymous submission to authenticated.
*
* @param \Drupal\user\UserInterface $account
* An authenticated user account.
......
......@@ -1325,7 +1325,7 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor
}
/**
* Get anonymous users sumbmission ids.
* Get anonymous user's submission ids.
*
* @param \Drupal\Core\Session\AccountInterface|null $account
* A user account.
......
......@@ -8,7 +8,7 @@ use Drupal\Core\Theme\ThemeManagerInterface;
use Drupal\Core\Theme\ThemeInitializationInterface;
/**
* Defines a class to manage webform themeing.
* Defines a class to manage webform theming.
*/
class WebformThemeManager implements WebformThemeManagerInterface {
......
......@@ -59,10 +59,10 @@ class WebformFormHelperTest extends UnitTestCase {
],
],
];
$flattenend_elements = WebformFormHelper::flattenElements($elements);
$flattened_elements = WebformFormHelper::flattenElements($elements);
// Check flattened elements.
$this->assertEquals($flattenend_elements, [
$this->assertEquals($flattened_elements, [
'one' => [
'#title' => 'one',
'two' => [
......@@ -79,7 +79,7 @@ class WebformFormHelperTest extends UnitTestCase {
$elements['one']['two']['#title'] .= '-UPDATED';
$elements['one']['two']['#type'] = 'textfield';
$this->assertEquals($flattenend_elements, [
$this->assertEquals($flattened_elements, [
'one' => [
'#title' => 'one-UPDATED',
'two' => [
......@@ -105,8 +105,8 @@ class WebformFormHelperTest extends UnitTestCase {
'#title' => 'two-SECOND',
],
];
$flattenend_elements = WebformFormHelper::flattenElements($elements);
$this->assertEquals($flattenend_elements, [
$flattened_elements = WebformFormHelper::flattenElements($elements);
$this->assertEquals($flattened_elements, [
'one' => [
'#title' => 'one',
'two' => [
......@@ -128,7 +128,7 @@ class WebformFormHelperTest extends UnitTestCase {
$elements['one']['two']['#title'] .= '-UPDATED';
$elements['one']['two']['#type'] = 'textfield';
$this->assertEquals($flattenend_elements, [
$this->assertEquals($flattened_elements, [
'one' => [
'#title' => 'one-UPDATED',
'two' => [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment