As stated in https://www.drupal.org/node/2862113 there now is a zone_territory element you can use in forms. However this element is currently broken - it needs some fixes because of the use of non-static functions inside static functions, and the namespace declaration of some classes and the missing required groupElements() function.

CommentFileSizeAuthor
#2 zone_territory-2871741.patch3.16 KBfinne

Comments

finne created an issue. See original summary.

finne’s picture

StatusFileSize
new3.16 KB

This patch provides the fixes described in the issue.

steveoriol’s picture

Hello,
I do not undestand how configure zones since the last change on 20 Apr 2017 (https://www.drupal.org/node/2862113) :-(
Can you help, please. I have to set 4 zones which can be change by some roles some like the UI of the old version of module (admin/config/regional/zones)

  • bojanz committed 27d1c83 on 8.x-1.x authored by finne
    Issue #2871741 by finne: zone_territory form element not working
    
bojanz’s picture

Status: Active » Fixed

@finne Actually we can remove groupElements() completely, it is not needed here.

Merged with a few of my own fixes (added schema, expanded docs), committed.
I still get some "Invalid choice" errors when experimenting with Brazil states, like clearValues() isn't doing it's job, but one step at a time.

@steveoriol
There is no UI anymore, you will have to code your own, and use the discussed form element.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.