Plugin Directory

Changeset 2796267


Ignore:
Timestamp:
10/09/2022 09:09:52 PM (3 years ago)
Author:
registerone
Message:

v3.6.1

Location:
registerone-event-forms/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • registerone-event-forms/trunk/admin/classes/RegisteroneShortcodes.php

    r2770659 r2796267  
    540540            echo "</pre>";
    541541            die;
     542            /*
     543            [name] => PHP Notice
     544            [message] => Trying to get property of non-object
     545            [code] => 8
     546            [type] => yii\base\ErrorException
     547             * */
    542548        }
    543549
     
    547553
    548554        /* If WP_Error, throw exception */
     555        $return_api_error = false;
    549556        if (is_wp_error($responses)) {
    550557            throw new Exception('Request failed. ' . $responses->get_error_messages());
     558
     559        }elseif(isset($_SERVER['SERVER_ADDR'])) {
     560            $return_local = json_decode($responses,true);
     561            if(isset($return_local['type'])){
     562                if(stristr($return_local['type'], 'ErrorException')){
     563                    $return_api_error = true;
     564                }
     565            }
     566            $ip_addr = explode(".", $_SERVER['SERVER_ADDR']);
     567            if($return_api_error){
     568                if ($ip_addr[0] == '192' && $ip_addr[1] == '168') {
     569                    if(stristr($return_local['type'], 'ErrorException')){
     570                        echo "<pre>";
     571                        print_r(json_decode($responses,true));
     572                        echo "</pre>";
     573                        die;
     574                    }
     575                } else {
     576                    $screen = $this->_generate_screen($responses, 'error');
     577                    return $screen;
     578                }
     579            }
    551580        }
    552581
     
    734763            case "profile":
    735764                return $this->_profile_screen($formData);
     765                break;
     766
     767            case "session":
     768                return $this->_session_screen($formData);
    736769                break;
    737770
     
    16021635                break;
    16031636
     1637            case "session":
     1638
     1639                $responses = json_decode( $this->_execute_session_screen_submission($data), true);
     1640
     1641                // print_r($responses); die;
     1642
     1643                if($responses['code'] == 201) {
     1644
     1645                    $next_step_a = $responses['next_step'][0];
     1646
     1647                    $key_pos = (int)array_search($data['dwc_screen_name'],$next_step_a);
     1648                    if($this->_count_array($next_step_a) > 1) { $key_pos++; }
     1649
     1650                    $redirect_url = $root;
     1651                    $redirect_url .= "?".$next_step_a[$key_pos];
     1652
     1653                    // if returned by profile, is attendee "tickets" token
     1654                    if(isset($responses['ticket_api_token']) && isset($responses['profile_key'])){
     1655
     1656                        $redirect_url .= "&pk=" . $responses['profile_key'];
     1657                        $redirect_url .= "." . sanitize_text_field($responses['ticket_api_token']);
     1658
     1659                        /////////////////////////////
     1660                        // ADD api_token session here
     1661                        unset($_SESSION['ticket_api_token']);
     1662                        $_SESSION['api_token'] = $responses['ticket_api_token'];
     1663                        session_write_close();
     1664
     1665                    }elseif(isset($responses['profile_key']) && $responses['profile_key'] != '') {
     1666
     1667                        $redirect_url .= "&pk=" . $responses['profile_key'];
     1668
     1669                        if(isset($_SESSION['api_token'])){
     1670                            $redirect_url .= "." . sanitize_text_field($_SESSION['api_token']);
     1671
     1672                        }elseif(isset($responses['api_token'])){
     1673                            $redirect_url .= "." . sanitize_text_field($responses['api_token']);
     1674
     1675                            /////////////////////////////
     1676                            // ADD api_token session here
     1677                            unset($_SESSION['api_token']);
     1678                            $_SESSION['api_token'] = $responses['api_token'];
     1679                            session_write_close();
     1680                        }
     1681                    }
     1682
     1683                    if(isset($responses['is_badge_post'])){
     1684                        $redirect_url .= "&saved=1";
     1685                    }
     1686
     1687                    $mt = str_replace('.', '', microtime(true));
     1688                    $redirect_url .= "&v=".$mt;
     1689
     1690                    wp_redirect($redirect_url);
     1691                    exit();
     1692
     1693                }elseif($responses['code'] == 0) {
     1694
     1695                    $redirect_url = $root;
     1696                    $redirect_url .= "?profile";
     1697
     1698                    if(isset($responses['profile_key']) && $responses['profile_key'] != '') {
     1699                        $redirect_url .= "&pk=" . $responses['profile_key'];
     1700
     1701                        if(isset($_SESSION['api_token'])){
     1702                            $redirect_url .= "." . sanitize_text_field($_SESSION['api_token']);
     1703                        }
     1704                    }
     1705
     1706                    $redirect_url .= "&status=" . $responses['status'];
     1707                    wp_redirect($redirect_url);
     1708                    exit();
     1709                }
     1710                break;
     1711
    16041712            case "uploads":
    16051713
     
    19682076            ]
    19692077        );
     2078
     2079        if (isset($data['profile_key']) && !empty($data['profile_key'])) {
     2080            $request_url = $this->base_request_url . $data['form_code'] . "/" . $data['dwc_screen_name'] . "/" . $data['profile_key'];
     2081
     2082            if (isset($data['rfc']) && !empty($data['rfc'])) {
     2083                $request_url .= "/" . $data['rfc'];
     2084            }
     2085
     2086        } elseif (isset($data['rfc']) && isset($data['rpk'])) {
     2087            $request_url = $this->base_request_url . $data['form_code'] . "/" . $data['dwc_screen_name'] . "/" . $data['rpk'] . "/" . $data['rfc'];
     2088
     2089        } else {
     2090            if (isset($data['return_vendor'])) {
     2091                $request_url = $this->base_request_url . $data['form_code'] . "/return/" . (int)$data['return_vendor'];
     2092            }else{
     2093                $request_url = $this->base_request_url . $data['form_code'] . "/" . $data['dwc_screen_name'];
     2094            }
     2095        }
     2096
     2097        $responses = wp_remote_retrieve_body(wp_remote_post($request_url, $request_args));
     2098
     2099        return $responses;
     2100    }
     2101
     2102    /**
     2103     * @param $data
     2104     * @return string
     2105     */
     2106    private function _execute_session_screen_submission($data)
     2107    {
     2108        global $wp;
     2109
     2110        $headers = $this->_set_request_header(['Accept' => "application/json, text/javascript, */*; q=0.01", 'Authorization' => 'Basic ' . $this->plugin_api_auth_key]);
     2111
     2112        if(is_array($data['Sessions']['client_applic_type'])) {
     2113            if ($this->_count_array($data['Sessions']['client_applic_type']) > 0) {
     2114                $data['Sessions']['client_applic_type'] = json_encode($data['Sessions']['client_applic_type']);
     2115            }
     2116        }
     2117
     2118        if(is_array($data['Sessions']['client_applic_type'])) {
     2119            if ($this->_count_array($data['Sessions']['client_merc']) > 0) {
     2120                $data['Sessions']['client_merc'] = json_encode($data['Sessions']['client_merc']);
     2121            }
     2122        }
     2123
     2124        $redirect_url = $_SERVER['HTTP_REFERER'];
     2125        $data['Sessions']['referring_url'] = json_encode($redirect_url);
     2126
     2127        $request_args = $this->_get_request_args([
     2128                'method' => 'POST',
     2129                'headers' => $headers,
     2130                'body' => $data['Sessions']
     2131            ]
     2132        );
     2133
     2134        // print_r($request_args); die;
    19702135
    19712136        if (isset($data['profile_key']) && !empty($data['profile_key'])) {
     
    23592524            return "profile";
    23602525
     2526        }elseif(isset( $_GET['session'])){
     2527            return "session";
     2528
    23612529        }elseif(isset( $_GET['uploads'])){
    23622530            return "uploads";
     
    25252693        $form = $this->_set_application_title($this->event_attributes, $form);
    25262694
    2527         $form = $this->_set_application_steps('profile', $form, $formData);
     2695        // $form = $this->_set_application_steps('profile', $form, $formData);
    25282696
    25292697        $form = $this->_create_error_screen($formData, $form);
     
    26162784
    26172785        $form = $this->_create_profile_screen_fields($formData, $form);
     2786
     2787        return $this->_wrap_with_parents($form);
     2788    }
     2789
     2790    /**
     2791     * @param $formData
     2792     * @return string
     2793     */
     2794    private function _session_screen($formData)
     2795    {
     2796        $form = "";
     2797
     2798        // print_r($this->event_attributes); die;
     2799        $event_a = $formData['event_a'];
     2800
     2801        $form = $this->_set_application_title($this->event_attributes, $form);
     2802
     2803        $form = $this->_set_application_steps('session', $form, $formData);
     2804
     2805        $form = $this->_create_session_screen_fields($formData, $form);
    26182806
    26192807        return $this->_wrap_with_parents($form);
     
    39654153    private function _create_map_screen_fields($request_url_info)
    39664154    {
    3967         $attributes = json_decode( $this->event_attributes, true);
     4155        $attributes = is_array($this->event_attributes) ? $this->event_attributes : json_decode( $this->event_attributes, true);
    39684156        global $wp;
    39694157
     
    53805568
    53815569                        <div class="form-group field-event required">
    5382                             <label class="col-lg-2 control-label"
     5570                            <label class="col-lg-2 control-label well-label"
    53835571                                   for="amenity-types"><?php echo $formData['amenity_types_a'][$val].$required_flag; ?>
    53845572                            </label>
     
    54085596                                        <?php if($formData['order_lock'] == 0 && $map_policy == 2): ?>
    54095597                                            <a href="<?php echo esc_url($this->_get_skip_url(['amenities' => '', 'map' => $selectorKey, 'pk' => $pk])); ?>"
    5410                                                class="btn btn-success" style="text-decoration: none; margin-bottom: 6px; margin-top: 6px;"><?= $map_button_label ?> <?php echo $selector; ?></a>
     5598                                               class="btn btn-success" style="text-decoration: none; margin-left: 15px; margin-bottom: 6px; margin-top: 2px;"><?= $map_button_label ?> <?php echo $selector; ?></a>
    54115599
    54125600                                        <?php elseif($formData['order_lock'] == 1 && $map_policy == 2): ?>
    54135601                                            <button
    5414                                                class="btn btn-grey" style="cursor: no-drop; border: 1px solid #c8c8c8; text-decoration: none; margin-bottom: 6px; margin-top: 6px;"><?= $map_button_label ?> <?php echo $selector; ?></button>
     5602                                               class="btn btn-grey" style="cursor: no-drop; border: 1px solid #c8c8c8; text-decoration: none; margin-left: 15px; margin-bottom: 6px; margin-top: 6px;"><?= $map_button_label ?> <?php echo $selector; ?></button>
    54155603                                            <script>
    54165604                                            $("button").click(function(e) {
     
    55545742
    55555743                            <div class="form-group field-event required">
    5556                                 <label class="col-lg-2 control-label"
     5744                                <label class="col-lg-2 control-label well-label"
    55575745                                       for="amenity-types"><?php echo $formData['amenity_types_a'][$val]; ?><?= $required_flag ?></label>
    55585746
     
    59086096
    59096097                    <div class="form-group field-clients-name">
    5910                         <label class="col-lg-2 control-label" for="extra-<?= $amenity_field_id; ?>-<?= $c; ?>"><?= $formData['am_field_labels_a'][$amenity_id][$amenity_field_id]; ?><?= $req_flag ?></label>
     6098                        <label class="col-lg-2 control-label well-label" for="extra-<?= $amenity_field_id; ?>-<?= $c; ?>"><?= $formData['am_field_labels_a'][$amenity_id][$amenity_field_id]; ?><?= $req_flag ?></label>
    59116099                        <div class="col-lg-8">
    59126100                            <?php if($this->_count_array($selector_a) > 0): ?>
     
    62236411
    62246412                            <div>
    6225                                 <p class="help-block">
     6413                                <p class="help-block-uploads">
    62266414                                    <strong>File types</strong>:
    62276415                                    <?php
     
    65706758                        $field = str_replace("%button%", $button, $field);
    65716759                        $field = str_replace("_reset_password_url_", $reset_password_url, $field);
    6572                         $field = str_replace("group-hover", 'login-fields', $field);
     6760                        $field = str_replace("group-hover-disabled", 'login-fields', $field);
    65736761                        $field = str_replace("help-block", 'help-block-login', $field);
    65746762                        $field = str_replace("form-group", 'form-group-login', $field);
     
    68737061
    68747062                        $field = str_replace("form-group", 'form-group-login', $field);
    6875                         $field = str_replace("group-hover", 'login-fields', $field);
     7063                        $field = str_replace("group-hover-disabled", 'login-fields', $field);
    68767064                        $field = str_replace("help-block", 'help-block-login', $field);
    68777065                        echo str_replace("%button%", $button, $field);
     
    72027390            <?php
    72037391            return ($form . $this->_generate_profile_screen_field(ob_get_clean(), $client_a, $event_a, $pre_launch_count));
     7392        }
     7393
     7394        /**
     7395         * @param $formData
     7396         * @param $form
     7397         * @return string
     7398         */
     7399        private function _create_session_screen_fields($formData, $form)
     7400        {
     7401            $client_a = isset($formData['client_a']) ? $formData['client_a'] : [];
     7402            $event_a = $formData['event_a'];
     7403            $pre_launch_count = $formData['pre_launch_count'];
     7404
     7405            if(isset($client_a['is_admin'])){
     7406                $audit = $client_a['is_admin'];
     7407            }else{
     7408                $audit = false;
     7409            }
     7410            ?>
     7411
     7412            <?php
     7413            // field types (from profile_fields::field_type) that are stored in json_encoded array (in applicant_field_data::text_long)
     7414            $selector_fields = ['dropdown','radio','checkboxes'];
     7415
     7416            ob_start();
     7417
     7418            $is_new = true;
     7419            $skip_profile = false;
     7420            if(isset( $_GET['rfc']) && $_GET['rfc'] != ''){
     7421                $is_new = $_GET['rfc'] == 'new' ? true : false;
     7422            }elseif(isset( $_GET['pk']) && $_GET['pk'] != ''){
     7423                $is_new = false;
     7424            }
     7425            ?>
     7426
     7427            <?php if($event_a['rsvp_form_host_id'] > 0): ?>
     7428                <?php if($is_new && !isset($_SESSION['ok']) && !isset($_GET['ok']) && !$logout_flag): ?>
     7429                    <?php $skip_profile = true; ?>
     7430                    <div class="well-warning form-group-top-error field-clients-value-apply_step1">
     7431                        <div class="col-lg-8">
     7432                            <div class='red-alert'><h4>Origin Key not found for NEW profiles. Please check form URL.</h4></div>
     7433                            <h5>The form URL should end with /?ok=12345 (example).</h5>
     7434                            <div style="margin-top:20px;"><h5>If you ALREADY created a profile, click Login to continue.</h5></div>
     7435                        </div>
     7436                    </div>
     7437                <?php endif; ?>
     7438            <?php endif; ?>
     7439
     7440            <?php if(!$skip_profile): ?>
     7441                <?php
     7442                $input_data = '';
     7443                if(isset($formData['profile_field_data_a'])) {
     7444                    foreach ($formData['profile_field_data_a'] AS $input_data) {
     7445                        if (isset($input_data['field_type'])) {
     7446
     7447                            if (in_array($input_data['field_type'], $selector_fields)) {
     7448                                $input_data['option_values_a'] = json_decode($input_data['option_values_a'], true);
     7449                            }
     7450
     7451                            // skip com_prefs on all forms
     7452                            if($input_data['model_field'] == 'com_prefs'){
     7453                                continue;
     7454                            }
     7455
     7456                            // hide applic type or badge sub-form
     7457                            if($input_data['model_field'] == 'client_types_a' &&
     7458                                ($event_a['client_type_hide'] == 1 || (int)$formData["applicant_a"]["origin_applic_id"] > 0)){
     7459                                $hidden_input_client_type = '<input type="hidden" name="Clients[client_applic_type][]" value="'.$event_a['client_types'][0].'">';
     7460                                continue;
     7461                            }
     7462
     7463                            // stuff country code into input data
     7464                            $input_data['input_default_country_code'] = $formData['event_a']['phone_code_default'];
     7465
     7466                            // stuff session top input data
     7467                            $input_data['session_top_level_a'] = $formData['event_a']['session_top_level_a'];
     7468
     7469                            // stuff session input values
     7470                            $input_data['session_chain_values_a'] = $formData['event_a']['session_chain_values_a'];
     7471
     7472                            // stuff session levels array
     7473                            $input_data['session_levels_a'] = $formData['event_a']['session_levels_a'];
     7474
     7475                            // allow custom keywords
     7476                            $input_data['custom_keywords_allowed'] = 1;
     7477
     7478                            echo $this->_generate_input_field($input_data['field_type'], $input_data, $audit);
     7479                        }
     7480                    }
     7481                }
     7482                ?>
     7483            <?php endif; ?>
     7484
     7485            <div class="form-group field-clients-value-apply_step1">
     7486                <div class="col-lg-8">
     7487                    <input type="hidden" id="clients-value-apply_step1" class="form-control" name="Sessions[Value][apply_step1]" value="1">
     7488                </div>
     7489            </div>
     7490
     7491            <?php if(!$skip_profile): ?>
     7492                <div class="col-lg-offset-2 col-lg-11" style="margin-bottom:10px; margin-left:10px;">
     7493                    <span class="red-alert">*</span> = required field
     7494                </div>
     7495
     7496                <?php if(!empty($formData['event_a']['privacy_policy_url'])): ?>
     7497                    <div class="form-group field-event">
     7498                        <div class="col-lg-offset-2 col-lg-10">
     7499                            <div class="block_text well">
     7500                                <?= $formData['privacy_policy_dialogue'] ?>
     7501                            </div>
     7502                        </div>
     7503                    </div>
     7504                <?php endif; ?>
     7505
     7506                <div class="form-group">
     7507                    <div class="col-lg-offset-2 col-lg-11">
     7508                        <button type="submit" id="submit-apply" class="btn btn-success-bottom pull-left">
     7509                            <?php if(isset( $_GET['pk']) && $_GET['pk'] != ''){ ?>
     7510                                <?php if((int)$formData["applicant_a"]["origin_applic_id"] > 0): ?>
     7511                                    Save Badge Details
     7512                                <?php else: ?>
     7513                                    <?= $this->_button_label_swap('save_continue') ?> <i style="margin-left:0px;" class="fa fa-chevron-right" aria-hidden="true"></i>
     7514                                <?php endif; ?>
     7515                            <?php }else{ ?>
     7516                                Next
     7517                            <?php } ?>
     7518                        </button>
     7519                        <div id="submit-spinner" class="pull-left"></div>
     7520                    </div>
     7521                </div>
     7522            <?php endif; ?>
     7523
     7524            <?php if(isset($hidden_input_client_type)): ?>
     7525            <?= $hidden_input_client_type; ?>
     7526            <?php endif; ?>
     7527
     7528            <?php if(isset( $_GET['return']) && $_GET['return'] != ''): ?>
     7529                <input type="hidden" name="return_vendor" value="<?= (int)$_GET['return'] ?>">
     7530            <?php endif; ?>
     7531
     7532            <?php if(isset($_GET['pk']) && $_GET['pk'] != ''): ?>
     7533                <input type="hidden" name="profile_key" value="<?php echo esc_attr($_GET['pk']); ?>">
     7534            <?php endif; ?>
     7535
     7536            <?php if(isset($event_a['form_code']) && $event_a['form_code'] != ''): ?>
     7537                <?php
     7538                    $form_code = esc_attr($event_a['form_code']);
     7539                    if(isset($_SESSION['ok'])) {
     7540                        $form_code .= "_".$_SESSION['ok'];
     7541                    }
     7542                ?>
     7543                <input type="hidden" name="form_code" value="<?php echo $form_code; ?>">
     7544            <?php endif; ?>
     7545
     7546            <?php if(isset( $_GET['rfc']) && $_GET['rfc'] != ''): ?>
     7547                <input type="hidden" name="rfc" value="<?php echo esc_attr($_GET['rfc']); ?>">
     7548            <?php endif; ?>
     7549
     7550            <?php if(isset( $_GET['rpk']) && $_GET['rpk'] != ''): ?>
     7551                <input type="hidden" name="rpk" value="<?php echo esc_attr($_GET['rpk']); ?>">
     7552            <?php endif; ?>
     7553
     7554            <?php
     7555            return ($form . $this->_generate_session_screen_field(ob_get_clean(), $client_a, $event_a, $pre_launch_count));
    72047556        }
    72057557
     
    72687620                ?>
    72697621
    7270                     <div class="form-group group-hover field-event">
    7271                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     7622                    <div class="form-group group-hover-disabled field-event">
     7623                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     7624                        <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    72727625                        <div class="col-lg-10">
    72737626                            <input name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" type="hidden">
     
    73077660                        </div>
    73087661                    </div>
    7309                     <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    73107662                    <div class="col-lg-offset-2">
    73117663                        <p class="help-block"><?= $input_data['help_text']; ?></p>
     
    73247676                $g_hover = '';
    73257677                if(!isset($input_data['badge_dataset'])){
    7326                     $g_hover = 'group-hover';
     7678                    $g_hover = 'group-hover-disabled';
    73277679                }
    73287680                ob_start();
    73297681                ?>
    73307682                    <div class="form-group <?= $g_hover ?> field-clients-<?= $input_data['model_field']; ?>">
    7331                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     7683                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     7684                        <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    73327685                        <div class="col-lg-8">
    73337686                            <div class="selectors-shift-left">
     
    73587711                                }
    73597712                                ?>
    7360                                 <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    7361                                 <div class="col-lg-offset-2">
    7362                                     <p class="help-block"><?= $input_data['help_text']; ?></p>
    7363                                 </div>
    7364 
     7713                                <p class="help-block-selectors"><?= $input_data['help_text']; ?></p>
    73657714                            </div>
    73667715                        </div>
    73677716                    </div>
     7717
    73687718                <?php
    73697719                return ob_get_clean();
     
    73787728                ob_start();
    73797729                ?>
    7380                     <div class="form-group group-hover field-clients-<?= $input_data['model_field']; ?>">
    7381                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
    7382 
     7730                    <div class="form-group group-hover-disabled field-clients-<?= $input_data['model_field']; ?>">
     7731                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     7732                        <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    73837733                        <div class="col-lg-8">
    7384                             <div class="">
     7734                            <div class="selectors-shift-left">
    73857735                                <?php
    73867736                                $option_values_a = $input_data['option_values_a'];
    73877737                                $option_value_selected_a = $input_data['value'];
    73887738                                ?>
    7389                                 <div class="col-lg-8">
    7390                                     <select id="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" style="width:auto;" class="form-control" name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" <?= $required; ?>>
    7391                                         <option value="">Select...</option>
    7392                                         <?php
    7393 
    7394                                         foreach($option_values_a as $key => $val) {
    7395                                             ?>
    7396                                             <?php if($key == $option_value_selected_a): ?>
    7397                                                 <option value="<?= $key; ?>" selected><?= $val; ?></option>
    7398                                             <?php else: ?>
    7399                                                 <option value="<?= $key; ?>"><?= $val; ?></option>
    7400                                             <?php endif; ?>
    7401                                         <?php
    7402                                         }
     7739                                <select id="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" style="width:auto;" class="form-control" name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" <?= $required; ?>>
     7740                                    <option value="">Select...</option>
     7741                                    <?php
     7742
     7743                                    foreach($option_values_a as $key => $val) {
    74037744                                        ?>
    7404                                     </select>
    7405                                 </div>
    7406                                 <div class="col-lg-offset-2">
    7407                                     <p class="help-block"><?= $input_data['help_text']; ?></p>
    7408                                 </div>
     7745                                        <?php if($key == $option_value_selected_a): ?>
     7746                                            <option value="<?= $key; ?>" selected><?= $val; ?></option>
     7747                                        <?php else: ?>
     7748                                            <option value="<?= $key; ?>"><?= $val; ?></option>
     7749                                        <?php endif; ?>
     7750                                    <?php
     7751                                    }
     7752                                    ?>
     7753                                </select>
    74097754                            </div>
    74107755                        </div>
     7756                    </div>
     7757                    <div class="col-lg-offset-2">
     7758                        <p class="help-block"><?= $input_data['help_text']; ?></p>
    74117759                    </div>
    74127760
     
    74197767                        });
    74207768                    </script>
     7769                <?php
     7770                return ob_get_clean();
     7771                break;
     7772
     7773                case "chain-selector":
     7774
     7775                $required = $input_data['required'] == 1 ? 'required' : '';
     7776                $input_data['field_label'] = $this->_format_required_labels($input_data['field_label'], $input_data['required']);
     7777                $lock_field = empty($input_data['value']) ? 0 : $input_data['lock_field'];
     7778
     7779                ob_start();
     7780                ?>
     7781                    <div class="form-group group-hover-disabled field-clients-<?= $input_data['model_field']; ?>">
     7782                        <label class="col-lg-2 control-label well-label" for="clients-session-select"><?= $input_data['field_label']; ?></label>
     7783
     7784                        <div class="col-lg-8">
     7785                            <div class="selectors-shift-left">
     7786
     7787                                <?php
     7788                                // option tooltip
     7789                                $session_top_level_a = $input_data['session_top_level_a'];
     7790                                $session_option_values_a = $input_data['session_chain_values_a'];
     7791                                $session_levels_a = $input_data['session_levels_a'];
     7792                                ?>
     7793
     7794                                <?php foreach($session_levels_a AS $key => $v): ?>
     7795                                    <select size="4" id="sessions-session_topic_tl<?= $key ?>" style="margin-top:6px; width:auto;" class="form-control" name="Sessions[session_topic][<?= $key ?>]">
     7796                                    <?php if($key == 1): ?>
     7797                                        <!-- option value="0" selected>Select...</option -->
     7798                                        <?php foreach($session_top_level_a as $key => $val_a): ?>
     7799
     7800                                            <?php
     7801                                            $label = $val_a[0];
     7802                                            $description = $val_a[1];
     7803                                            $desc_meta = !empty($description) ? "class=\"tooltip_chained\" data-jbox-content=\"{$description}\"" : "";
     7804                                            ?>
     7805
     7806                                            <?php if($key == $session_option_values_a[1]): ?>
     7807                                                <option <?= $desc_meta ?> value="<?= $key; ?>" selected><?= $label; ?></option>
     7808                                            <?php else: ?>
     7809                                                <option <?= $desc_meta ?> value="<?= $key; ?>"><?= $label; ?></option>
     7810                                            <?php endif; ?>
     7811                                        <?php endforeach; ?>
     7812                                    <?php endif; ?>
     7813                                    </select>
     7814                                <?php endforeach; ?>
     7815                            </div>
     7816                        </div>
     7817                    </div>
     7818                    <div class="col-lg-offset-2" style="margin-top:8px;">
     7819                        <p class="help-block"><?= $input_data['help_text']; ?></p>
     7820                    </div>
    74217821                <?php
    74227822                return ob_get_clean();
     
    74587858                    </script>
    74597859
    7460                     <div class="form-group group-hover field-event">
    7461                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     7860                    <div class="form-group group-hover-disabled field-event">
     7861                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     7862                        <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    74627863                        <div class="col-lg-10">
    7463                             <input name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" type="hidden">
    7464                             <select id="clients-<?= $input_data['model_field']; ?>" class="form-control" name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>][]" multiple="multiple" style="width:100%" <?= $required; ?>>
    7465                                 <?php
    7466                                 if(isset($input_data['keywords_selected'])) {
    7467                                     foreach ($input_data['keywords_selected'] AS $key_id => $keyword_label) {
    7468                                         ?>
    7469                                         <option value="<?= $key_id; ?>" selected><?= $keyword_label ?></option>
     7864                            <div class="selectors-shift-left">
     7865                                <input name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" type="hidden">
     7866                                <select id="clients-<?= $input_data['model_field']; ?>" class="form-control" name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>][]" multiple="multiple" style="width:100%" <?= $required; ?>>
    74707867                                    <?php
     7868                                    if(isset($input_data['keywords_selected'])) {
     7869                                        foreach ($input_data['keywords_selected'] AS $key_id => $keyword_label) {
     7870                                            ?>
     7871                                            <option value="<?= $key_id; ?>" selected><?= $keyword_label ?></option>
     7872                                        <?php
     7873                                        }
    74717874                                    }
    7472                                 }
    7473                                 ?>
    7474                             </select>
     7875                                    ?>
     7876                                </select>
     7877                            </div>
    74757878                        </div>
    74767879                    </div>
    7477                     <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    74787880                    <div class="col-lg-offset-2">
    74797881                        <?php if($input_data['help_text'] !== ''): ?>
     
    75027904                ?>
    75037905
    7504                     <div class="form-group group-hover field-clients-name">
    7505                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     7906                    <div class="form-group group-hover-disabled field-clients-name">
     7907                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     7908                        <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    75067909                        <div class="value-pair-container">
    7507                             <div class="pair-item">
     7910                            <div class="pair-item selectors-shift-left">
    75087911                                <input
    75097912                                    type="text"
     
    75517954                $max_width = $input_data['max_width'] != null ? 'max-width: '.$input_data['max_width'].'px' : '';
    75527955                $required = $input_data['required'] == 1 ? 'required' : '';
    7553                 $filter_type = $input_data['filter'] != null && $input_data['filter'] != 'general' ? 'data-parsley-trigger="change" data-parsley-type="'.$input_data['filter'].'"' : '';
     7956                $filter_type = $input_data['filter'] != null && $input_data['filter'] != 'general' ? 'data-parsley-errors-container="#error-box-'.$input_data['model_field'].'" data-parsley-trigger="change" data-parsley-type="'.$input_data['filter'].'"' : '';
    75547957                $input_data['field_label'] = $this->_format_required_labels($input_data['field_label'], $input_data['required']);
    75557958                $audit = empty($input_data['value']) ? 0 : $audit;
     
    75677970                <?php if($input_data['flex_row'] == 1): ?>
    75687971
    7569                     <div class="form-group group-hover field-clients-name field-inline-container">
     7972                    <div class="form-group group-hover-disabled field-clients-name field-inline-container">
    75707973
    75717974                        <div class="field-inline-label">
    7572                             <label class="control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     7975                            <label class="control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     7976                            <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    75737977                        </div>
    75747978
     
    75927996
    75937997                            <input type="text" id="clients-<?= $input_data['model_field']; ?>" class="form-control" name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" maxlength="255" value="<?= $input_data['value']; ?>" style="<?= $max_width; ?>" <?= $filter_type; ?> <?= $required; ?> <?= $field_disabled ?>>
     7998                            <p class="help-block-inline"><?= $input_data['help_text']; ?></p>
    75947999                        </div>
    75958000                    </div>
    7596                     <div class="col-lg-offset-2">
    7597                         <p class="help-block"><?= $input_data['help_text']; ?></p>
    7598                     </div>
    75998001
    76008002                <?php else: ?>
    76018003
    7602                     <div class="form-group group-hover field-clients-name">
    7603                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8004                    <div class="form-group group-hover-disabled field-clients-name">
     8005                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8006                        <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    76048007                        <div class="col-lg-8">
    7605                             <?php if($input_data['filter'] == 'url'): ?>
    7606                                 <script type="text/javascript">
    7607                                     $(document).ready(function () {
    7608                                         $(function(){
    7609                                             $('#clients-<?= $input_data['model_field']; ?>').parsley().on('field:validate', function() {
    7610                                                 $url_filtered = $('#clients-<?= $input_data['model_field']; ?>').val().replace(/^https?:\/\//, '');
    7611                                                 $('#clients-<?= $input_data['model_field']; ?>').val($url_filtered);
     8008                            <div class="selectors-shift-left">
     8009                                <?php if($input_data['filter'] == 'url'): ?>
     8010                                    <script type="text/javascript">
     8011                                        $(document).ready(function () {
     8012                                            $(function(){
     8013                                                $('#clients-<?= $input_data['model_field']; ?>').parsley().on('field:validate', function() {
     8014                                                    $url_filtered = $('#clients-<?= $input_data['model_field']; ?>').val().replace(/^https?:\/\//, '');
     8015                                                    $('#clients-<?= $input_data['model_field']; ?>').val($url_filtered);
     8016                                                });
    76128017                                            });
    76138018                                        });
    7614                                     });
    7615                                 </script>
    7616                                 <span class="input-group-addon input-group-addon-block">
    7617                                     https://
    7618                                 </span>
    7619                             <?php endif; ?>
    7620                             <input type="text" id="clients-<?= $input_data['model_field']; ?>" class="form-control" name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" maxlength="255" value="<?= $input_data['value']; ?>" style="<?= $max_width; ?>" <?= $filter_type; ?> <?= $required; ?> <?= $field_disabled ?>>
     8019                                    </script>
     8020                                    <span class="input-group-addon input-group-addon-block">
     8021                                        https://
     8022                                    </span>
     8023                                <?php endif; ?>
     8024                                <input type="text" id="clients-<?= $input_data['model_field']; ?>" class="form-control" name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" maxlength="255" value="<?= $input_data['value']; ?>" style="<?= $max_width; ?>" <?= $filter_type; ?> <?= $required; ?> <?= $field_disabled ?>>
     8025                            </div>
    76218026                        </div>
    76228027                    </div>
     
    76828087                    </script>
    76838088
    7684                     <div class="form-group group-hover field-clients-<?= $input_data['model_field']; ?>">
    7685                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8089                    <div class="form-group group-hover-disabled field-clients-<?= $input_data['model_field']; ?>">
     8090                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
    76868091                        <?= $max_char_count ?>
     8092                        <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    76878093                        <div class="col-lg-8">
    7688                             <textarea <?= $max_length_attr ?> name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" id="clients-<?= $input_data['model_field']; ?>" class="form-control" <?= $required; ?>><?= esc_textarea($input_data['value']); ?></textarea>
     8094                            <div class="selectors-shift-left">
     8095                                <textarea <?= $max_length_attr ?> name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" id="clients-<?= $input_data['model_field']; ?>" class="form-control" <?= $required; ?>><?= esc_textarea($input_data['value']); ?></textarea>
     8096                            </div>
    76898097                        </div>
    76908098                    </div>
     
    77148122                ?>
    77158123
    7716                     <div class="form-group group-hover field-clients-<?= $input_data['model_field']; ?>">
    7717                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8124                    <div class="form-group group-hover-disabled field-clients-<?= $input_data['model_field']; ?>">
     8125                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8126                        <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    77188127                        <div class="col-lg-8">
    7719                             <textarea name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" id="clients-<?= $input_data['model_field']; ?>" class="rich-textarea form-control" <?= $required; ?>><?= esc_textarea($input_data['value']); ?></textarea>
     8128                            <div class="selectors-shift-left">
     8129                                <textarea name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" id="clients-<?= $input_data['model_field']; ?>" class="rich-textarea form-control" <?= $required; ?>><?= esc_textarea($input_data['value']); ?></textarea>
     8130                            </div>
    77208131                        </div>
    77218132                    </div>
     
    77388149                case "telephone":
    77398150
    7740                 $max_width = $input_data['max_width'] != null ? $input_data['max_width'].'px' : '250px';
     8151                $max_width = $input_data['max_width'] != null ? $input_data['max_width'].'px' : '250px;';
     8152                $min_width = '200px;';
    77418153                $required = $input_data['required'] == 1 ? 'required' : '';
    77428154                $input_data['field_label'] = $this->_format_required_labels($input_data['field_label'], $input_data['required']);
     
    77678179                <?php if($input_data['flex_row'] == 1): ?>
    77688180
    7769                     <div class="form-group group-hover field-inline-container field-clients-<?= $input_data['model_field']; ?>">
     8181                    <div class="form-group group-hover-disabled field-inline-container field-clients-<?= $input_data['model_field']; ?>">
    77708182                        <div class="field-inline-label">
    7771                             <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8183                            <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8184                            <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    77728185                        </div>
    77738186                        <div class="field-inline-value">
    77748187                            <?php if($input_data['phone_intl'] == 1): ?>
    7775                                 <input type="tel" id="clients-<?= $input_data['model_field']; ?>" class="telephone form-control" name="<?= $input_field_name_tmp ?>" maxlength="255" value="<?= $phone_number_intl; ?>" style="max-width: <?= $max_width; ?>" <?= $required; ?>>
     8188                                <input type="tel" id="clients-<?= $input_data['model_field']; ?>" class="telephone form-control" name="<?= $input_field_name_tmp ?>" maxlength="255" value="<?= $phone_number_intl; ?>" style="min-width: <?= $min_width; ?> max-width: <?= $max_width; ?>" <?= $required; ?>>
    77768189                            <?php else: ?>
    7777                                 <input data-inputmask="'mask': '<?= $input_data['input_mask']; ?>'" type="tel" id="clients-<?= $input_data['model_field']; ?>" class="telephone form-control" name="<?= $input_data['model_label'] ?>[<?= $input_data['model_field'] ?>]" maxlength="255" value="<?= $phone_number ?>" style="max-width: <?= $max_width; ?>" <?= $required; ?>>
     8190                                <input data-inputmask="'mask': '<?= $input_data['input_mask']; ?>'" type="tel" id="clients-<?= $input_data['model_field']; ?>" class="telephone form-control" name="<?= $input_data['model_label'] ?>[<?= $input_data['model_field'] ?>]" maxlength="255" value="<?= $phone_number ?>" style="min-width: <?= $min_width; ?> max-width: <?= $max_width; ?>" <?= $required; ?>>
    77788191                            <?php endif; ?>
     8192                            <p class="help-block-inline"><?= $input_data['help_text']; ?></p>
    77798193                        </div>
    77808194                    </div>
    7781                     <div class="col-lg-offset-2">
    7782                         <p class="help-block"><?= $input_data['help_text']; ?></p>
    7783                     </div>
    77848195
    77858196                <?php else: ?>
    77868197
    7787                     <div class="form-group group-hover field-clients-<?= $input_data['model_field']; ?>">
    7788                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8198                    <div class="form-group group-hover-disabled field-clients-<?= $input_data['model_field']; ?>">
     8199                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8200                        <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    77898201                        <div class="col-lg-8">
    7790                             <?php if($input_data['phone_intl'] == 1): ?>
    7791                                 <input type="tel" id="clients-<?= $input_data['model_field']; ?>" class="telephone form-control" name="<?= $input_field_name_tmp ?>" maxlength="255" value="<?= $phone_number_intl; ?>" style="max-width: <?= $max_width; ?>" <?= $required; ?>>
    7792                             <?php else: ?>
    7793                                 <input data-inputmask="'mask': '<?= $input_data['input_mask']; ?>'" type="tel" id="clients-<?= $input_data['model_field']; ?>" class="telephone form-control" name="<?= $input_data['model_label'] ?>[<?= $input_data['model_field'] ?>]" maxlength="255" value="<?= $phone_number ?>" style="max-width: <?= $max_width; ?>" <?= $required; ?>>
    7794                             <?php endif; ?>
     8202                            <div class="selectors-shift-left">
     8203                                <?php if($input_data['phone_intl'] == 1): ?>
     8204                                    <input type="tel" id="clients-<?= $input_data['model_field']; ?>" class="telephone form-control" name="<?= $input_field_name_tmp ?>" maxlength="255" value="<?= $phone_number_intl; ?>" style="min-width: <?= $min_width; ?> max-width: <?= $max_width; ?>" <?= $required; ?>>
     8205                                <?php else: ?>
     8206                                    <input data-inputmask="'mask': '<?= $input_data['input_mask']; ?>'" type="tel" id="clients-<?= $input_data['model_field']; ?>" class="telephone form-control" name="<?= $input_data['model_label'] ?>[<?= $input_data['model_field'] ?>]" maxlength="255" value="<?= $phone_number ?>" style="min-width: <?= $min_width; ?> max-width: <?= $max_width; ?>" <?= $required; ?>>
     8207                                <?php endif; ?>
     8208                            </div>
    77958209                        </div>
    77968210                    </div>
     
    78528266                ob_start();
    78538267                ?>
    7854                     <div class="form-group group-hover field-clients-<?= $input_data['model_field']; ?>_temp">
    7855                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>_temp"><?= $input_data['field_label']; ?></label>
     8268                    <div class="form-group group-hover-disabled field-clients-<?= $input_data['model_field']; ?>_temp">
     8269                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>_temp"><?= $input_data['field_label']; ?></label>
    78568270                        <div class="col-lg-offset-2">
    78578271                            <p class="help-block"><?= $input_data['help_text']; ?></p>
     
    78758289                ?>
    78768290
    7877                     <div class="form-group group-hover field-event">
    7878                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8291                    <div class="form-group group-hover-disabled field-event">
     8292                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8293                        <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    78798294                        <div class="col-lg-10">
    7880                             <input name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" type="hidden">
    7881                             <div id="clients-form" class="selectors-shift-left">
    7882                                 <?= $this->_generate_checkboxes_client_types($input_data,'checkbox'); ?>
     8295                            <div class="selectors-shift-left">
     8296                                <input name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" type="hidden">
     8297                                <div id="clients-form" class="">
     8298                                    <?= $this->_generate_checkboxes_client_types($input_data,'checkbox'); ?>
     8299                                </div>
     8300                                <p class="help-block-selectors"><?= $input_data['help_text']; ?></p>
    78838301                            </div>
    78848302                        </div>
    7885                     </div>
    7886                     <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    7887                     <div class="col-lg-offset-2">
    7888                         <p class="help-block"><?= $input_data['help_text']; ?></p>
    78898303                    </div>
    78908304
     
    79008314                ?>
    79018315
    7902                     <div class="form-group group-hover field-event">
    7903                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8316                    <div class="form-group group-hover-disabled field-event">
     8317                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label']; ?></label>
     8318                        <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    79048319                        <div class="col-lg-10">
    7905                             <input name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" type="hidden">
    7906                             <div id="clients-form" class="selectors-shift-left">
    7907                                 <?= $this->_generate_checkboxes_client_types($input_data,'radio'); ?>
     8320                            <div class="selectors-shift-left">
     8321                                <input name="<?= $input_data['model_label']; ?>[<?= $input_data['model_field']; ?>]" type="hidden">
     8322                                <div id="clients-form" class="">
     8323                                    <?= $this->_generate_checkboxes_client_types($input_data,'radio'); ?>
     8324                                </div>
     8325                                <p class="help-block-selectors"><?= $input_data['help_text']; ?></p>
    79088326                            </div>
    79098327                        </div>
    7910                     </div>
    7911                     <div class="col-lg-offset-2" id="error-box-<?= $input_data['model_field']; ?>"></div>
    7912                     <div class="col-lg-offset-2">
    7913                         <p class="help-block"><?= $input_data['help_text']; ?></p>
    79148328                    </div>
    79158329
     
    79328346                ?>
    79338347                    <div class="form-group field-clients-name">
    7934                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label1']; ?></label>
     8348                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label1']; ?></label>
    79358349                        <div class="col-lg-8">
    7936                             <input type="password" id="clients-<?= $input_data['model_field']; ?>-1" class="form-control" name="<?= $input_data['model_label']; ?>[password]" maxlength="255" value="<?= $input_data['value']; ?>" style="<?= $max_width; ?>" <?= $filter_type; ?> <?= $required; ?>>
     8350                            <div class="selectors-shift-left">
     8351                                <input type="password" id="clients-<?= $input_data['model_field']; ?>-1" class="form-control" name="<?= $input_data['model_label']; ?>[password]" maxlength="255" value="<?= $input_data['value']; ?>" style="<?= $max_width; ?>" <?= $filter_type; ?> <?= $required; ?>>
     8352                            </div>
    79378353                        </div>
    79388354                    </div>
    79398355                    <div class="form-group field-clients-name">
    7940                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label2']; ?></label>
     8356                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label2']; ?></label>
    79418357                        <div class="col-lg-8">
    7942                             <input data-parsley-equalto="#clients-<?= $input_data['model_field']; ?>-1" type="password" id="clients-<?= $input_data['model_field']; ?>-2" class="form-control" name="<?= $input_data['model_label']; ?>[password2]" maxlength="255" value="<?= $input_data['value']; ?>" style="<?= $max_width; ?>" <?= $filter_type; ?> <?= $required; ?>>
     8358                            <div class="selectors-shift-left">
     8359                                <input data-parsley-equalto="#clients-<?= $input_data['model_field']; ?>-1" type="password" id="clients-<?= $input_data['model_field']; ?>-2" class="form-control" name="<?= $input_data['model_label']; ?>[password2]" maxlength="255" value="<?= $input_data['value']; ?>" style="<?= $max_width; ?>" <?= $filter_type; ?> <?= $required; ?>>
     8360                            </div>
    79438361                        </div>
    79448362                    </div>
     
    79618379                ?>
    79628380                    <div class="form-group field-clients-name">
    7963                         <label class="col-lg-2 control-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label1']; ?></label>
     8381                        <label class="col-lg-2 control-label well-label" for="clients-<?= $input_data['model_field']; ?>"><?= $input_data['field_label1']; ?></label>
    79648382                        <div class="col-lg-8">
    7965                             <input type="password" id="clients-<?= $input_data['model_field']; ?>" class="form-control" name="<?= $input_data['model_label']; ?>[password]" maxlength="255" value="<?= $input_data['value']; ?>" style="<?= $max_width; ?>" <?= $filter_type; ?> <?= $required; ?>>
     8383                            <div class="selectors-shift-left">
     8384                                <input type="password" id="clients-<?= $input_data['model_field']; ?>" class="form-control" name="<?= $input_data['model_label']; ?>[password]" maxlength="255" value="<?= $input_data['value']; ?>" style="<?= $max_width; ?>" <?= $filter_type; ?> <?= $required; ?>>
     8385                            </div>
    79668386                        </div>
    79678387                    </div>
     
    84148834                    <div class="block-content">
    84158835                        <div class="clients-form">
    8416                             <form data-parsley-required-message="this field is required" data-parsley-validate="" id="clients-form" class="form-horizontal" name="step-1" action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" enctype="multipart/form-data">
     8836                            <!-- data-parsley-required-message="this field is required" -->
     8837                            <form data-parsley-required-message="" data-parsley-validate="" id="clients-form" class="form-horizontal" name="step-1" action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" enctype="multipart/form-data">
    84178838                                <input type="hidden" name="_csrf" value="">
    84188839                                <input type="hidden" name="dwc_screen_name" value="profile">
     
    84238844                        </div>
    84248845                    </div>
     8846
     8847                    <div class="clear"></div>
     8848                </div>
     8849            </div>
     8850            <?php
     8851
     8852            return ob_get_clean();
     8853        }
     8854
     8855        /**
     8856         * @param $fields
     8857         * @param $client_a
     8858         * @return string
     8859         */
     8860        private function _generate_session_screen_field($fields, $client_a, $event_a, $pre_launch_count = 0)
     8861        {
     8862            global $wp;
     8863            $current_url = home_url(add_query_arg([], $wp->request));
     8864
     8865            ob_start();
     8866
     8867            ?>
     8868            <div id="" class="content-inner">
     8869                <div id="" class="block">
     8870
     8871                    <?php if($event_a['event_status'] == 0): ?>
     8872                    <!-- DISPLAY pre_launch_count APPLICANTS -->
     8873                        <div id="">
     8874                            <h3><span style="color:#ff6b6b">Pre-Launch Applicants:</span> <?= $pre_launch_count; ?> of 5</h3>
     8875                        </div>
     8876                    <?php endif; ?>
     8877
     8878                    <?php if($client_a['admin_audit'] == 1): ?>
     8879                        <!-- DISPLAY audit message -->
     8880                        <div class="well well-sm" style="margin-bottom:10px; margin-top:0px;">
     8881                            <h4>Audit Mode: Some profile fields are read-only and can only be modified by the primary.
     8882                            </h4>
     8883                        </div>
     8884                    <?php endif; ?>
     8885
     8886                    <div id="">
     8887                        <?php if(isset( $_GET['saved'])): ?>
     8888                        <!-- TEXT BLOCK DISPLAYED IF INVITE CODE FOUND -->
     8889
     8890                            <div class="well well-sm" style="margin-bottom:10px; margin-top:0px;">
     8891                                <h4>Record Saved.</h4>
     8892                            </div>
     8893                        <?php endif; ?>
     8894                    </div>
     8895
     8896                    <!-- DISPLAY FORM BLOCK -->
     8897                    <div class="block-content">
     8898                        <div class="clients-form">
     8899                            <form data-parsley-required-message="this field is required" data-parsley-validate="" id="clients-form" class="form-horizontal" name="step-1" action="<?php echo admin_url('admin-ajax.php'); ?>" method="post" enctype="multipart/form-data">
     8900                                <input type="hidden" name="_csrf" value="">
     8901                                <input type="hidden" name="dwc_screen_name" value="session">
     8902                                <?php wp_nonce_field('dwc_form_submission', 'dwc_verify_submission'); ?>
     8903                                <input type="hidden" name="action" value="dwc_form_submission">
     8904                                <?php echo $fields; ?>
     8905                            </form>
     8906                        </div>
     8907                    </div>
     8908
     8909                    <script type="text/javascript">
     8910                    <?= $event_a['select_chained_js'] ?>
     8911                    </script>
    84258912
    84268913                    <div class="clear"></div>
     
    86099096                    if($current == $self) return "active";
    86109097                    $errors = 0;
    8611                     $attributes = json_decode( $this->event_attributes, true);
     9098                    $attributes = is_array($this->event_attributes) ? $this->event_attributes : json_decode( $this->event_attributes, true);
    86129099
    86139100                    if(isset($attributes['applicant_a']['client_type'])) {
     
    86279114                    break;
    86289115
     9116                case "session":
     9117                    if($current < $self) return "";
     9118                    if($current == $self) return "active";
     9119                    $errors = 0;
     9120                    $attributes = is_array($this->event_attributes) ? $this->event_attributes : json_decode( $this->event_attributes, true);
     9121
     9122                    if(isset($attributes['applicant_a']['client_type'])) {
     9123                        $client_types = json_decode($attributes['applicant_a']['client_type'], true);
     9124                        if($this->_count_array($client_types) == 0) {
     9125                            $errors++;
     9126                        }
     9127                    }else{
     9128                        $errors++;
     9129                    }
     9130
     9131                    if($errors) {
     9132                        return "error";
     9133                    }else {
     9134                        return "complete";
     9135                    }
     9136                    break;
     9137
    86299138                case "uploads":
    86309139                    if($current < $self) return "";
     
    86329141                    if($current > $self) {
    86339142
    8634                         $attributes = json_decode($this->event_attributes, true);
     9143                        $attributes = is_array($this->event_attributes) ? $this->event_attributes : json_decode($this->event_attributes, true);
    86359144
    86369145                        if(isset( $_GET['pk']) && $_GET['pk'] != '') {
     
    86589167                    if($current > $self) {
    86599168
    8660                         $attributes = json_decode($this->event_attributes, true);
     9169                        $attributes = is_array($this->event_attributes) ? $this->event_attributes : json_decode($this->event_attributes, true);
    86619170
    86629171                        if(isset( $_GET['pk']) && $_GET['pk'] != '') {
     
    86849193                    if($current > $self) {
    86859194
    8686                         $attributes = json_decode($this->event_attributes, true);
     9195                        $attributes = is_array($this->event_attributes) ? $this->event_attributes : json_decode($this->event_attributes, true);
    86879196
    86889197                        if(isset( $_GET['pk']) && $_GET['pk'] != '') {
     
    87099218                    if($current == $self) return "active";
    87109219                    if($current > $self) {
    8711                         $attributes = json_decode($this->event_attributes, true);
     9220                        $attributes = is_array($this->event_attributes) ? $this->event_attributes : json_decode($this->event_attributes, true);
    87129221
    87139222                        if(isset( $_GET['pk']) && $_GET['pk'] != '') {
     
    87349243                    // if($current == $self) return "active";
    87359244                    if($current == $self) {
    8736                         $attributes = json_decode($this->event_attributes, true);
     9245                        $attributes = is_array($this->event_attributes) ? $this->event_attributes : json_decode($this->event_attributes, true);
    87379246
    87389247                        if(isset( $_GET['pk']) && $_GET['pk'] != '') {
     
    87699278            $current_url = home_url(add_query_arg([], $wp->request));
    87709279
    8771             $event_a = json_decode($this->event_attributes,true);
     9280            $event_a = is_array($this->event_attributes) ? $this->event_attributes : json_decode($this->event_attributes,true);
    87729281
    87739282            $profile_status = false;
     
    87879296            $current_screen = self::_get_current_screen($form_type, $ticketing_nav_order);
    87889297
     9298            // echo $current_screen;
     9299
    87899300            if(isset($formData['nav_steps_list'])){
    87909301                $steps = $formData['nav_steps_list'][0];
     
    87929303                $extra_amenity_id = $formData['nav_steps_list'][2];
    87939304
     9305                // print_r($formData['nav_steps_list']);
     9306
    87949307                // insert last step if not in navigation
    87959308                if(!in_array('payment', $steps)){
     
    87989311
    87999312            }else{
    8800                 $steps = ['login', 'profile', 'uploads', 'amenities', 'badges', 'terms', 'payment'];
     9313                $steps = ['login', 'profile', 'session', 'uploads', 'amenities', 'badges', 'terms', 'payment'];
    88019314            }
    88029315
     
    88599372
    88609373                $skip_menu = false;
     9374
     9375                // echo $nav_label;
    88619376
    88629377                if((int)$formData["applicant_a"]["origin_applic_id"] > 0) {
     
    89419456
    89429457                $event_a = json_decode($event_a, true);
    8943                 $attributes = json_decode( $this->event_attributes, true);
     9458                $attributes = is_array($this->event_attributes) ? $this->event_attributes : json_decode( $this->event_attributes, true);
    89449459
    89459460                // print_r($attributes); die;
     
    92099724        private function _button_label_swap($button = 'save_continue', $screen = '')
    92109725        {
    9211             $attributes = json_decode( $this->event_attributes, true);
     9726            $attributes = is_array($this->event_attributes) ? $this->event_attributes : json_decode( $this->event_attributes, true);
    92129727            global $wp_query;
    92139728
     
    92929807        private function _wrap_with_parents($form = "", $raw_output = false)
    92939808        {
    9294         $attributes = json_decode( $this->event_attributes, true);
     9809        $attributes = is_array($this->event_attributes) ? $this->event_attributes : json_decode( $this->event_attributes, true);
    92959810        ob_start();
    92969811        ?>
     
    93459860                    }
    93469861                    ?>
    9347                     v3.6.0
     9862                    v3.6.1
    93489863                    : <a href="https://app.registerone.com/privacy-policy" target="_blank">Privacy Policy</a>
    93499864                    <?php
  • registerone-event-forms/trunk/front-end/assets/css/form-custom.css

    r2770659 r2796267  
    361361
    362362.form-group {
    363     margin-top: 8px;
     363    margin-top: 18px;
    364364    clear: both;
    365     padding: 4px 10px 4px 6px;
     365    padding: 4px 10px 2px 6px;
    366366    border-style: dotted;
    367367    border-width: 1px;
     
    422422
    423423p.help-block {
    424     margin-left: 10px;
     424    margin-left: 18px;
     425    margin-top: -4px;
     426    font-size: 14px;
     427    font-style: italic;
     428    color: #797979;
     429}
     430
     431p.help-block-uploads {
    425432    margin-top: -2px;
    426433    font-size: 14px;
     434    font-style: italic;
     435    color: #797979;
     436}
     437
     438p.help-block-selectors {
     439    margin-left: 0;
     440    margin-top: -4px;
     441    font-size: 14px;
     442    font-style: italic;
     443    color: #797979;
     444}
     445
     446p.help-block-inline {
     447    margin-top: -4px;
     448    font-size: 14px;
     449    font-style: italic;
     450    color: #797979;
     451    display: flex;
    427452}
    428453
     
    433458.control-label {
    434459    font-weight: 900;
    435     font-size: 120%;
     460    font-size: 130%;
     461    color: darkslategray;
    436462}
    437463
    438464.control-desc {
    439     margin-left: 4px;
     465    margin-left: 15px;
     466    font-style: italic;
    440467}
    441468
    442469div.text-field.file div.text-field-left a {
    443     padding: 85px 15px 0px;
     470    padding: 85px 15px 0;
    444471}
    445472
     
    670697}
    671698
     699.form-group-login.field-clients-name {
     700    margin-top: 10px;
     701}
     702
    672703.help-block-login {
    673704    margin-left: 35px;
     
    803834    /*background-image: none;*/
    804835    border: 1px solid #ccc;
    805     border-radius: 4px;
     836    border-radius: 0;
    806837    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    807838    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
     
    12441275    display: flex;
    12451276    justify-content: flex-start;
     1277    margin-left: 15px;
    12461278}
    12471279
     
    14721504        min-height: 150px;
    14731505    }
     1506    .form-control, input .easy-autocomplete {
     1507        width: 70%;
     1508    }
    14741509}
    14751510
     
    14941529}
    14951530
     1531/* Phone input */
     1532
    14961533.iti__country-list {
    14971534    z-index: 999;
     1535}
     1536
     1537.iti__selected-flag {
     1538    height: 34px;
    14981539}
    14991540
     
    15931634.selectors-shift-left{
    15941635    margin-left: 10px;
    1595     margin-top: 10px;
     1636    margin-top: 6px;
    15961637}
    15971638
  • registerone-event-forms/trunk/front-end/assets/jbox/jBox.css

    r2341076 r2796267  
    1717/* jBox theme: TooltipDark */
    1818.jBox-container {
    19   border-radius: 8px;
     19  border-radius: 0;
     20  border-radius: 2px;
    2021  background: #000;
    2122  color: #fff;
     
    2425
    2526.jBox-content {
    26   border-radius: 8px;
    27   padding: 8px 12px;
    28   font: 13px/1.2 'Helvetica Neue', Helvetica, Arial, sans-serif;
     27  //margin-bottom: 30px;
     28  border-radius: 0;
     29  border-radius: 2px;
     30  padding: 8px;
     31  font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif;
    2932  color: #eee;
    3033  background-color: #555;
  • registerone-event-forms/trunk/front-end/assets/jbox/themes/TooltipDark.css

    r2219338 r2796267  
    33
    44.jBox-TooltipDark .jBox-container {
    5   border-radius: 3px;
     5  border-radius: 0;
    66  background: #000;
    77  color: #fff;
  • registerone-event-forms/trunk/readme.txt

    r2770659 r2796267  
    1 === RegisterONE - Event Registration, Digital Profiles, Advanced Booth Mapping, Meetings & Ticketing ===
     1=== RegisterONE - Exhibitor & Speaker Registration, Advanced Booth Mapping, Ticketing ===
    22Contributors: registerone
    3 Plugin Name: RegisterONE – Event Registration, Digital Profiles, Conference Video Streaming, Booth Mapping, Meetings & Ticketing
     3Plugin Name: RegisterONE – Event Registration, Booth Mapping, Conference Speaker Forms, Meetings & Ticketing
    44Plugin URI: https://www.registerone.com/wordpress-plugin/
    5 Tags: virtual, digital profiles, on-site, e-commerce, expo, ticketing, event, mapping, registration, resources, exhibitor, application, forms
     5Tags: booth mapping, on-site, e-commerce, expo, ticketing, event, registration, resources, exhibitor, application, forms
    66Author: RegisterONE
    77Requires at least: 5
    88Tested up to: 6.0
    9 Version 3.6.0
    10 Stable tag: 3.6.0
     9Version 3.6.1
     10Stable tag: 3.6.1
    1111Requires PHP: 5.6
    1212License: GPLv2 or later
     
    1717== Description ==
    1818
    19 This plugin allows event applicants, attendees, sponsors and speakers to build out their virtual digital profiles, select and purchase assets, amenities and upgrades, upload documents and media files, provide e-signatures and pay for cart items. Create, deploy and manage multiple registration forms easily and efficiently from RegisterONE. Built in support for Stripe & Paypal payment gateways.
     19This plugin allows event organizers & producers to build out event booth maps and application forms to field applications. Applicants can select booth locations, purchase assets, amenities and upgrades, upload documents and media files, provide e-signatures and pay for cart items. Create, deploy and manage multiple registration forms easily and efficiently from RegisterONE. Built in support for Stripe & Paypal payment gateways.
    2020
    2121Advanced booth mapping gives you the ability to plot booths with different sizes and pricing. Advanced features include dynamic pricing and selectable areas by applicant type. You can also start the registration process with booth selection from your forward facing map.
     
    2626
    2727== Features ==
     28
     29**NEW with v3.6.1** - **Conference/Session speaker form type with chained track selector to feed speaker profiles and conference sessions builder system.
    2830
    2931**NEW with v3.6.0** - **Booth grouping/restrictions by Applicant type (ie. Sponsors)**. This allows you to create one master form with one map that supports multiple applicant types with different booth areas restrictions. You can also setup dynamic pricing based on applicant type for maximum flexibility.
     
    3840* Native iframes shortcode for form & map embedding
    3941* Booth grouping/restrictions by Applicant type (ie. Sponsors)
     42* Session/Conference speaker forms to feed Sessions Builder
    4043* Ticketing sales with support for badging & barcodes
    4144* Custom badge designer with barcode/image support
     
    135138== Changelog ==
    136139
     140= 3.6.1 =
     141* NEW: Conference/Session speaker form type added to feed speaker profiles and session builder.
     142* NEW: Speaker/session track selectors added for Conference/Session forms.
     143
    137144= 3.6.0 =
    138145* NEW: Map groupings per applicant type. Allows you to setup applicant type specific booths (ie. Sponsors).
  • registerone-event-forms/trunk/registerone-wordpress-client.php

    r2770659 r2796267  
    11<?php
    22/*
    3 Plugin Name: RegisterONE Event Solutions
     3Plugin Name: RegisterONE Event Mapping Solutions
    44Plugin URI: https://www.registerone.com
    5 Description: Event registration and digital profile builder, conference video streaming, booth mapping, meetings & ticketing
    6 Version: 3.6.0
     5Description: RegisterONE – Exhibitor & Speaker Registration, Advanced Booth Mapping, Ticketing
     6Version: 3.6.1
    77Author: RegisterONE
    88Author URI: http://www.registerone.com
     
    11911191        return "profile";
    11921192
     1193    }elseif(isset( $_GET['session'])){
     1194        return "session";
     1195
    11931196    }elseif(isset( $_GET['uploads'])){
    11941197        return "uploads";
Note: See TracChangeset for help on using the changeset viewer.