Description
Katrin Fischer
2018-08-27 20:03:12 UTC
Created attachment 78290 [details] [review] Bug 21279: (bug 13618 follow-up) Do not escape in "Transport cost matrix" Test plan: On Home › Administration › Transport cost matrix you should no longer see " ". Fill some values and save, you should see the correct values. Created attachment 78291 [details] [review] Bug 21279: (bug 13618 follow-up) Do not escape in "Transport cost matrix" Test plan: On Home › Administration › Transport cost matrix you should no longer see " ". Fill some values and save, you should see the correct values. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> - <div class="enable_cost_input" data-cost-id="[% bt.id | html %]">[% bt.disabled ? ' ' : bt.value | html %]</div> + [% SET bt_value = ' ' %] + [% UNLESS bt.disabled %][% bt_value = BLOCK %][% bt.value | html %][% END %][% END %] + <div class="enable_cost_input" data-cost-id="[% bt.id | html %]">[% bt_value | $raw %]</div> Looks overcomplicated to me. Assigning to template vars does not seem the way to go imo. No need to pass to raw too. This is just regular template contents. Why not: <div ..> [% IF bt.disabled %] [% ELSE %][% bt.value | html %]</div> Looks simpler to me :) What do you think? (In reply to Marcel de Rooy from comment #3) > Looks simpler to me :) What do you think? That's sounds simpler indeed, could you provide an alternative patch? Created attachment 80334 [details] [review] Bug 21279: [COUNTERPATCH] Fix in transport cost matrix Test plan: On Home › Administration › Transport cost matrix you should no longer see " ". Fill some values and save, you should see the correct values. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 80338 [details] [review] Bug 21279: Fix in transport cost matrix Test plan: On Home › Administration › Transport cost matrix you should no longer see " ". Fill some values and save, you should see the correct values. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Thanks Marcel! Created attachment 80351 [details] [review] Bug 21279: Fix in transport cost matrix Test plan: On Home › Administration › Transport cost matrix you should no longer see " ". Fill some values and save, you should see the correct values. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Nice simple fix, passing qa. Awesome work all! Pushed to master for 18.11 Pushed to 18.05.x for 18.05.05 Pushed to 17.11.x for 17.11.12 |