Index: trunk/extensions/SemanticMaps/Features/FormInputs/SM_FormInput.php |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | // If this happens in any way, it could be a big vunerability, so throw an exception. |
81 | 81 | throw new Exception( 'Attempt to override a class field during map property assignment. Field name: ' . $paramName ); |
82 | 82 | } |
83 | | - } |
| 83 | + } |
84 | 84 | } |
85 | 85 | |
86 | 86 | $this->errorList = $manager->getErrorList(); |
— | — | @@ -122,16 +122,9 @@ |
123 | 123 | $this->infoFieldName = $this->elementNamePrefix . '_info_' . $this->elementNr . '_' . $sfgTabIndex; |
124 | 124 | |
125 | 125 | // Create the non specific form HTML. |
126 | | - if ( $this->markerCoords === false ) { |
127 | | - $coords = 'null, null'; |
128 | | - } |
129 | | - else { |
130 | | - $coords = MapsCoordinateParser::formatCoordinates( $this->markerCoords ); |
131 | | - } |
132 | | - |
133 | 126 | $this->output .= Html::input( |
134 | 127 | $input_name, |
135 | | - $coords, |
| 128 | + $this->markerCoords ? MapsCoordinateParser::formatCoordinates( $this->markerCoords ) : '', |
136 | 129 | 'text', |
137 | 130 | array( |
138 | 131 | 'size' => 42, |
— | — | @@ -150,6 +143,15 @@ |
151 | 144 | |
152 | 145 | if ( $this->enableGeocoding ) $this->addGeocodingField(); |
153 | 146 | |
| 147 | + if ( $this->markerCoords === false ) { |
| 148 | + $this->markerCoords = array( |
| 149 | + 'lat' => 'null', |
| 150 | + 'lon' => 'null' |
| 151 | + ); |
| 152 | + $this->centreLat = 'null'; |
| 153 | + $this->centreLon = 'null'; |
| 154 | + } |
| 155 | + |
154 | 156 | $this->addSpecificMapHTML(); |
155 | 157 | |
156 | 158 | return array( $this->output . $this->errorList, '' ); |
— | — | @@ -175,7 +177,7 @@ |
176 | 178 | } |
177 | 179 | function convertLngToDMS (val) { |
178 | 180 | return Math.abs(val) + "$deg " + ( val < 0 ? "$w" : "$e" ); |
179 | | -} |
| 181 | +} |
180 | 182 | EOT |
181 | 183 | ); |
182 | 184 | } |