From 8b1e0797b3b27be89e687fb9d194f9ae49010ae3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 15 Nov 2008 21:26:22 +0000 Subject: [PATCH] All helper are now configurable --- application/admin/config.php | 9 +++++++++ .../templates/de/code/action_admin_login_logout.ctp | 4 ++-- .../templates/de/code/action_admin_login_profile.ctp | 2 +- .../templates/de/code/action_admin_status_problem.ctp | 4 ++-- .../admin/templates/de/code/block_persona_data.ctp | 2 +- .../admin/templates/de/code/captch_graphic_code.ctp | 8 +++++++- application/admin/templates/de/code/login_failed.ctp | 2 +- application/admin/templates/de/code/login_form.ctp | 4 ++-- application/admin/templates/de/code/login_main.ctp | 4 ++-- application/admin/templates/de/code/logout_done.ctp | 2 +- application/admin/templates/de/code/register_form.ctp | 2 +- application/blog/config.php | 9 +++++++++ .../blog/templates/de/code/action_blog_login_logout.ctp | 4 ++-- .../blog/templates/de/code/action_blog_login_profile.ctp | 2 +- .../de/code/action_blog_login_status_problem.ctp | 4 ++-- .../blog/templates/de/code/block_persona_data.ctp | 2 +- .../blog/templates/de/code/captch_graphic_code.ctp | 8 +++++++- application/blog/templates/de/code/confirm_link.ctp | 2 +- application/blog/templates/de/code/login_failed.ctp | 2 +- application/blog/templates/de/code/login_form.ctp | 6 +++--- application/blog/templates/de/code/login_main.ctp | 6 +++--- application/blog/templates/de/code/logout_done.ctp | 2 +- application/blog/templates/de/code/register_form.ctp | 2 +- application/ship-simu/config.php | 9 +++++++++ .../templates/de/code/action_ship_simu_login_company.ctp | 2 +- .../action_ship_simu_login_goverment_startup_help.ctp | 2 +- .../code/action_ship_simu_login_goverment_training.ctp | 4 ++-- .../templates/de/code/action_ship_simu_login_logout.ctp | 4 ++-- .../templates/de/code/action_ship_simu_login_profile.ctp | 2 +- .../templates/de/code/action_ship_simu_login_refill.ctp | 2 +- .../de/code/action_ship_simu_login_status_problem.ctp | 4 ++-- .../ship-simu/templates/de/code/block_persona_data.ctp | 2 +- .../ship-simu/templates/de/code/captch_graphic_code.ctp | 8 +++++++- application/ship-simu/templates/de/code/confirm_link.ctp | 2 +- application/ship-simu/templates/de/code/login_failed.ctp | 2 +- application/ship-simu/templates/de/code/login_form.ctp | 6 +++--- application/ship-simu/templates/de/code/login_main.ctp | 6 +++--- application/ship-simu/templates/de/code/logout_done.ctp | 2 +- .../ship-simu/templates/de/code/register_form.ctp | 2 +- application/shoutbox/config.php | 9 +++++++++ .../templates/de/code/action_shoutbox_login_logout.ctp | 4 ++-- .../templates/de/code/action_shoutbox_login_profile.ctp | 2 +- .../de/code/action_shoutbox_login_status_problem.ctp | 4 ++-- .../shoutbox/templates/de/code/block_persona_data.ctp | 2 +- .../shoutbox/templates/de/code/captch_graphic_code.ctp | 8 +++++++- application/shoutbox/templates/de/code/confirm_link.ctp | 2 +- application/shoutbox/templates/de/code/login_failed.ctp | 2 +- application/shoutbox/templates/de/code/login_form.ctp | 6 +++--- application/shoutbox/templates/de/code/login_main.ctp | 6 +++--- application/shoutbox/templates/de/code/logout_done.ctp | 2 +- application/shoutbox/templates/de/code/register_form.ctp | 2 +- application/todo/config.php | 9 +++++++++ .../todo/templates/de/code/action_todo_login_logout.ctp | 4 ++-- .../todo/templates/de/code/action_todo_login_profile.ctp | 2 +- .../de/code/action_todo_login_status_problem.ctp | 4 ++-- .../todo/templates/de/code/block_persona_data.ctp | 2 +- .../todo/templates/de/code/captch_graphic_code.ctp | 8 +++++++- application/todo/templates/de/code/confirm_link.ctp | 2 +- application/todo/templates/de/code/login_failed.ctp | 2 +- application/todo/templates/de/code/login_form.ctp | 6 +++--- application/todo/templates/de/code/login_main.ctp | 6 +++--- application/todo/templates/de/code/logout_done.ctp | 2 +- application/todo/templates/de/code/register_form.ctp | 2 +- 63 files changed, 162 insertions(+), 87 deletions(-) diff --git a/application/admin/config.php b/application/admin/config.php index 31c0846..e4522fe 100644 --- a/application/admin/config.php +++ b/application/admin/config.php @@ -241,5 +241,14 @@ $cfg->setConfigEntry('image_template_class', "ImageTemplateEngine"); // CFG: ADMIN-EMAIL $cfg->setConfigEntry('admin_email', "you@some-hoster.invalid"); +// CFG: WEB-BLOCK-HELPER +$cfg->setConfigEntry('web_block_helper', "WebBlockHelper"); + +// CFG: WEB-FORM-HELPER +$cfg->setConfigEntry('web_form_helper', "WebFormHelper"); + +// CFG: WEB-LINK-HELPER +$cfg->setConfigEntry('web_link_helper', "WebLinkHelper"); + // [EOF] ?> diff --git a/application/admin/templates/de/code/action_admin_login_logout.ctp b/application/admin/templates/de/code/action_admin_login_logout.ctp index 07431f5..475b058 100644 --- a/application/admin/templates/de/code/action_admin_login_logout.ctp +++ b/application/admin/templates/de/code/action_admin_login_logout.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('logout_now_link_text'); @@ -9,7 +9,7 @@ $helper->addLinkWithTextById('logout_now_link_text'); $helper->flushContent(); // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'return_login_link', 'index.php?app={?app_short_name?}&page=login_area'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'return_login_link', 'index.php?app={?app_short_name?}&page=login_area')); // Set link text $helper->addLinkWithTextById('return_login_link_text'); diff --git a/application/admin/templates/de/code/action_admin_login_profile.ctp b/application/admin/templates/de/code/action_admin_login_profile.ctp index 7e7fd47..70d5d4f 100644 --- a/application/admin/templates/de/code/action_admin_login_profile.ctp +++ b/application/admin/templates/de/code/action_admin_login_profile.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, "admin_profile"); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "admin_profile")); // Pre-fetch field data with a given registry key $helper->prefetchValueInstance('user'); diff --git a/application/admin/templates/de/code/action_admin_status_problem.ctp b/application/admin/templates/de/code/action_admin_status_problem.ctp index 4c57125..665be0e 100644 --- a/application/admin/templates/de/code/action_admin_status_problem.ctp +++ b/application/admin/templates/de/code/action_admin_status_problem.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, "resend_link"); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "resend_link")); // Pre-fetch field data with a given registry key $helper->prefetchValueInstance('user'); @@ -25,7 +25,7 @@ $helper->flushContent(); if ($helper->ifUserAccountUnconfirmed()) { // Build the form for confirmation - $helper = WebFormHelper::createWebFormHelper($this, "confirm_code"); + $helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "confirm_code")); // Add code box $helper->addFormGroup('code', "Bitte gebe hier den Bestätigungscode aus der Willkommensemail ein. Solltest du diese nicht erhalten haben, kannst du dir diesen jetzt zusenden lassen."); diff --git a/application/admin/templates/de/code/block_persona_data.ctp b/application/admin/templates/de/code/block_persona_data.ctp index e92df8a..0f057e9 100644 --- a/application/admin/templates/de/code/block_persona_data.ctp +++ b/application/admin/templates/de/code/block_persona_data.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); diff --git a/application/admin/templates/de/code/captch_graphic_code.ctp b/application/admin/templates/de/code/captch_graphic_code.ctp index 210db8f..cf0e6e7 100644 --- a/application/admin/templates/de/code/captch_graphic_code.ctp +++ b/application/admin/templates/de/code/captch_graphic_code.ctp @@ -1,9 +1,15 @@ addFieldText('captcha_code', "Bitte wiederhole den Code:"); $captchaHelper->addInputTextField('c_code'); + +// Add hidden field with validation hash $captchaHelper->addInputHiddenField('hash', $this->readVariable('captcha_hash')); + +// Flush content $captchaHelper->flushContent(); // [EOF] diff --git a/application/admin/templates/de/code/login_failed.ctp b/application/admin/templates/de/code/login_failed.ctp index e7f7d75..378a957 100644 --- a/application/admin/templates/de/code/login_failed.ctp +++ b/application/admin/templates/de/code/login_failed.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('login_retry_link_text'); diff --git a/application/admin/templates/de/code/login_form.ctp b/application/admin/templates/de/code/login_form.ctp index afdf7b0..e685c54 100644 --- a/application/admin/templates/de/code/login_form.ctp +++ b/application/admin/templates/de/code/login_form.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, 'admin_user_login'); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'admin_user_login')); // Formular deaktiviert? if ($helper->ifLoginIsEnabled()) { @@ -51,7 +51,7 @@ if ($helper->ifLoginIsEnabled()) { $helper->flushContent(); // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register')); // Set link text $helper->addLinkWithTextById('register_login_form_link_text'); diff --git a/application/admin/templates/de/code/login_main.ctp b/application/admin/templates/de/code/login_main.ctp index edfdab6..ab8fc97 100644 --- a/application/admin/templates/de/code/login_main.ctp +++ b/application/admin/templates/de/code/login_main.ctp @@ -4,7 +4,7 @@ /////////////////////////////// // Get a new instance for personal data -$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'persona_data'); +$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'persona_data')); // Set the data source instance which must exist in registry $blockInstance->prefetchValueInstance('user'); @@ -23,7 +23,7 @@ if ($blockInstance->ifIncludeRegistrationStamp()) { $blockInstance->flushContent(); // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area')); // Add action $helper->addActionLink('logout', "Ausloggen"); diff --git a/application/admin/templates/de/code/logout_done.ctp b/application/admin/templates/de/code/logout_done.ctp index 63798fd..b55ffb1 100644 --- a/application/admin/templates/de/code/logout_done.ctp +++ b/application/admin/templates/de/code/logout_done.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('relogin_link_text'); diff --git a/application/admin/templates/de/code/register_form.ctp b/application/admin/templates/de/code/register_form.ctp index 4ba36c1..db6352c 100644 --- a/application/admin/templates/de/code/register_form.ctp +++ b/application/admin/templates/de/code/register_form.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, 'admin_register'); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'admin_register')); // Always ask at least for nickname and password $helper->addFormGroup('login', "Bitte gebe hier gewünschten Nickname und dein Zugangspasswort ein."); diff --git a/application/blog/config.php b/application/blog/config.php index a2900e6..7d84d50 100644 --- a/application/blog/config.php +++ b/application/blog/config.php @@ -247,5 +247,14 @@ $cfg->setConfigEntry('image_template_class', "ImageTemplateEngine"); // CFG: ADMIN-EMAIL $cfg->setConfigEntry('admin_email', "you@some-hoster.invalid"); +// CFG: WEB-BLOCK-HELPER +$cfg->setConfigEntry('web_block_helper', "WebBlockHelper"); + +// CFG: WEB-FORM-HELPER +$cfg->setConfigEntry('web_form_helper', "WebFormHelper"); + +// CFG: WEB-LINK-HELPER +$cfg->setConfigEntry('web_link_helper', "WebLinkHelper"); + // [EOF] ?> diff --git a/application/blog/templates/de/code/action_blog_login_logout.ctp b/application/blog/templates/de/code/action_blog_login_logout.ctp index 4dd47d9..09f289e 100644 --- a/application/blog/templates/de/code/action_blog_login_logout.ctp +++ b/application/blog/templates/de/code/action_blog_login_logout.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('logout_now_link_text'); @@ -9,7 +9,7 @@ $helper->addLinkWithTextById('logout_now_link_text'); $helper->flushContent(); // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'return_login_link', 'index.php?app={?app_short_name?}&page=login_area'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'return_login_link', 'index.php?app={?app_short_name?}&page=login_area')); // Set link text $helper->addLinkWithTextById('return_login_link_text'); diff --git a/application/blog/templates/de/code/action_blog_login_profile.ctp b/application/blog/templates/de/code/action_blog_login_profile.ctp index 51d442f..bf242b0 100644 --- a/application/blog/templates/de/code/action_blog_login_profile.ctp +++ b/application/blog/templates/de/code/action_blog_login_profile.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, "blog_profile"); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "blog_profile")); // Pre-fetch field data with a given registry key $helper->prefetchValueInstance('user'); diff --git a/application/blog/templates/de/code/action_blog_login_status_problem.ctp b/application/blog/templates/de/code/action_blog_login_status_problem.ctp index 88a47b1..7eaa447 100644 --- a/application/blog/templates/de/code/action_blog_login_status_problem.ctp +++ b/application/blog/templates/de/code/action_blog_login_status_problem.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, "resend_link"); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "resend_link")); // Pre-fetch field data with a given registry key $helper->prefetchValueInstance('user'); @@ -31,7 +31,7 @@ $helper->flushContent(); if ($helper->ifUserAccountUnconfirmed()) { // Build the form for confirmation - $helper = WebFormHelper::createWebFormHelper($this, "confirm_code"); + $helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "confirm_code")); // Add code box $helper->addFormGroup('code', "Bitte gebe hier den Bestätigungscode aus der Willkommensemail ein. Solltest du diese nicht erhalten haben, kannst du dir diesen jetzt zusenden lassen."); diff --git a/application/blog/templates/de/code/block_persona_data.ctp b/application/blog/templates/de/code/block_persona_data.ctp index e92df8a..0f057e9 100644 --- a/application/blog/templates/de/code/block_persona_data.ctp +++ b/application/blog/templates/de/code/block_persona_data.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); diff --git a/application/blog/templates/de/code/captch_graphic_code.ctp b/application/blog/templates/de/code/captch_graphic_code.ctp index 210db8f..cf0e6e7 100644 --- a/application/blog/templates/de/code/captch_graphic_code.ctp +++ b/application/blog/templates/de/code/captch_graphic_code.ctp @@ -1,9 +1,15 @@ addFieldText('captcha_code', "Bitte wiederhole den Code:"); $captchaHelper->addInputTextField('c_code'); + +// Add hidden field with validation hash $captchaHelper->addInputHiddenField('hash', $this->readVariable('captcha_hash')); + +// Flush content $captchaHelper->flushContent(); // [EOF] diff --git a/application/blog/templates/de/code/confirm_link.ctp b/application/blog/templates/de/code/confirm_link.ctp index eaf8060..bd87123 100644 --- a/application/blog/templates/de/code/confirm_link.ctp +++ b/application/blog/templates/de/code/confirm_link.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('direct_login_link_text'); diff --git a/application/blog/templates/de/code/login_failed.ctp b/application/blog/templates/de/code/login_failed.ctp index dc67766..09b28f0 100644 --- a/application/blog/templates/de/code/login_failed.ctp +++ b/application/blog/templates/de/code/login_failed.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('login_retry_link_text'); diff --git a/application/blog/templates/de/code/login_form.ctp b/application/blog/templates/de/code/login_form.ctp index dca6541..b22633a 100644 --- a/application/blog/templates/de/code/login_form.ctp +++ b/application/blog/templates/de/code/login_form.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, 'blog_user_login'); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'blog_user_login')); // Formular deaktiviert? if ($helper->ifLoginIsEnabled()) { @@ -53,7 +53,7 @@ $helper->flushContent(); // Ist Gastlogin erlaubt? if ($helper->ifGuestLoginAllowed()) { // Neue Helper-Instanz holen - $helper = WebFormHelper::createWebFormHelper($this, 'blog_guest_login'); + $helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'blog_guest_login')); $helper->addInputHiddenConfiguredField('user', 'guest_login'); $helper->addInputHiddenConfiguredField('passwd', 'guest_login'); @@ -70,7 +70,7 @@ if ($helper->ifGuestLoginAllowed()) { } // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register')); // Set link text $helper->addLinkWithTextById('register_login_form_link_text'); diff --git a/application/blog/templates/de/code/login_main.ctp b/application/blog/templates/de/code/login_main.ctp index df6c2ba..1713892 100644 --- a/application/blog/templates/de/code/login_main.ctp +++ b/application/blog/templates/de/code/login_main.ctp @@ -4,7 +4,7 @@ /////////////////////////////// // Get a new instance for personal data -$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'persona_data'); +$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'persona_data')); // Set the data source instance which must exist in registry $blockInstance->prefetchValueInstance('user'); @@ -27,7 +27,7 @@ $blockInstance->flushContent(); ////////////////////////////////////// // Get a new instance for personal data -$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'company_data'); +$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'company_data')); // Set the data source instance $blockInstance->prefetchValueInstance('company', 'user'); @@ -63,7 +63,7 @@ if ($blockInstance->getValueInstance()->ifUserIsFounder()) { $blockInstance->flushContent(); // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area')); // Add action $helper->addActionLink('logout', "Ausloggen"); diff --git a/application/blog/templates/de/code/logout_done.ctp b/application/blog/templates/de/code/logout_done.ctp index be8a24b..5f910e0 100644 --- a/application/blog/templates/de/code/logout_done.ctp +++ b/application/blog/templates/de/code/logout_done.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('relogin_link_text'); diff --git a/application/blog/templates/de/code/register_form.ctp b/application/blog/templates/de/code/register_form.ctp index a1304b7..5e5e350 100644 --- a/application/blog/templates/de/code/register_form.ctp +++ b/application/blog/templates/de/code/register_form.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, 'blog_register'); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'blog_register')); // Always ask at least for nickname and password $helper->addFormGroup('login', "Bitte gebe hier gewünschten Nickname und dein Zugangspasswort ein."); diff --git a/application/ship-simu/config.php b/application/ship-simu/config.php index 058397f..24f8cd7 100644 --- a/application/ship-simu/config.php +++ b/application/ship-simu/config.php @@ -325,5 +325,14 @@ $cfg->setConfigEntry('ship_simu_login_refill_payment_discovery', "LocalPaymentDi // CFG: GOVERMENT-STARTUP-HELP-LIMIT $cfg->setConfigEntry('goverment_startup_help_limit', 3); +// CFG: WEB-BLOCK-HELPER +$cfg->setConfigEntry('web_block_helper', "WebBlockHelper"); + +// CFG: WEB-FORM-HELPER +$cfg->setConfigEntry('web_form_helper', "WebFormHelper"); + +// CFG: WEB-LINK-HELPER +$cfg->setConfigEntry('web_link_helper', "WebLinkHelper"); + // [EOF] ?> diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp index 00ec77a..814df41 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp index 8a73e0c..b89a42e 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_training.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_training.ctp index e168ef9..802ea9e 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_training.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_training.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); @@ -22,7 +22,7 @@ $helperInstance->addFormNote('profile', "Stimmen die Daten noch? {?shipsimu_prof $helperInstance->flushContent(); // Get link helper for profile link -$linkInstance = WebLinkHelper::createWebLinkHelper($this, 'shipsimu_profile_link', 'index.php?app={?app_short_name?}&page=login_area'); +$linkInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'shipsimu_profile_link', 'index.php?app={?app_short_name?}&page=login_area')); // Add action $linkInstance->addActionLinkById('profile', 'goto_profile_link'); diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_logout.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_logout.ctp index 748db67..39d2105 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_logout.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_logout.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('logout_now_link_text'); @@ -9,7 +9,7 @@ $helperInstance->addLinkWithTextById('logout_now_link_text'); $helperInstance->flushContent(); // Get helper instance -$helperInstance = WebLinkHelper::createWebLinkHelper($this, 'return_login_link', 'index.php?app={?app_short_name?}&page=login_area'); +$helperInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'return_login_link', 'index.php?app={?app_short_name?}&page=login_area')); // Set link text $helperInstance->addLinkWithTextById('return_login_link_text'); diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_profile.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_profile.ctp index b97e27f..bac8735 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_profile.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_profile.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helperInstance = WebFormHelper::createWebFormHelper($this, "shipsimu_profile"); +$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "shipsimu_profile")); // Pre-fetch field data with a given registry key $helperInstance->prefetchValueInstance('user'); diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_refill.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_refill.ctp index b7af0c3..5b79c98 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_refill.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_refill.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('payments'); diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_status_problem.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_status_problem.ctp index a87303c..f3db301 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_status_problem.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_status_problem.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helperInstance = WebFormHelper::createWebFormHelper($this, "resend_link"); +$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "resend_link")); // Pre-fetch field data with a given registry key $helperInstance->prefetchValueInstance('user'); @@ -31,7 +31,7 @@ $helperInstance->flushContent(); if ($helperInstance->ifUserAccountUnconfirmed()) { // Build the form for confirmation - $helperInstance = WebFormHelper::createWebFormHelper($this, "confirm_code"); + $helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "confirm_code")); // Add code box $helperInstance->addFormGroup('code', "Bitte gebe hier den Bestätigungscode aus der Willkommensemail ein. Solltest du diese nicht erhalten haben, kannst du dir diesen jetzt zusenden lassen."); diff --git a/application/ship-simu/templates/de/code/block_persona_data.ctp b/application/ship-simu/templates/de/code/block_persona_data.ctp index def6835..536d5a4 100644 --- a/application/ship-simu/templates/de/code/block_persona_data.ctp +++ b/application/ship-simu/templates/de/code/block_persona_data.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); diff --git a/application/ship-simu/templates/de/code/captch_graphic_code.ctp b/application/ship-simu/templates/de/code/captch_graphic_code.ctp index 210db8f..cf0e6e7 100644 --- a/application/ship-simu/templates/de/code/captch_graphic_code.ctp +++ b/application/ship-simu/templates/de/code/captch_graphic_code.ctp @@ -1,9 +1,15 @@ addFieldText('captcha_code', "Bitte wiederhole den Code:"); $captchaHelper->addInputTextField('c_code'); + +// Add hidden field with validation hash $captchaHelper->addInputHiddenField('hash', $this->readVariable('captcha_hash')); + +// Flush content $captchaHelper->flushContent(); // [EOF] diff --git a/application/ship-simu/templates/de/code/confirm_link.ctp b/application/ship-simu/templates/de/code/confirm_link.ctp index cf2d03f..8e813fe 100644 --- a/application/ship-simu/templates/de/code/confirm_link.ctp +++ b/application/ship-simu/templates/de/code/confirm_link.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('direct_login_link_text'); diff --git a/application/ship-simu/templates/de/code/login_failed.ctp b/application/ship-simu/templates/de/code/login_failed.ctp index 39bca5a..a2c96e6 100644 --- a/application/ship-simu/templates/de/code/login_failed.ctp +++ b/application/ship-simu/templates/de/code/login_failed.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('login_retry_text'); diff --git a/application/ship-simu/templates/de/code/login_form.ctp b/application/ship-simu/templates/de/code/login_form.ctp index 86f81d3..d867503 100644 --- a/application/ship-simu/templates/de/code/login_form.ctp +++ b/application/ship-simu/templates/de/code/login_form.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helperInstance = WebFormHelper::createWebFormHelper($this, 'shipsimu_user_login'); +$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shipsimu_user_login')); // Formular deaktiviert? if ($helperInstance->ifLoginIsEnabled()) { @@ -53,7 +53,7 @@ $helperInstance->flushContent(); // Ist Gastlogin erlaubt? if ($helperInstance->ifGuestLoginAllowed()) { // Neue Helper-Instanz holen - $helperInstance = WebFormHelper::createWebFormHelper($this, 'shipsimu_guest_login'); + $helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shipsimu_guest_login')); $helperInstance->addInputHiddenConfiguredField('user', 'guest_login'); $helperInstance->addInputHiddenConfiguredField('passwd', 'guest_login'); @@ -70,7 +70,7 @@ if ($helperInstance->ifGuestLoginAllowed()) { } // Get helper instance -$helperInstance = WebLinkHelper::createWebLinkHelper($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register'); +$helperInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register')); // Set link text $helperInstance->addLinkWithTextById('register_login_form_link_text'); diff --git a/application/ship-simu/templates/de/code/login_main.ctp b/application/ship-simu/templates/de/code/login_main.ctp index 74c9e74..e8b0044 100644 --- a/application/ship-simu/templates/de/code/login_main.ctp +++ b/application/ship-simu/templates/de/code/login_main.ctp @@ -4,7 +4,7 @@ /////////////////////////////// // Get a new instance for personal data -$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'persona_data'); +$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'persona_data')); // Set the data source instance which must exist in registry $blockInstance->prefetchValueInstance('user'); @@ -27,7 +27,7 @@ $blockInstance->flushContent(); ////////////////////////////////////// // Get a new instance for personal data -$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'company_data'); +$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'company_data')); // Set the data source instance $blockInstance->prefetchValueInstance('company', 'user'); @@ -63,7 +63,7 @@ if ($blockInstance->getValueInstance()->ifUserIsFounder()) { $blockInstance->flushContent(); // Get helper instance -$linkInstance = WebLinkHelper::createWebLinkHelper($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area'); +$linkInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area')); // Add action $linkInstance->addLinkGroup('logout', ""); diff --git a/application/ship-simu/templates/de/code/logout_done.ctp b/application/ship-simu/templates/de/code/logout_done.ctp index 8e44f11..844da68 100644 --- a/application/ship-simu/templates/de/code/logout_done.ctp +++ b/application/ship-simu/templates/de/code/logout_done.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('relogin_link_text'); diff --git a/application/ship-simu/templates/de/code/register_form.ctp b/application/ship-simu/templates/de/code/register_form.ctp index 70dc67d..7aeed88 100644 --- a/application/ship-simu/templates/de/code/register_form.ctp +++ b/application/ship-simu/templates/de/code/register_form.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helperInstance = WebFormHelper::createWebFormHelper($this, 'shipsimu_register'); +$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shipsimu_register')); // Always ask at least for nickname and password $helperInstance->addFormGroup('login', "Bitte gebe hier gewünschten Nickname und dein Zugangspasswort ein."); diff --git a/application/shoutbox/config.php b/application/shoutbox/config.php index c77e1a3..466c9e6 100644 --- a/application/shoutbox/config.php +++ b/application/shoutbox/config.php @@ -247,5 +247,14 @@ $cfg->setConfigEntry('image_template_class', "ImageTemplateEngine"); // CFG: ADMIN-EMAIL $cfg->setConfigEntry('admin_email', "you@some-hoster.invalid"); +// CFG: WEB-BLOCK-HELPER +$cfg->setConfigEntry('web_block_helper', "WebBlockHelper"); + +// CFG: WEB-FORM-HELPER +$cfg->setConfigEntry('web_form_helper', "WebFormHelper"); + +// CFG: WEB-LINK-HELPER +$cfg->setConfigEntry('web_link_helper', "WebLinkHelper"); + // [EOF] ?> diff --git a/application/shoutbox/templates/de/code/action_shoutbox_login_logout.ctp b/application/shoutbox/templates/de/code/action_shoutbox_login_logout.ctp index fcf3d45..ac650ab 100644 --- a/application/shoutbox/templates/de/code/action_shoutbox_login_logout.ctp +++ b/application/shoutbox/templates/de/code/action_shoutbox_login_logout.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('logout_now_link_text'); @@ -9,7 +9,7 @@ $helper->addLinkWithTextById('logout_now_link_text'); $helper->flushContent(); // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'return_login_link', 'index.php?app={?app_short_name?}&page=login_area'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'return_login_link', 'index.php?app={?app_short_name?}&page=login_area')); // Set link text $helper->addLinkWithTextById('return_login_link_text'); diff --git a/application/shoutbox/templates/de/code/action_shoutbox_login_profile.ctp b/application/shoutbox/templates/de/code/action_shoutbox_login_profile.ctp index 3babf81..9caa52e 100644 --- a/application/shoutbox/templates/de/code/action_shoutbox_login_profile.ctp +++ b/application/shoutbox/templates/de/code/action_shoutbox_login_profile.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, "shoutbox_profile"); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "shoutbox_profile")); // Pre-fetch field data with a given registry key $helper->prefetchValueInstance('user'); diff --git a/application/shoutbox/templates/de/code/action_shoutbox_login_status_problem.ctp b/application/shoutbox/templates/de/code/action_shoutbox_login_status_problem.ctp index 88a47b1..7eaa447 100644 --- a/application/shoutbox/templates/de/code/action_shoutbox_login_status_problem.ctp +++ b/application/shoutbox/templates/de/code/action_shoutbox_login_status_problem.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, "resend_link"); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "resend_link")); // Pre-fetch field data with a given registry key $helper->prefetchValueInstance('user'); @@ -31,7 +31,7 @@ $helper->flushContent(); if ($helper->ifUserAccountUnconfirmed()) { // Build the form for confirmation - $helper = WebFormHelper::createWebFormHelper($this, "confirm_code"); + $helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "confirm_code")); // Add code box $helper->addFormGroup('code', "Bitte gebe hier den Bestätigungscode aus der Willkommensemail ein. Solltest du diese nicht erhalten haben, kannst du dir diesen jetzt zusenden lassen."); diff --git a/application/shoutbox/templates/de/code/block_persona_data.ctp b/application/shoutbox/templates/de/code/block_persona_data.ctp index e92df8a..0f057e9 100644 --- a/application/shoutbox/templates/de/code/block_persona_data.ctp +++ b/application/shoutbox/templates/de/code/block_persona_data.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); diff --git a/application/shoutbox/templates/de/code/captch_graphic_code.ctp b/application/shoutbox/templates/de/code/captch_graphic_code.ctp index 210db8f..cf0e6e7 100644 --- a/application/shoutbox/templates/de/code/captch_graphic_code.ctp +++ b/application/shoutbox/templates/de/code/captch_graphic_code.ctp @@ -1,9 +1,15 @@ addFieldText('captcha_code', "Bitte wiederhole den Code:"); $captchaHelper->addInputTextField('c_code'); + +// Add hidden field with validation hash $captchaHelper->addInputHiddenField('hash', $this->readVariable('captcha_hash')); + +// Flush content $captchaHelper->flushContent(); // [EOF] diff --git a/application/shoutbox/templates/de/code/confirm_link.ctp b/application/shoutbox/templates/de/code/confirm_link.ctp index a399741..1542746 100644 --- a/application/shoutbox/templates/de/code/confirm_link.ctp +++ b/application/shoutbox/templates/de/code/confirm_link.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('direct_login_link_text'); diff --git a/application/shoutbox/templates/de/code/login_failed.ctp b/application/shoutbox/templates/de/code/login_failed.ctp index f8c9097..fbc47b4 100644 --- a/application/shoutbox/templates/de/code/login_failed.ctp +++ b/application/shoutbox/templates/de/code/login_failed.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('login_retry_link_text'); diff --git a/application/shoutbox/templates/de/code/login_form.ctp b/application/shoutbox/templates/de/code/login_form.ctp index 68cbe47..e0a72b0 100644 --- a/application/shoutbox/templates/de/code/login_form.ctp +++ b/application/shoutbox/templates/de/code/login_form.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, 'shoutbox_user_login'); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shoutbox_user_login')); // Formular deaktiviert? if ($helper->ifLoginIsEnabled()) { @@ -53,7 +53,7 @@ $helper->flushContent(); // Ist Gastlogin erlaubt? if ($helper->ifGuestLoginAllowed()) { // Neue Helper-Instanz holen - $helper = WebFormHelper::createWebFormHelper($this, 'shoutbox_guest_login'); + $helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shoutbox_guest_login')); $helper->addInputHiddenConfiguredField('user', 'guest_login'); $helper->addInputHiddenConfiguredField('passwd', 'guest_login'); @@ -70,7 +70,7 @@ if ($helper->ifGuestLoginAllowed()) { } // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register')); // Set link text $helper->addLinkWithTextById('register_login_form_link_text'); diff --git a/application/shoutbox/templates/de/code/login_main.ctp b/application/shoutbox/templates/de/code/login_main.ctp index df6c2ba..1713892 100644 --- a/application/shoutbox/templates/de/code/login_main.ctp +++ b/application/shoutbox/templates/de/code/login_main.ctp @@ -4,7 +4,7 @@ /////////////////////////////// // Get a new instance for personal data -$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'persona_data'); +$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'persona_data')); // Set the data source instance which must exist in registry $blockInstance->prefetchValueInstance('user'); @@ -27,7 +27,7 @@ $blockInstance->flushContent(); ////////////////////////////////////// // Get a new instance for personal data -$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'company_data'); +$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'company_data')); // Set the data source instance $blockInstance->prefetchValueInstance('company', 'user'); @@ -63,7 +63,7 @@ if ($blockInstance->getValueInstance()->ifUserIsFounder()) { $blockInstance->flushContent(); // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area')); // Add action $helper->addActionLink('logout', "Ausloggen"); diff --git a/application/shoutbox/templates/de/code/logout_done.ctp b/application/shoutbox/templates/de/code/logout_done.ctp index 6148981..41014b0 100644 --- a/application/shoutbox/templates/de/code/logout_done.ctp +++ b/application/shoutbox/templates/de/code/logout_done.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('relogin_link_text'); diff --git a/application/shoutbox/templates/de/code/register_form.ctp b/application/shoutbox/templates/de/code/register_form.ctp index 7314501..377d53e 100644 --- a/application/shoutbox/templates/de/code/register_form.ctp +++ b/application/shoutbox/templates/de/code/register_form.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, 'shoutbox_register'); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shoutbox_register')); // Always ask at least for nickname and password $helper->addFormGroup('login', "Bitte gebe hier gewünschten Nickname und dein Zugangspasswort ein."); diff --git a/application/todo/config.php b/application/todo/config.php index 02f9e7b..8b664b0 100644 --- a/application/todo/config.php +++ b/application/todo/config.php @@ -247,5 +247,14 @@ $cfg->setConfigEntry('image_template_class', "ImageTemplateEngine"); // CFG: ADMIN-EMAIL $cfg->setConfigEntry('admin_email', "you@some-hoster.invalid"); +// CFG: WEB-BLOCK-HELPER +$cfg->setConfigEntry('web_block_helper', "WebBlockHelper"); + +// CFG: WEB-FORM-HELPER +$cfg->setConfigEntry('web_form_helper', "WebFormHelper"); + +// CFG: WEB-LINK-HELPER +$cfg->setConfigEntry('web_link_helper', "WebLinkHelper"); + // [EOF] ?> diff --git a/application/todo/templates/de/code/action_todo_login_logout.ctp b/application/todo/templates/de/code/action_todo_login_logout.ctp index 8d96247..cfb4289 100644 --- a/application/todo/templates/de/code/action_todo_login_logout.ctp +++ b/application/todo/templates/de/code/action_todo_login_logout.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('logout_now_link_text'); @@ -9,7 +9,7 @@ $helper->addLinkWithTextById('logout_now_link_text'); $helper->flushContent(); // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'return_login_link', 'index.php?app={?app_short_name?}&page=login_area'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'return_login_link', 'index.php?app={?app_short_name?}&page=login_area')); // Set link text $helper->addLinkWithTextById('return_login_link_text'); diff --git a/application/todo/templates/de/code/action_todo_login_profile.ctp b/application/todo/templates/de/code/action_todo_login_profile.ctp index 5337a19..153c1a2 100644 --- a/application/todo/templates/de/code/action_todo_login_profile.ctp +++ b/application/todo/templates/de/code/action_todo_login_profile.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, "todo_profile"); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "todo_profile")); // Pre-fetch field data with a given registry key $helper->prefetchValueInstance('user'); diff --git a/application/todo/templates/de/code/action_todo_login_status_problem.ctp b/application/todo/templates/de/code/action_todo_login_status_problem.ctp index 88a47b1..7eaa447 100644 --- a/application/todo/templates/de/code/action_todo_login_status_problem.ctp +++ b/application/todo/templates/de/code/action_todo_login_status_problem.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, "resend_link"); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "resend_link")); // Pre-fetch field data with a given registry key $helper->prefetchValueInstance('user'); @@ -31,7 +31,7 @@ $helper->flushContent(); if ($helper->ifUserAccountUnconfirmed()) { // Build the form for confirmation - $helper = WebFormHelper::createWebFormHelper($this, "confirm_code"); + $helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "confirm_code")); // Add code box $helper->addFormGroup('code', "Bitte gebe hier den Bestätigungscode aus der Willkommensemail ein. Solltest du diese nicht erhalten haben, kannst du dir diesen jetzt zusenden lassen."); diff --git a/application/todo/templates/de/code/block_persona_data.ctp b/application/todo/templates/de/code/block_persona_data.ctp index e92df8a..0f057e9 100644 --- a/application/todo/templates/de/code/block_persona_data.ctp +++ b/application/todo/templates/de/code/block_persona_data.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); diff --git a/application/todo/templates/de/code/captch_graphic_code.ctp b/application/todo/templates/de/code/captch_graphic_code.ctp index 210db8f..cf0e6e7 100644 --- a/application/todo/templates/de/code/captch_graphic_code.ctp +++ b/application/todo/templates/de/code/captch_graphic_code.ctp @@ -1,9 +1,15 @@ addFieldText('captcha_code', "Bitte wiederhole den Code:"); $captchaHelper->addInputTextField('c_code'); + +// Add hidden field with validation hash $captchaHelper->addInputHiddenField('hash', $this->readVariable('captcha_hash')); + +// Flush content $captchaHelper->flushContent(); // [EOF] diff --git a/application/todo/templates/de/code/confirm_link.ctp b/application/todo/templates/de/code/confirm_link.ctp index b6fa742..4e96afe 100644 --- a/application/todo/templates/de/code/confirm_link.ctp +++ b/application/todo/templates/de/code/confirm_link.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('direct_login_link_text'); diff --git a/application/todo/templates/de/code/login_failed.ctp b/application/todo/templates/de/code/login_failed.ctp index 4255c18..c066f43 100644 --- a/application/todo/templates/de/code/login_failed.ctp +++ b/application/todo/templates/de/code/login_failed.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('login_retry_link_text'); diff --git a/application/todo/templates/de/code/login_form.ctp b/application/todo/templates/de/code/login_form.ctp index 31e62d1..9ccba17 100644 --- a/application/todo/templates/de/code/login_form.ctp +++ b/application/todo/templates/de/code/login_form.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, 'todo_user_login'); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'todo_user_login')); // Formular deaktiviert? if ($helper->ifLoginIsEnabled()) { @@ -53,7 +53,7 @@ $helper->flushContent(); // Ist Gastlogin erlaubt? if ($helper->ifGuestLoginAllowed()) { // Neue Helper-Instanz holen - $helper = WebFormHelper::createWebFormHelper($this, 'todo_guest_login'); + $helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'todo_guest_login')); $helper->addInputHiddenConfiguredField('user', 'guest_login'); $helper->addInputHiddenConfiguredField('passwd', 'guest_login'); @@ -70,7 +70,7 @@ if ($helper->ifGuestLoginAllowed()) { } // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register')); // Set link text $helper->addLinkWithTextById('register_login_form_link_text'); diff --git a/application/todo/templates/de/code/login_main.ctp b/application/todo/templates/de/code/login_main.ctp index df6c2ba..1713892 100644 --- a/application/todo/templates/de/code/login_main.ctp +++ b/application/todo/templates/de/code/login_main.ctp @@ -4,7 +4,7 @@ /////////////////////////////// // Get a new instance for personal data -$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'persona_data'); +$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'persona_data')); // Set the data source instance which must exist in registry $blockInstance->prefetchValueInstance('user'); @@ -27,7 +27,7 @@ $blockInstance->flushContent(); ////////////////////////////////////// // Get a new instance for personal data -$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'company_data'); +$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'company_data')); // Set the data source instance $blockInstance->prefetchValueInstance('company', 'user'); @@ -63,7 +63,7 @@ if ($blockInstance->getValueInstance()->ifUserIsFounder()) { $blockInstance->flushContent(); // Get helper instance -$helper = WebLinkHelper::createWebLinkHelper($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area'); +$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area')); // Add action $helper->addActionLink('logout', "Ausloggen"); diff --git a/application/todo/templates/de/code/logout_done.ctp b/application/todo/templates/de/code/logout_done.ctp index 4898b72..4747b95 100644 --- a/application/todo/templates/de/code/logout_done.ctp +++ b/application/todo/templates/de/code/logout_done.ctp @@ -1,6 +1,6 @@ addLinkWithTextById('relogin_link_text'); diff --git a/application/todo/templates/de/code/register_form.ctp b/application/todo/templates/de/code/register_form.ctp index 4d82961..dd6b6ad 100644 --- a/application/todo/templates/de/code/register_form.ctp +++ b/application/todo/templates/de/code/register_form.ctp @@ -2,7 +2,7 @@ // Get helper instance for web forms. This will add the opening form-tag to // the helper's render cache which is simply a small variable in the class // BaseHelper. -$helper = WebFormHelper::createWebFormHelper($this, 'todo_register'); +$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'todo_register')); // Always ask at least for nickname and password $helper->addFormGroup('login', "Bitte gebe hier gewünschten Nickname und dein Zugangspasswort ein."); -- 2.39.5