| Línea 127... |
Línea 127... |
| 127 |
}
|
127 |
}
|
| 128 |
$latlongsrs->close();
|
128 |
$latlongsrs->close();
|
| Línea 129... |
Línea 129... |
| 129 |
|
129 |
|
| 130 |
$classes = array('class' => 'accesshide');
|
130 |
$classes = array('class' => 'accesshide');
|
| 131 |
$return = html_writer::label(get_string('latlong', 'data'), 'menuf_'.$this->field->id, false, $classes);
|
131 |
$return = html_writer::label(get_string('latlong', 'data'), 'menuf_'.$this->field->id, false, $classes);
|
| 132 |
$classes = array('class' => 'custom-select');
|
132 |
$classes = ['class' => 'form-select'];
|
| 133 |
$return .= html_writer::select($options, 'f_'.$this->field->id, $value, array('' => get_string('menuchoose', 'data')),
|
133 |
$return .= html_writer::select($options, 'f_'.$this->field->id, $value, array('' => get_string('menuchoose', 'data')),
|
| 134 |
$classes);
|
134 |
$classes);
|
| 135 |
return $return;
|
135 |
return $return;
|
| Línea 213... |
Línea 213... |
| 213 |
) . "' title='$servicesshown[0]'>$compasslat $compasslong</a>";
|
213 |
) . "' title='$servicesshown[0]'>$compasslat $compasslong</a>";
|
| 214 |
} else if (count($servicesshown) > 1) {
|
214 |
} else if (count($servicesshown) > 1) {
|
| 215 |
$str = '<form id="latlongfieldbrowse" class="data-field-html">';
|
215 |
$str = '<form id="latlongfieldbrowse" class="data-field-html">';
|
| 216 |
$str .= "$compasslat, $compasslong\n";
|
216 |
$str .= "$compasslat, $compasslong\n";
|
| 217 |
$str .= "<label class='accesshide' for='jumpto'>". get_string('jumpto') ."</label>";
|
217 |
$str .= "<label class='accesshide' for='jumpto'>". get_string('jumpto') ."</label>";
|
| 218 |
$str .= '<select id="jumpto" name="jumpto" class="custom-select">';
|
218 |
$str .= '<select id="jumpto" name="jumpto" class="form-select">';
|
| 219 |
foreach ($servicesshown as $servicename) {
|
219 |
foreach ($servicesshown as $servicename) {
|
| 220 |
// Add a link to a service.
|
220 |
// Add a link to a service.
|
| 221 |
$str .= "\n <option value='"
|
221 |
$str .= "\n <option value='"
|
| 222 |
. str_replace(
|
222 |
. str_replace(
|
| 223 |
array_keys($urlreplacements),
|
223 |
array_keys($urlreplacements),
|
| Línea 225... |
Línea 225... |
| 225 |
$this->linkoutservices[$servicename]
|
225 |
$this->linkoutservices[$servicename]
|
| 226 |
) . "'>".htmlspecialchars($servicename, ENT_COMPAT)."</option>";
|
226 |
) . "'>".htmlspecialchars($servicename, ENT_COMPAT)."</option>";
|
| 227 |
}
|
227 |
}
|
| 228 |
// NB! If you are editing this, make sure you don't break the javascript reference "previousSibling"
|
228 |
// NB! If you are editing this, make sure you don't break the javascript reference "previousSibling"
|
| 229 |
// which allows the "Go" button to refer to the drop-down selector.
|
229 |
// which allows the "Go" button to refer to the drop-down selector.
|
| 230 |
$str .= '\n</select><input type="button" class="btn ml-1 btn-secondary" value="' . get_string('go');
|
230 |
$str .= '\n</select><input type="button" class="btn ms-1 btn-secondary" value="' . get_string('go');
|
| 231 |
$str .= '" onclick="if(previousSibling.value){self.location=previousSibling.value}"/>';
|
231 |
$str .= '" onclick="if(previousSibling.value){self.location=previousSibling.value}"/>';
|
| 232 |
$str .= '</form>';
|
232 |
$str .= '</form>';
|
| 233 |
} else {
|
233 |
} else {
|
| 234 |
$str = "$compasslat, $compasslong";
|
234 |
$str = "$compasslat, $compasslong";
|
| 235 |
}
|
235 |
}
|