Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] ADF-3: child items of the class should show file property #2979

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open
5 changes: 0 additions & 5 deletions helpers/form/ElementMapFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ public function create(core_kernel_classes_Property $property): ?tao_helpers_for
return null;
}

// horrible hack to fix file widget
if ($widgetUri === AsyncFile::WIDGET_ID) {
gabrielfs7 marked this conversation as resolved.
Show resolved Hide resolved
$widgetResource = new core_kernel_classes_Resource(GenerisAsyncFile::WIDGET_ID);
}

$element = tao_helpers_form_FormFactory::getElementByWidget(
tao_helpers_Uri::encode($propertyUri),
$widgetResource
Expand Down
11 changes: 11 additions & 0 deletions helpers/form/class.Form.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -617,6 +618,16 @@ public function hasFileUpload()

return $returnValue;
}

public function hasAsyncFileUpload(): bool
gabrielfs7 marked this conversation as resolved.
Show resolved Hide resolved
{
foreach ($this->elements as $element) {
if ($element instanceof tao_helpers_form_elements_xhtml_AsyncFile) {
return true;
}
}
return false;
}

/**
* Enables you to know if the form is valid
Expand Down
7 changes: 3 additions & 4 deletions views/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.