Skip to content

Commit

Permalink
fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
formsdev committed Aug 30, 2023
1 parent bc2eff9 commit 54d8d48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/Http/Middleware/Form/ProForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ProForm
public function handle(Request $request, Closure $next)
{
if ($request->route('formId') && $form = Form::findOrFail($request->route('formId'))) {
if (true || $form->is_pro) { // For now it's FREE for all
if ($form->is_pro) {
$request->merge([
'form' => $form,
]);
Expand Down
18 changes: 1 addition & 17 deletions app/Service/Forms/FormCleaner.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class FormCleaner
'discord_webhook_url' => "Discord webhook disabled.",
'editable_submissions' => 'Users will not be able to edit their submissions.',
'custom_code' => 'Custom code was disabled',
'seo_meta' => 'Custom code was disabled',
'seo_meta' => 'Custom SEO was disabled',

// For fields
'file_upload' => "Link field is not a file upload.",
Expand Down Expand Up @@ -266,20 +266,4 @@ private function cleanCustomKeys($key, $formVal)
return $formVal;
}

// Remove keys those have empty value
private function cleanCustomKeys($key, $formVal)
{
if (in_array($key, $this->customKeys) && $formVal !== null) {
$newVal = [];
foreach ($formVal as $k => $val) {
if ($val) {
$newVal[$k] = $val;
}
}
return $newVal;
}

return $formVal;
}

}

0 comments on commit 54d8d48

Please sign in to comment.