diff --git a/app/plugins/CoreEnroller/src/Controller/EmailVerifiersController.php b/app/plugins/CoreEnroller/src/Controller/EmailVerifiersController.php index 52c4ec626..cbfd00a6b 100644 --- a/app/plugins/CoreEnroller/src/Controller/EmailVerifiersController.php +++ b/app/plugins/CoreEnroller/src/Controller/EmailVerifiersController.php @@ -62,7 +62,10 @@ public function beforeRender(\Cake\Event\EventInterface $event) { $this->set('vv_bc_parent_primarykey', $this->EmailVerifiers->EnrollmentFlowSteps->getPrimaryKey()); } - if ($this->getRequest()->getQuery("op") == "verify" || $this->getRequest()->getQuery("op") == "index") { + // We use the viewvar to determine the op since 'index' isn't always present + $op = $this->viewBuilder()->getVar('vv_op'); + + if($op == "verify" || $op == "index") { // This will suppress the default behavior. By default, we print the submit button in the // unorderedList.php element. But for the verify view we want to override and customize $this->set('suppress_submit', true); @@ -80,9 +83,8 @@ public function beforeRender(\Cake\Event\EventInterface $event) { * @return void * @since COmanage Registry v5.1.0 */ - public function resend($id) - { - + + public function resend($id) { $this->viewBuilder()->setClassName('Json'); if (!$this->getRequest()->is('ajax')) { diff --git a/app/plugins/CoreEnroller/templates/element/emailVerifiers/list.php b/app/plugins/CoreEnroller/templates/element/emailVerifiers/list.php index b438d3565..2c068d4e3 100644 --- a/app/plugins/CoreEnroller/templates/element/emailVerifiers/list.php +++ b/app/plugins/CoreEnroller/templates/element/emailVerifiers/list.php @@ -57,8 +57,8 @@ - + + Field->enableFormEditMode(); @@ -123,5 +123,4 @@ print $this->element('form/submit', ['label' => $vv_submit_button_label]); } -?> - +?> \ No newline at end of file diff --git a/app/plugins/CoreEnroller/templates/element/emailVerifiers/verify.php b/app/plugins/CoreEnroller/templates/element/emailVerifiers/verify.php index 8dcc7a4c2..75081bf52 100644 --- a/app/plugins/CoreEnroller/templates/element/emailVerifiers/verify.php +++ b/app/plugins/CoreEnroller/templates/element/emailVerifiers/verify.php @@ -49,7 +49,7 @@ print $this->element('form/listItem', [ 'arguments' => [ 'fieldName' => 'code', - 'fieldLabel' => "Code", //__d('field', 'mail') + 'fieldLabel' => __d('field', 'code'), 'fieldOptions' => [ 'required' => true ] diff --git a/app/resources/locales/en_US/field.po b/app/resources/locales/en_US/field.po index d844d7f8c..aee20ec63 100644 --- a/app/resources/locales/en_US/field.po +++ b/app/resources/locales/en_US/field.po @@ -53,6 +53,9 @@ msgstr "Area Code" msgid "attribute" msgstr "Attribute" +msgid "code" +msgstr "Code" + msgid "comment" msgstr "Comment" diff --git a/app/templates/element/form/submit.php b/app/templates/element/form/submit.php index 70b6ab0a0..ab090b807 100644 --- a/app/templates/element/form/submit.php +++ b/app/templates/element/form/submit.php @@ -25,7 +25,6 @@ * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ - declare(strict_types = 1); ?>