Skip to content

Commit

Permalink
Fix dropfiles type after symfony BC in 2.8.31 (#199)
Browse files Browse the repository at this point in the history
* add deployer script

* update symfony to ^2.8

* remove url from dropfiles in forms

* make uploadimagetransformer save image so that it updates the file name

* some fixes

* fix user profile form to save avatar

* rework of dropfiles type and js

* rework of all forms with dropfiles

* small fixes in model transformers

* refactor subdomain processing and add test to it (#205)

* fix/var subs (#215)

* refactor subdomain processing and add test to it (#204)

* refactor subdomain processing and add test to it

* add other envs to deployment

* make config process deep ENV substitution

* fix/var subs (#216)

* refactor subdomain processing and add test to it (#204)

* refactor subdomain processing and add test to it

* add other envs to deployment

* make config process deep ENV substitution

* fix namespace

* update oauth library for linkedin

* fix/linkedin (#227)

* Update live base code with latest fixes (#218)

* add project name to project translate overview

* fix route of poster in project dashboard

* Upgraded Symfony packages to v2.8.30 (last working version)

* Fix call to render method since it was renamed

(cherry picked from commit 5d93afa)

* add composer.lock

* restore a early die if misconfiguration

* Updated Dockerfile to use an Ubuntu image that's not deprecated (#181)

* Updated Dockerfile to use an Ubuntu image that's not deprecated

* Removed Docker image based on date in favour of one that won't change

* fix/composer lock (#185)

* Fix call to render method since it was renamed

(cherry picked from commit 5d93afa)

* remove lock to force deploy

Co-authored-by: Carlos Alberto Martínez Gadea <carlosmartinezgadea@gmail.com>

* Twitter card meta description fix

* change projects to be shown in map when a matcher is selected to use node configuration if available

* improve filters in discover and fix ajax query

(cherry picked from commit 0432ebb325b99d68c42e300493fca974a6142c0f)

* fix use of query parameters when they are not being used

* fix project filters in discover and use of inner joins in project get list function

* Add matcher completed status

* Fix icons size

* Fix user leave exceptions

* remove comment on sql project name selects

* fix missing ) on fallback lang in Project published

* fix on config test yaml with env parameters

* add entries in docker settings to be used in yaml test

* change in config test to use real yaml instead of inserting env variables

* fix removing log in public index since its done via plugin

Co-authored-by: Carlos Alberto Martínez Gadea <carlosmartinezgadea@gmail.com>
Co-authored-by: Ivan Vergés <ivan@platoniq.net>
Co-authored-by: Javier <javicarrillo83@gmail.com>
Co-authored-by: Javier Carrillo <javier@goteo.org>

* specify region before connecting to s3 (#219)

* fix on deprecated parse_str without  variable (#221)

* make loggin resilient to Gelf updates failures (#225)

* make loggin resilient to Gelf updates failures

* ignore redundant exception thrown

* update oauth library for linkedin

Co-authored-by: David <david.igon@riseup.net>
Co-authored-by: Carlos Alberto Martínez Gadea <carlosmartinezgadea@gmail.com>
Co-authored-by: Javier <javicarrillo83@gmail.com>
Co-authored-by: Javier Carrillo <javier@goteo.org>

* update up to a working commit

* fix linkedin call

* remove unnecessary comments from Forms

* Fix AdminStoryEdit form so it can properly add, save and remove the 3 types of images it has

* Refactor to have a unique place where to handle additions, changes or removals of pictures on a form

* Fix ProjectPostForm so it adds, edits and removes pictures correctly

* add sign_url field to Project and to Project Forms

* make new project fields not required

* Add signture button in project skin

* [STAGING deploy] Feature: Project can share a url to a signature platform (#235)

* fix on deprecated implode call (#229)

* update oauth library for linkedin (#226)

* add deployer script

* refactor subdomain processing and add test to it (#205)

* fix/var subs (#215)

* refactor subdomain processing and add test to it (#204)

* refactor subdomain processing and add test to it

* add other envs to deployment

* make config process deep ENV substitution

* fix/var subs (#216)

* refactor subdomain processing and add test to it (#204)

* refactor subdomain processing and add test to it

* add other envs to deployment

* make config process deep ENV substitution

* fix namespace

* update oauth library for linkedin

* update up to a working commit

* fix linkedin call

* remove orphan location stats (#230)

* fix on deprecated implode call in Check (#233)

* add sign_url field to Project and to Project Forms

* make new project fields not required

* Add signture button in project skin

Co-authored-by: Ivan Vergés <ivan@platoniq.net>
Co-authored-by: Javier Carrillo <javier@goteo.org>

* Fix signature css

* Fix css and target blank link

* update composer.lock to symfony 2.8.52

* Fix AdminSdgEdit form in order to allow removing the Sdf icon

* Fix ProjectStory form, since it wasn't possible to upload, update or remove images to the ProjectStory

* Fix Questionnaire form so it saves the uploaded image ID as the answer for Dropfiles

* fixes on questionnaire form to handle upload of documents instead of images

* Refactor on DropfilesType to include constant and to separate the different view elements added as a DropfilesType

Co-authored-by: Ivan Vergés <ivan@platoniq.net>
Co-authored-by: Carlos Alberto Martínez Gadea <carlosmartinezgadea@gmail.com>
Co-authored-by: Javier <javicarrillo83@gmail.com>
Co-authored-by: Javier Carrillo <javier@goteo.org>
  • Loading branch information
5 people committed Sep 27, 2021
1 parent e28c60b commit ac25ae5
Show file tree
Hide file tree
Showing 32 changed files with 572 additions and 433 deletions.
8 changes: 6 additions & 2 deletions Resources/templates/forms/bootstrap/dropfiles_widget.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

$uploads_name = $form['uploads']->vars['full_name'];
$current_name = $form['current']->vars['full_name'];
$removed_name = $form['removed']->vars['full_name'];
// $current_files = $value;
$current_files = is_array($value) ? $value : [$value];

// var_dump($current_files);die;
?>
<div class="dropfiles" data-text-upload="<?= $view->escape($text_upload) ?>" data-text-max-files-reached="<?= $view->escape($text_max_files_reached) ?>" data-text-file-type-error="<?= $view->escape($text_file_type_error) ?>" data-limit="<?= $limit ?>" data-multiple="<?= $attr['multiple'] ? 1 : 0 ?>" data-url="<?= $view->escape($url) ?>" data-current="<?= $view->escape($current_name) ?>" data-name="<?= $view->escape($uploads_name) ?>" data-markdown-link="<?= $view->escape($markdown_link) ?>" data-accepted-files="<?= $view->escape($accepted_files) ?>">
<div class="dropfiles" data-text-upload="<?= $view->escape($text_upload) ?>" data-text-max-files-reached="<?= $view->escape($text_max_files_reached) ?>" data-text-file-type-error="<?= $view->escape($text_file_type_error) ?>" data-limit="<?= $limit ?>" data-multiple="<?= $attr['multiple'] ? 1 : 0 ?>" data-url="<?= $view->escape($url) ?>" data-current="<?= $view->escape($current_name) ?>" data-name="<?= $view->escape($uploads_name) ?>" data-removed="<?= $view->escape($removed_name) ?>" data-markdown-link="<?= $view->escape($markdown_link) ?>" data-accepted-files="<?= $view->escape($accepted_files) ?>">
<div class="image-zone <?= $type ?>" data-section="<?= $key ?>">
<ul class="list-inline image-list-sortable" id="list-sortable-<?= $key ?>">
<?php foreach($current_files as $img) {
Expand All @@ -22,11 +23,14 @@
'text_send_to_markdown' => $text_send_to_markdown,
'text_delete_image' => $text_delete_image,
'text_download' => $text_download,
'hidden_input' => '<input type="hidden" name="' . $current_name . '" value="' . $view->escape($img->getName()) . '">'
'hidden_input' => '<input type="file" style="display: none" name="' . $current_name . '" value="' . $view->escape($img->getName()) . '">'
]);
}
} ?>
</ul>

<input type="text" style="display:none" name="<?= $removed_name ?>[]">

<div class="dragndrop"><div class="dropzone"></div></div>
</div>
<p class="text-danger error-msg hidden"></p>
Expand Down
38 changes: 19 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@
"iignatov/lightopenid": "~1.0",
"paypal/adaptivepayments-sdk-php": "*",
"paypal/merchant-sdk-php": "*",
"symfony/class-loader": "2.8.30",
"symfony/http-foundation": "2.8.30",
"symfony/routing": "2.8.30",
"symfony/http-kernel": "2.8.30",
"symfony/security": "2.8.30",
"symfony/config": "2.8.30",
"symfony/stopwatch": "2.8.30",
"symfony/dependency-injection": "2.8.30",
"symfony/debug": "2.8.30",
"symfony/console": "2.8.30",
"symfony/translation": "2.8.30",
"symfony/finder": "2.8.30",
"symfony/dom-crawler": "2.8.30",
"symfony/css-selector": "2.8.30",
"symfony/process": "2.8.30",
"symfony/form": "2.8.30",
"symfony/templating": "2.8.30",
"symfony/framework-bundle": "2.8.30",
"symfony/validator": "2.8.30",
"symfony/class-loader": "^2.8",
"symfony/http-foundation": "^2.8",
"symfony/routing": "^2.8",
"symfony/http-kernel": "^2.8",
"symfony/security": "^2.8",
"symfony/config": "^2.8",
"symfony/stopwatch": "^2.8",
"symfony/dependency-injection": "^2.8",
"symfony/debug": "^2.8",
"symfony/console": "^2.8",
"symfony/translation": "^2.8",
"symfony/finder": "^2.8",
"symfony/dom-crawler": "^2.8",
"symfony/css-selector": "^2.8",
"symfony/process": "^2.8",
"symfony/form": "^2.8",
"symfony/templating": "^2.8",
"symfony/framework-bundle": "^2.8",
"symfony/validator": "^2.8",
"symfony/yaml": "^3.3",
"monolog/monolog": "^1.17",
"gregwar/captcha": "^1.1",
Expand Down
Loading

0 comments on commit ac25ae5

Please sign in to comment.