Skip to content

Commit 32870d1

Browse files
committed
v2.0.0-beta.18
1 parent f51c6d8 commit 32870d1

File tree

23 files changed

+42
-41
lines changed

23 files changed

+42
-41
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Solspace Freeform Changelog
22

3+
## 2.0.0-beta.18 - 2018-05-02
4+
### Changed
5+
- Updated Composer to no longer have a default Form Name, and also auto-generate a Form Handle based on the Form Name.
6+
7+
### Fixed
8+
- Fixed a bug where clicking the Settings link from the Plugins list was not rerouted correctly.
9+
- Fixed a bug where the Spam Folder API queue migration did not account for prefixed database tables.
10+
- Fixed a bug where updates could error if you updated Pro before Lite.
11+
- Fixed a bug where fields with numeric options were not always using the correct values.
12+
313
## 2.0.0-beta.17 - 2018-05-01
414
### Added
515
- Added field option Element and Data Feeders for Checkbox group, Radio group, Select and Multi-select fieldtypes. You can now populate these fields with Entries, Categories, Tags, Users, or one of our many predefined options: States, Provinces, Countries, Languages, Number ranges, Year ranges, Months, Days and Days of the Week. Freeform Data Feeders also offer flexible control over formatting and/or which data fills option labels and option values.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "solspace/craft3-freeform",
33
"description": "The most intuitive and powerful form builder for Craft.",
4-
"version": "2.0.0-beta.17",
4+
"version": "2.0.0-beta.18",
55
"type": "craft-plugin",
66
"minimum-stability": "dev",
77
"authors": [
@@ -29,7 +29,7 @@
2929
}
3030
},
3131
"extra": {
32-
"schemaVersion": "2.0.8",
32+
"schemaVersion": "2.0.9",
3333
"handle": "freeform",
3434
"class": "Solspace\\Freeform\\Freeform",
3535
"name": "Freeform Lite",

src/Controllers/CrmController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function actionIndex(): Response
5959
\Craft::$app->view->registerAssetBundle(CrmBundle::class);
6060

6161
return $this->renderTemplate(
62-
'freeform/_settings/crm',
62+
'freeform/settings/_crm',
6363
[
6464
'integrations' => $integrations,
6565
'providers' => $this->getCRMService()->getAllCRMServiceProviders(),
@@ -322,7 +322,7 @@ private function renderEditForm(IntegrationModel $model, string $title): Respons
322322
'settings' => $settingBlueprints,
323323
];
324324

325-
return $this->renderTemplate('freeform/_settings/crm_edit', $variables);
325+
return $this->renderTemplate('freeform/settings/_crm_edit', $variables);
326326
}
327327

328328
/**

src/Controllers/MailingListsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function actionIndex(): Response
4848
\Craft::$app->view->registerAssetBundle(MailingListsBundle::class);
4949

5050
return $this->renderTemplate(
51-
'freeform/_settings/mailing_lists',
51+
'freeform/settings/_mailing_lists',
5252
[
5353
'integrations' => $mailingListIntegrations,
5454
'providers' => $this->getMailingListsService()->getAllMailingListServiceProviders(),
@@ -310,6 +310,6 @@ private function renderEditForm(IntegrationModel $model, string $title): Respons
310310
'settings' => $settingBlueprints,
311311
];
312312

313-
return $this->renderTemplate('freeform/_settings/mailing_list_edit', $variables);
313+
return $this->renderTemplate('freeform/settings/_mailing_list_edit', $variables);
314314
}
315315
}

src/Controllers/SettingsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public function actionProvideSetting(): Response
206206
$template = \Craft::$app->request->getSegment(3);
207207

208208
return $this->renderTemplate(
209-
'freeform/_settings/' . (string) $template,
209+
'freeform/settings/' . ($template ? '_' . (string) $template : ''),
210210
[
211211
'settings' => $this->getSettingsModel(),
212212
]

src/Library/Composer/Components/Fields/Traits/MultipleValueTrait.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,7 @@ public function setValue($value)
5858
if ($this instanceof OptionsInterface) {
5959
$updatedOptions = [];
6060
foreach ($this->getOptions() as $option) {
61-
if (is_numeric($option->getValue())) {
62-
$checked = \in_array((int) $option->getValue(), $this->getValue(), false);
63-
} else {
64-
$checked = \in_array($option->getValue(), $this->getValue(), true);
65-
}
61+
$checked = \in_array($option->getValue(), $this->getValue(), false);
6662

6763
$updatedOptions[] = new Option(
6864
$option->getLabel(),

src/Library/Composer/Components/Fields/Traits/SingleValueTrait.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,10 @@ public function setValue($value)
5555
}
5656

5757
foreach ($this->getOptions() as $option) {
58-
if (is_numeric($objectValue) && is_numeric($option->getValue())) {
59-
$checked = (int) $option->getValue() === (int) $objectValue;
60-
} else {
61-
$checked = $option->getValue() === $objectValue;
62-
}
63-
6458
$updatedOptions[] = new Option(
6559
$option->getLabel(),
6660
$option->getValue(),
67-
$checked
61+
(string) $option->getValue() === (string) $objectValue
6862
);
6963
}
7064

src/Library/Composer/Composer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ private function setDefaults()
253253
],
254254
Properties::FORM_HASH => [
255255
'type' => Properties::FORM_HASH,
256-
'name' => 'Composer Form',
257-
'handle' => 'composerForm',
256+
'name' => '',
257+
'handle' => '',
258258
'color' => '#' . substr(md5(random_int(111, 999) . time()), 0, 6),
259259
'submissionTitleFormat' => '{{ dateCreated|date("Y-m-d H:i:s") }}',
260260
'description' => '',

src/Records/FormRecord.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function rules(): array
7373
{
7474
return [
7575
[['handle'], 'unique'],
76-
[['handle'], 'required'],
76+
[['name', 'handle'], 'required'],
7777
];
7878
}
7979
}

src/Resources/js/composer/app.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)