| @@ 94-105 (lines=12) @@ | ||
| 91 | * until we figured out, what we really want it to be. |
|
| 92 | */ |
|
| 93 | $formId = $params->fromQuery('form'); |
|
| 94 | if ('preferredJob' == $formId) { |
|
| 95 | $locElem = $form->getBaseFieldset()->get('geo-location'); |
|
| 96 | if ($locElem instanceof GeoText) { |
|
| 97 | $loc = $locElem->getValue('entity'); |
|
| 98 | $locations = $cv->getPreferredJob()->getDesiredLocations(); |
|
| 99 | if (count($locations)) { |
|
| 100 | $locations->clear(); |
|
| 101 | } |
|
| 102 | $locations->add($loc); |
|
| 103 | $cv->getPreferredJob()->setDesiredLocation($locElem->getValue()); |
|
| 104 | } |
|
| 105 | } |
|
| 106 | ||
| 107 | $this->validateCv($cv); |
|
| 108 | ||
| @@ 221-232 (lines=12) @@ | ||
| 218 | * @todo This is a workaround for GeoJSON data insertion |
|
| 219 | * until we figured out, what we really want it to be. |
|
| 220 | */ |
|
| 221 | if ('general.locationForm' == $formIdentifier) { |
|
| 222 | $locElem = $instanceForm->getBaseFieldset()->get('geo-location'); |
|
| 223 | if ($locElem instanceof \Geo\Form\GeoText) { |
|
| 224 | $loc = $locElem->getValue('entity'); |
|
| 225 | $locations = $jobEntity->getLocations(); |
|
| 226 | if (count($locations)) { |
|
| 227 | $locations->clear(); |
|
| 228 | } |
|
| 229 | $locations->add($loc); |
|
| 230 | $jobEntity->setLocation($locElem->getValue()); |
|
| 231 | } |
|
| 232 | } |
|
| 233 | ||
| 234 | $title = $jobEntity->getTitle(); |
|
| 235 | $templateTitle = $jobEntity->getTemplateValues()->getTitle(); |
|