Page MenuHomeIn-Portal Phabricator

INP-1720 - Use "FileHelper::urlToPath" for "storage_format" field option handling
ClosedPublic

Authored by alex on Jul 23 2017, 5:30 AM.

Details

Test Plan

Part 1 (flash uploader, without storage format)

  • in IDE:
    1. open /modules/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl file for editing
    2. change form control for Logo field to inp_edit_swf_upload
    3. save changes
    4. open /modules/in-commerce/units/manufacturers/manufacturers_config.php file for editing
    5. remove storage_format field option (if any) in Logo field declaration
    6. save changes
  • in Admin Console:
    1. go to E-commerceManufacturers section
    2. click on Add button on toolbar
    3. click Browse button for Logo image field and select 300x300 image
    4. confirm, that image was uploaded and thumbnail of 100x100 size is shown
    5. close item adding window

Part 2 (flash uploader, with storage format)

  • in IDE:
    1. open /modules/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl file for editing
    2. change form control for Logo field to inp_edit_swf_upload
    3. save changes
    4. open /modules/in-commerce/units/manufacturers/manufacturers_config.php file for editing
    5. add storage_format field option with 'resize:150x200;crop:C|C' value to Logo field declaration
    6. save changes
  • in Admin Console:
    1. go to E-commerceManufacturers section
    2. click on Add button on toolbar
    3. click Browse button for Logo image field and select 300x300 image
    4. confirm, that image was uploaded and thumbnail of 75x100 size is shown
    5. close item adding window

Part 3 (regular uploader, without storage format)

  • in IDE:
    1. open /modules/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl file for editing
    2. change form control for Logo field to inp_edit_upload
    3. change thumbnail parameter value for Logo field to 100x100
    4. save changes
    5. open /modules/in-commerce/units/manufacturers/manufacturers_config.php file for editing
    6. remove storage_format field option (if any) in Logo field declaration
    7. save changes
  • in Admin Console:
    1. go to E-commerceManufacturers section
    2. click on Add button on toolbar
    3. click Browse button for Logo image field and select 300x300 image
    4. press Save button on toolbar
    5. confirm, that image was uploaded and thumbnail of 100x100 size is shown
    6. close item adding window

Part 4 (regular uploader, with storage format)

  • in IDE:
    1. open /modules/in-commerce/admin_templates/manufacturers/manufacturers_edit.tpl file for editing
    2. change form control for Logo field to inp_edit_upload
    3. change thumbnail parameter value for Logo field to 100x100
    4. save changes
    5. open /modules/in-commerce/units/manufacturers/manufacturers_config.php file for editing
    6. add storage_format field option with 'resize:150x200;crop:C|C' value to Logo field declaration
    7. save changes
  • in Admin Console:
    1. go to E-commerceManufacturers section
    2. click on Add button on toolbar
    3. click Browse button for Logo image field and select 300x300 image
    4. press Save button on toolbar
    5. confirm, that image was uploaded and thumbnail of 75x100 size is shown
    6. close item adding window

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex created this revision.Jul 23 2017, 5:30 AM
erik requested changes to this revision.Jul 24 2017, 5:38 AM

At part 3 resulting thumbnail size was not 100x100, but was 120x120.
At part 4 resulting thumbnail size was not 75x100, but was 90x120 (screenshot added for this case).

This revision now requires changes to proceed.Jul 24 2017, 5:38 AM
alex requested review of this revision.Jul 24 2017, 11:03 AM
alex edited the test plan for this revision. (Show Details)
alex edited edge metadata.
In D320#6354, @erik wrote:

At part 3 resulting thumbnail size was not 100x100, but was 120x120.
At part 4 resulting thumbnail size was not 75x100, but was 90x120 (screenshot added for this case).

Turned out for inp_edit_upload form control the thumbnail format is specified via thumbnail option of form block instead of looking into thumb_format field option. I've updated test plan to reflect this.

erik accepted this revision.Jul 25 2017, 5:17 AM
This revision is now accepted and ready to land.Jul 25 2017, 5:17 AM
This revision was automatically updated to reflect the committed changes.