Loading pages/minimodules_custom/contact.php +9 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ if (is_guest()) { } } require_code('decision_tree'); $decision_tree = array( 'start' => array( 'title' => 'Contact request', Loading Loading @@ -184,6 +186,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Job'), '_SEARCH'), ), Loading Loading @@ -882,6 +885,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ), 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Project'), '_SEARCH'), 'expects_parameters' => array( 'title', Loading Loading @@ -944,6 +948,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Installation'), '_SEARCH'), ), Loading Loading @@ -1005,6 +1010,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => true, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Secondment'), '_SEARCH'), ), Loading Loading @@ -1050,6 +1056,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Professional support'), '_SEARCH'), ), Loading Loading @@ -1104,6 +1111,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Professional support'), '_SEARCH'), ), Loading Loading @@ -1198,11 +1206,11 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Upgrade'), '_SEARCH'), ), ); require_code('decision_tree'); $ob = new DecisionTree($decision_tree, 'start'); $tpl = $ob->run(); $tpl->evaluate_echo(); sources/decision_tree.php +16 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,18 @@ Other features - Actually 'inform'/'notice'/'warn' can take a 'next'-style array, in which case the messages are shown using JavaScript upon option selection */ /** * Standard code module initialisation function. * * @ignore */ function init__decision_tree() { if (addon_installed('captcha')) { require_code('captcha'); } } /** * Provide multi-screen (multi-form) decision trees. * Loading Loading @@ -331,6 +343,10 @@ class DecisionTree } } if (!empty($details['needs_captcha'])) { $fields->attach(form_input_captcha()); } $form_method = empty($details['form_method']) ? 'POST' : $details['form_method']; $hidden->attach(build_keep_post_fields(null, true)); Loading Loading
pages/minimodules_custom/contact.php +9 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ if (is_guest()) { } } require_code('decision_tree'); $decision_tree = array( 'start' => array( 'title' => 'Contact request', Loading Loading @@ -184,6 +186,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Job'), '_SEARCH'), ), Loading Loading @@ -882,6 +885,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ), 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Project'), '_SEARCH'), 'expects_parameters' => array( 'title', Loading Loading @@ -944,6 +948,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Installation'), '_SEARCH'), ), Loading Loading @@ -1005,6 +1010,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => true, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Secondment'), '_SEARCH'), ), Loading Loading @@ -1050,6 +1056,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Professional support'), '_SEARCH'), ), Loading Loading @@ -1104,6 +1111,7 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Professional support'), '_SEARCH'), ), Loading Loading @@ -1198,11 +1206,11 @@ Ask us if you wanted to be listed as one of the [page=\"site:stars\"]Composr dev 'required' => false, ), ) + $extra_brief_details, 'needs_captcha' => ((addon_installed('captcha')) && (get_option('captcha_on_feedback') == '1') && (use_captcha())), 'next' => build_url(array('page' => 'tickets', 'type' => 'post', 'ticket_type' => 'Upgrade'), '_SEARCH'), ), ); require_code('decision_tree'); $ob = new DecisionTree($decision_tree, 'start'); $tpl = $ob->run(); $tpl->evaluate_echo();
sources/decision_tree.php +16 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,18 @@ Other features - Actually 'inform'/'notice'/'warn' can take a 'next'-style array, in which case the messages are shown using JavaScript upon option selection */ /** * Standard code module initialisation function. * * @ignore */ function init__decision_tree() { if (addon_installed('captcha')) { require_code('captcha'); } } /** * Provide multi-screen (multi-form) decision trees. * Loading Loading @@ -331,6 +343,10 @@ class DecisionTree } } if (!empty($details['needs_captcha'])) { $fields->attach(form_input_captcha()); } $form_method = empty($details['form_method']) ? 'POST' : $details['form_method']; $hidden->attach(build_keep_post_fields(null, true)); Loading