mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Fix #1386 Remove extra field from register form
This commit is contained in:

committed by
Romain Neutron

parent
7fbf07acab
commit
49109a93b1
@@ -237,7 +237,15 @@ class Login implements ControllerProviderInterface
|
||||
));
|
||||
|
||||
if ('POST' === $request->getMethod()) {
|
||||
$form->bind($request);
|
||||
$requestData = $request->request->all();
|
||||
|
||||
// Remove geocompleter field for validation this field is added client side
|
||||
// with jquery geonames plugin
|
||||
if (isset($requestData['geonameid']) && isset($requestData['geonameid-completer'])) {
|
||||
unset($requestData['geonameid-completer']);
|
||||
}
|
||||
|
||||
$form->bind($requestData);
|
||||
$data = $form->getData();
|
||||
|
||||
$provider = null;
|
||||
|
@@ -91,7 +91,11 @@ require([
|
||||
var geocompleter = geonames.init($("#geonameid"), {
|
||||
"server": $form.data("geonames-server-adress"),
|
||||
"limit": 40,
|
||||
"init-input": false
|
||||
"init-input": false,
|
||||
"onInit": function(input, autoinput) {
|
||||
// Set default name to geonameid-completer
|
||||
autoinput.prop("name", "geonameid-completer");
|
||||
}
|
||||
});
|
||||
|
||||
// Positioning menu below input
|
||||
|
Reference in New Issue
Block a user