Skip to content

Commit e5f6260

Browse files
author
Roman Gsponer
committed
Refactory
1 parent fe77ce1 commit e5f6260

40 files changed

+219
-1358
lines changed

LICENSE

Lines changed: 0 additions & 73 deletions
This file was deleted.

LICENSE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/romangsponer/Cloud/_kirby/licenses/PLAIN/LICENSE.md

README.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ With the integrated mailview field you can display requests allover the panel.
3838
- [Table of content](#table-of-content)
3939
- [Installation](#installation)
4040
- [How to use?](#how-to-use)
41-
- [Allow the form block in your blueprint](#allow-the-form-block-in-your-blueprint)
4241
- [Using the built-in styling](#using-the-built-in-styling)
4342
- [Set up your form block](#set-up-your-form-block)
4443
- [Create a form block](#create-a-form-block)
@@ -54,33 +53,37 @@ With the integrated mailview field you can display requests allover the panel.
5453
- [Messages](#messages)
5554
- [Config](#config)
5655
- [Email address for outgoing emails](#email-address-for-outgoing-emails)
56+
- [Plain text emails](#plain-text-emails)
5757
- [Honeypot](#honeypot)
5858
- [Placeholders](#placeholders)
5959
- [Disable Functions](#disable-functions)
60+
- [Email templating](#email-templating)
6061
- [Translations](#translations)
6162
- [Dynamic validation](#dynamic-validation)
63+
- [Email field](#email-field)
64+
- [Hook Success](#hook-success)
65+
- [Hook Validate](#hook-validate)
6266
- [Troubleshooting](#troubleshooting)
67+
- [License](#license)
6368

6469

6570
# Installation
6671

6772
**Manually**
6873

69-
[Download](https://github.com/youngcut/kirby-form-block-suite/archive/refs/heads/main.zip) and copy the plugin into your plugin folder: `/site/plugins/`
74+
[Download](https://github.com/plain-solutions-gmbh/kirby-form-block-suite/archive/refs/heads/main.zip) and copy the plugin into your plugin folder: `/site/plugins/`
7075

7176
**With Composer**
7277

73-
`composer require microman/kirby-form-block-suite`
78+
`composer require getplain/kirby-form-block-suite`
7479

7580
**Get a license**
7681

7782
There's two license available:
7883

79-
[Single site license](https://license.microman.ch/?product=801346)
84+
[Single site license](https://plain-solutions.net/?product=801346)
8085

81-
[Infinite license](https://license.microman.ch/?product=803284)
82-
83-
[See also the other plugins](https://license.microman.ch/)
86+
[See also the other plugins](https://plain-solutions.net/)
8487

8588
> If you have trouble with your license, check [Troubleshooting](#troubleshooting) at the end of this documentation.
8689
@@ -436,7 +439,7 @@ To disable confirmation or notification use [the config](#disable-functions).
436439
## Email address for outgoing emails
437440

438441
```php
439-
'microman.formblock' => [
442+
'plain.formblock' => [
440443
'from_email' => ["[email protected]" => "John Doe"]
441444
],
442445
```
@@ -452,11 +455,11 @@ By default the plugin will use HTML for the body of the confirm/notification ema
452455
You can disable it this way:
453456

454457
```php
455-
'microman.formblock' => [
458+
'plain.formblock' => [
456459
'disable_html' => false
457460
],
458461
```
459-
_Thanks to [felix](https://github.com/youngcut/kirby-form-block-suite/pull/27)_
462+
_Thanks to [felix](https://github.com/plain-solutions-gmbh/kirby-form-block-suite/pull/27)_
460463

461464
## Honeypot
462465

@@ -465,7 +468,7 @@ The form block plugin insert a hidden honeypot field into the form to prevent bo
465468
You can change the order and the kind of context with this setting.
466469

467470
```php
468-
'microman.formblock' => [
471+
'plain.formblock' => [
469472
'honeypot_variants' => ["email", "name", "url"]
470473
],
471474
```
@@ -476,7 +479,7 @@ In addition to the incoming form data, extra placeholders can be defined. (Which
476479
For example, to determine the IP address of the sender:
477480

478481
```php
479-
'microman.formblock' => [
482+
'plain.formblock' => [
480483
'placeholders' => [
481484
'ip' => [
482485
'label' => "IP address",
@@ -495,7 +498,7 @@ You can use placeholders everywhere (mails, text blocks, as display name) like t
495498
Functions like _notification email_ or _confirmation email_ can be disabled:
496499

497500
```php
498-
'microman.formblock' => [
501+
'plain.formblock' => [
499502
'disable_confirm' => true,
500503
'disable_notify' => true,
501504
],
@@ -508,7 +511,7 @@ The corresponding function will be no longer executed and in the panel the tab/f
508511
You can set the templates for outgoing emails like this:
509512

510513
```php
511-
'microman.formblock' => [
514+
'plain.formblock' => [
512515
'email_template_confirmation' => require kirby()->root('site') . '/templates/emails/confirmation.php',
513516
'email_template_notification' => `
514517
{ name } has sent you a message
@@ -521,7 +524,7 @@ You can set the templates for outgoing emails like this:
521524
Change custom texts like this:
522525

523526
```php
524-
'microman.formblock' => [
527+
'plain.formblock' => [
525528
'translations' => [
526529
'en' => [
527530
'success_message' => 'Your beautiful request has been sent.'
@@ -540,7 +543,7 @@ Change custom texts like this:
540543
The form is validated dynamically (No reload of the page on submit). You can disable this function like this:
541544

542545
```php
543-
'microman.formblock' => [
546+
'plain.formblock' => [
544547
'dynamic_validation' => false,
545548
],
546549
```
@@ -559,7 +562,7 @@ If you disable this function, you'il lose some features
559562
For the confirmation or the notification email it's nessaissary to have a field, that contains the visitors email adress. You can set the email field id like this:
560563

561564
```php
562-
'microman.formblock' => [
565+
'plain.formblock' => [
563566
'email_field' => 'email',
564567
],
565568
```
@@ -570,7 +573,7 @@ If no field with this id is found, the plugin takes the first field with the fie
570573

571574
```php
572575
'hooks' => [
573-
'formblock.success:after' => function (\microman\FormRequest $request) {
576+
'formblock.success:after' => function (\Plain\Formblock\Request $request) {
574577
//Your code
575578
},
576579

@@ -600,7 +603,8 @@ This example shows an error message on entering specific email adresses.
600603

601604
# Troubleshooting
602605

603-
> Please read this Chapter carefuly before you [open an issue](https://github.com/youngcut/kirby-form-block-suite/issues/new/choose).
606+
> DEPRECATION-WARNING: Option prefix changed since version 5.0.2 (old: micorman.* | new: plain.*)
607+
> Please read this Chapter carefuly before you [open an issue](https://github.com/plain-solutions-gmbh/kirby-form-block-suite/issues).
604608
605609
---
606610

@@ -629,7 +633,7 @@ This example shows an error message on entering specific email adresses.
629633
**Solution:** Your site is **not** multilingual. Or Kirby don't know the language of the visitor. Set a default language manually:
630634

631635
```php
632-
'microman.formblock' => [
636+
'plain.formblock' => [
633637
'default_language' => 'de'
634638
]
635639

@@ -641,31 +645,27 @@ This example shows an error message on entering specific email adresses.
641645
**Problem:** Error to validate license key
642646

643647
**Solutions:**
644-
- If you haven't got a license yet? Get a [single site license](https://license.microman.ch/?product=801346) or an [infinite site license](https://license.microman.ch/?product=803284).
645-
- Your server needs a connection to the license server: [https://license.mircroman.ch](https://license.microman.ch)
646-
- Your license key was already validated by another host: Send me [an email](mailto:kirby@microman.ch) **with your license key** to release the assigment.
647-
- Delete the license file and try again. Folder: `/site/config/.formblock_license`
648+
- If you haven't got a license yet? Get a [single site license](https://plain-solutions.net/?product=801346).
649+
- Your server needs a connection to the license server: [https://plain-solutions.net](https://plain-solutions.net)
650+
- Your license key was already validated by another host: Send me [an email](mailto:kirby@plain-solutions.net) **with your license key** to release the assigment.
651+
- Delete the license file `/site/config/.formblock_license` and try again.
648652

649653
---
650654

651655
**Problem:** Problem with the validation
652656

653657
**Solutions:**
654-
- Check if the symbolic link _media/plugins/microman/formblock/formblock.js_ is working properly.
655-
- There's a [known](https://github.com/youngcut/kirby-form-block-suite/issues/15) incompatibility issue with the _Ahmet Bora's Minify HTML compression plugin_. We working on a solution.
658+
- Check if the symbolic link _media/plugins/plain/formblock/formblock.js_ is working properly.
659+
- There's a [known](https://github.com/plain-solutions-gmbh/kirby-form-block-suite/issues/15) incompatibility issue with the _Ahmet Bora's Minify HTML compression plugin_. We working on a solution.
656660

657661
---
658662

659-
If you still have any questions or something is not working properly, [make an issue request on GitHub](https://github.com/youngcut/kirby-form-block-suite/issues) or send me a [private message](https://microman.ch/en/microman).
663+
If you still have any questions or something is not working properly, [make an issue request on GitHub](https://github.com/plain-solutions-gmbh/kirby-form-block-suite/issues) or send me a [private message](https://plain-solutions.net/support).
660664

661665
**I hope you will enjoy this plugin.**
662666

663-
## License
664-
665-
This is a free trial version of Kirby Form Block Suite Plugin, which grants you the right to use the plugin for testing purposes. If you wish to use this plugin on one website or if you intend to use it for commercial purposes, you must [purchase a license](https://license.microman.ch/?product=801346).
666-
667-
A license is required for those who wish to use the plugin to generate revenue, including but not limited to: e-commerce websites, affiliate marketing websites, and websites that require payment to access content. Licenses are non-transferable and cannot be shared with other users or websites.
667+
# License
668668

669-
By downloading and using this plugin, you agree to the [terms and conditions of the License Agreement](https://license.microman.ch/license/). Failure to comply with the terms of the License Agreement may result in revocation of your license and legal action.
669+
By using this project, you agree to the terms and conditions outlined in our [Terms of Service](https://plain-solutions.net/terms).
670670

671-
To purchase a license or learn more about our licensing options, please visit our [website](https://microman.ch) or contact us at [Contact Email](mailto:[email protected]). Thank you for your interest in Kirby Form Block Suite Plugin!
671+
To acquire a license for this project, please visit our [Licensing Page](https://plain-solutions.net/801346).

classes/FormBlueprint.php renamed to classes/Blueprint.php

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,26 @@
11
<?php
22

3-
namespace microman;
3+
namespace Plain\Formblock;
44

55
/**
66
* @package Kirby Form Block Suite
7-
* @author Roman Gsponer <[email protected]>
8-
* @link https://microman.ch/
7+
* @author Roman Gsponer <[email protected]>
8+
* @link https://plain-solutions.net/
99
* @copyright Roman Gsponer
10-
* @license https://license.microman.ch/license/
10+
* @license https://plain-solutions.net/terms/
1111
*/
1212

1313
use Kirby\Filesystem\Dir;
1414
use Kirby\Filesystem\F;
1515
use Kirby\Data\Yaml;
1616

17-
class FormBlueprint
17+
class Blueprint
1818
{
1919

20-
/**
21-
* Get form tab
22-
*
23-
* @return array
24-
**/
25-
/*
26-
public static function getBlock(): array
27-
{
28-
return [
29-
'name' => 'form.block.fromfields',
30-
'icon' => 'form',
31-
'fields' => [
32-
'id' => [
33-
'type' => 'select',
34-
'default' => [
35-
'id' => ''
36-
],
37-
'options' => [
38-
'type' => 'query',
39-
'query' => 'site.drafts',
40-
'text' => '{{page.name}}'
41-
]
42-
]
43-
]
44-
];
45-
}
46-
*/
47-
4820
/**
4921
* Get Blueprint as array
5022
*
51-
* @param Array $path Filename or path of Bluepring
23+
* @param Array $path Filename or path of Blueprint
5224
*
5325
* @return array
5426
*/
@@ -82,8 +54,7 @@ public static function getInbox()
8254
'fields' => [
8355
'formid' => ['type' => 'hidden'],
8456
'mailview' => [
85-
'type' => 'mailview',
86-
'license' => true
57+
'type' => 'mailview'
8758
]
8859
]
8960
];
@@ -251,7 +222,7 @@ public static function getPlaceholders(): array
251222
return $table;
252223
}
253224
]
254-
], kirby()->option('microman.formblock.placeholders') ?? []);
225+
], kirby()->option('plain.formblock.placeholders') ?? []);
255226
}
256227

257228
/**
@@ -263,7 +234,8 @@ public static function getPlaceholders(): array
263234
*/
264235
private static function isEnabled($fnc): bool
265236
{
266-
return empty(kirby()->option("microman.formblock.disable_$fnc"));
237+
$option_value = ".formblock.disable_$fnc";
238+
return empty(kirby()->option("plain.$option_value"));
267239
}
268240

269241
}

0 commit comments

Comments
 (0)