X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fcontrollers%2FIdxController.php;h=9dc4300fbd634c2de2c77ea6e9d776b51d9eae90;hb=ce001229accb2aff799560eec402344f0dbb1762;hp=caad6a1595bb51f09562d3e5698640973a013f69;hpb=a64d41557a62ec6051d7fa08d1ba941e089aa5c2;p=syj.git diff --git a/application/controllers/IdxController.php b/application/controllers/IdxController.php index caad6a1..9dc4300 100644 --- a/application/controllers/IdxController.php +++ b/application/controllers/IdxController.php @@ -20,7 +20,7 @@ class IdxController extends Zend_Controller_Action public function indexAction() { $url = $this->getRequest()->getUserParam('url'); - $geomform = new Syj_Form_Geom(array('name' => 'geomform', 'action' => 'path')); + $geomform = new Syj_Form_Geom(array('name' => 'geomform')); $loginform = new Syj_Form_Login(array('name' => 'loginform', 'action' => 'login')); $userform = new Syj_Form_User(array('name' => 'userform', 'action' => 'user')); $newpwdform = new Syj_Form_Newpwd(array('name' => 'newpwdform', 'action' => 'newpwd')); @@ -35,13 +35,14 @@ class IdxController extends Zend_Controller_Action throw new Syj_Exception_NotFound('Not Found', 404); } } + $geomform->setAction('path/' . (string)$path->id . '/update'); $title = $path->displayTitle; $this->view->path = $path; $geomform->geom_title->setValue($path->title); $geomform->geom_data->setValue((string)$path->geom); - $geomform->geom_id->setValue((string)$path->id); $loginform->login_geom_id->setValue((string)$path->id); } else { + $geomform->setAction('path'); $extent = new phptojs\JsObject('gMaxExtent', $this->_helper->syjGeoip($this->getRequest()->getClientIp(true))); $this->view->headScript()->prependScript((string) $extent); $title = "Show your journey"; @@ -83,7 +84,7 @@ class IdxController extends Zend_Controller_Action $this->view->jslocales = array( 'saveSuccess' => __("save took place successfully"), 'requestError' => __("server did not understood request. That's probably caused by a bug in SYJ"), - 'UnreferencedError' => __("path did not exist in the server. May be it has been already deleted"), + 'gonePathError' => __("route not referenced on the server. It has probably been deleted."), 'uniquePathError' => __("similar path seems to already exist. Please do not create two exactly identical paths"), 'notReachedError' => __("server could not be reached"), 'serverError' => __("there was a server error"), @@ -96,14 +97,15 @@ class IdxController extends Zend_Controller_Action 'acceptTermsofuseWarn' => __("You must accept terms of use"), 'emailEmptyWarn' => __("you must enter an email"), 'emailInvalidWarn' => __("invalid email"), - 'invalidPseudo' => __("pseudo must only contain letters, digits, dots or underscores"), - 'uniqueUserError' => __("unavailable pseudo"), 'uniqueEmailError' => __("an user is already registered with this email"), 'userSuccess' => __("Account created"), 'newpwdSuccess' => __("A link to reset your password has been emailed to you"), 'canResubmit' => __("Now, you can retry to save"), 'routeBy' => __("route by"), - 'osmAttribution' => __("Map by OpenStreetMap") + 'osmAttribution' => __("Map by OpenStreetMap"), + 'pseudoChecking' => __("checking availibilty"), + 'availablePseudo' => __("available pseudo"), + 'unavailablePseudo' => __("unavailable pseudo"), ); }