@@ 992-1006 (lines=15) @@ | ||
989 | if (! in_array($QST_system, $questions)) { |
|
990 | // add it |
|
991 | switch ($QST_system) { |
|
992 | case 'fname': |
|
993 | $QST_values = array( |
|
994 | 'QST_display_text' => __('First Name', 'event_espresso'), |
|
995 | 'QST_admin_label' => __('First Name - System Question', 'event_espresso'), |
|
996 | 'QST_system' => 'fname', |
|
997 | 'QST_type' => 'TEXT', |
|
998 | 'QST_required' => 1, |
|
999 | 'QST_required_text' => __('This field is required', 'event_espresso'), |
|
1000 | 'QST_order' => 1, |
|
1001 | 'QST_admin_only' => 0, |
|
1002 | 'QST_max' => EEM_Question::instance()->absolute_max_for_system_question($QST_system), |
|
1003 | 'QST_wp_user' => self::get_default_creator_id(), |
|
1004 | 'QST_deleted' => 0, |
|
1005 | ); |
|
1006 | break; |
|
1007 | case 'lname': |
|
1008 | $QST_values = array( |
|
1009 | 'QST_display_text' => __('Last Name', 'event_espresso'), |
|
@@ 1007-1021 (lines=15) @@ | ||
1004 | 'QST_deleted' => 0, |
|
1005 | ); |
|
1006 | break; |
|
1007 | case 'lname': |
|
1008 | $QST_values = array( |
|
1009 | 'QST_display_text' => __('Last Name', 'event_espresso'), |
|
1010 | 'QST_admin_label' => __('Last Name - System Question', 'event_espresso'), |
|
1011 | 'QST_system' => 'lname', |
|
1012 | 'QST_type' => 'TEXT', |
|
1013 | 'QST_required' => 1, |
|
1014 | 'QST_required_text' => __('This field is required', 'event_espresso'), |
|
1015 | 'QST_order' => 2, |
|
1016 | 'QST_admin_only' => 0, |
|
1017 | 'QST_max' => EEM_Question::instance()->absolute_max_for_system_question($QST_system), |
|
1018 | 'QST_wp_user' => self::get_default_creator_id(), |
|
1019 | 'QST_deleted' => 0, |
|
1020 | ); |
|
1021 | break; |
|
1022 | case 'email': |
|
1023 | $QST_values = array( |
|
1024 | 'QST_display_text' => __('Email Address', 'event_espresso'), |
|
@@ 1022-1036 (lines=15) @@ | ||
1019 | 'QST_deleted' => 0, |
|
1020 | ); |
|
1021 | break; |
|
1022 | case 'email': |
|
1023 | $QST_values = array( |
|
1024 | 'QST_display_text' => __('Email Address', 'event_espresso'), |
|
1025 | 'QST_admin_label' => __('Email Address - System Question', 'event_espresso'), |
|
1026 | 'QST_system' => 'email', |
|
1027 | 'QST_type' => 'EMAIL', |
|
1028 | 'QST_required' => 1, |
|
1029 | 'QST_required_text' => __('This field is required', 'event_espresso'), |
|
1030 | 'QST_order' => 3, |
|
1031 | 'QST_admin_only' => 0, |
|
1032 | 'QST_max' => EEM_Question::instance()->absolute_max_for_system_question($QST_system), |
|
1033 | 'QST_wp_user' => self::get_default_creator_id(), |
|
1034 | 'QST_deleted' => 0, |
|
1035 | ); |
|
1036 | break; |
|
1037 | case 'address': |
|
1038 | $QST_values = array( |
|
1039 | 'QST_display_text' => __('Address', 'event_espresso'), |
|
@@ 1037-1051 (lines=15) @@ | ||
1034 | 'QST_deleted' => 0, |
|
1035 | ); |
|
1036 | break; |
|
1037 | case 'address': |
|
1038 | $QST_values = array( |
|
1039 | 'QST_display_text' => __('Address', 'event_espresso'), |
|
1040 | 'QST_admin_label' => __('Address - System Question', 'event_espresso'), |
|
1041 | 'QST_system' => 'address', |
|
1042 | 'QST_type' => 'TEXT', |
|
1043 | 'QST_required' => 0, |
|
1044 | 'QST_required_text' => __('This field is required', 'event_espresso'), |
|
1045 | 'QST_order' => 4, |
|
1046 | 'QST_admin_only' => 0, |
|
1047 | 'QST_max' => EEM_Question::instance()->absolute_max_for_system_question($QST_system), |
|
1048 | 'QST_wp_user' => self::get_default_creator_id(), |
|
1049 | 'QST_deleted' => 0, |
|
1050 | ); |
|
1051 | break; |
|
1052 | case 'address2': |
|
1053 | $QST_values = array( |
|
1054 | 'QST_display_text' => __('Address2', 'event_espresso'), |
|
@@ 1052-1066 (lines=15) @@ | ||
1049 | 'QST_deleted' => 0, |
|
1050 | ); |
|
1051 | break; |
|
1052 | case 'address2': |
|
1053 | $QST_values = array( |
|
1054 | 'QST_display_text' => __('Address2', 'event_espresso'), |
|
1055 | 'QST_admin_label' => __('Address2 - System Question', 'event_espresso'), |
|
1056 | 'QST_system' => 'address2', |
|
1057 | 'QST_type' => 'TEXT', |
|
1058 | 'QST_required' => 0, |
|
1059 | 'QST_required_text' => __('This field is required', 'event_espresso'), |
|
1060 | 'QST_order' => 5, |
|
1061 | 'QST_admin_only' => 0, |
|
1062 | 'QST_max' => EEM_Question::instance()->absolute_max_for_system_question($QST_system), |
|
1063 | 'QST_wp_user' => self::get_default_creator_id(), |
|
1064 | 'QST_deleted' => 0, |
|
1065 | ); |
|
1066 | break; |
|
1067 | case 'city': |
|
1068 | $QST_values = array( |
|
1069 | 'QST_display_text' => __('City', 'event_espresso'), |
|
@@ 1067-1081 (lines=15) @@ | ||
1064 | 'QST_deleted' => 0, |
|
1065 | ); |
|
1066 | break; |
|
1067 | case 'city': |
|
1068 | $QST_values = array( |
|
1069 | 'QST_display_text' => __('City', 'event_espresso'), |
|
1070 | 'QST_admin_label' => __('City - System Question', 'event_espresso'), |
|
1071 | 'QST_system' => 'city', |
|
1072 | 'QST_type' => 'TEXT', |
|
1073 | 'QST_required' => 0, |
|
1074 | 'QST_required_text' => __('This field is required', 'event_espresso'), |
|
1075 | 'QST_order' => 6, |
|
1076 | 'QST_admin_only' => 0, |
|
1077 | 'QST_max' => EEM_Question::instance()->absolute_max_for_system_question($QST_system), |
|
1078 | 'QST_wp_user' => self::get_default_creator_id(), |
|
1079 | 'QST_deleted' => 0, |
|
1080 | ); |
|
1081 | break; |
|
1082 | case 'country': |
|
1083 | $QST_values = array( |
|
1084 | 'QST_display_text' => __('Country', 'event_espresso'), |
|
@@ 1110-1124 (lines=15) @@ | ||
1107 | 'QST_deleted' => 0, |
|
1108 | ); |
|
1109 | break; |
|
1110 | case 'zip': |
|
1111 | $QST_values = array( |
|
1112 | 'QST_display_text' => __('Zip/Postal Code', 'event_espresso'), |
|
1113 | 'QST_admin_label' => __('Zip/Postal Code - System Question', 'event_espresso'), |
|
1114 | 'QST_system' => 'zip', |
|
1115 | 'QST_type' => 'TEXT', |
|
1116 | 'QST_required' => 0, |
|
1117 | 'QST_required_text' => __('This field is required', 'event_espresso'), |
|
1118 | 'QST_order' => 9, |
|
1119 | 'QST_admin_only' => 0, |
|
1120 | 'QST_max' => EEM_Question::instance()->absolute_max_for_system_question($QST_system), |
|
1121 | 'QST_wp_user' => self::get_default_creator_id(), |
|
1122 | 'QST_deleted' => 0, |
|
1123 | ); |
|
1124 | break; |
|
1125 | case 'phone': |
|
1126 | $QST_values = array( |
|
1127 | 'QST_display_text' => __('Phone Number', 'event_espresso'), |
|
@@ 1125-1139 (lines=15) @@ | ||
1122 | 'QST_deleted' => 0, |
|
1123 | ); |
|
1124 | break; |
|
1125 | case 'phone': |
|
1126 | $QST_values = array( |
|
1127 | 'QST_display_text' => __('Phone Number', 'event_espresso'), |
|
1128 | 'QST_admin_label' => __('Phone Number - System Question', 'event_espresso'), |
|
1129 | 'QST_system' => 'phone', |
|
1130 | 'QST_type' => 'TEXT', |
|
1131 | 'QST_required' => 0, |
|
1132 | 'QST_required_text' => __('This field is required', 'event_espresso'), |
|
1133 | 'QST_order' => 10, |
|
1134 | 'QST_admin_only' => 0, |
|
1135 | 'QST_max' => EEM_Question::instance()->absolute_max_for_system_question($QST_system), |
|
1136 | 'QST_wp_user' => self::get_default_creator_id(), |
|
1137 | 'QST_deleted' => 0, |
|
1138 | ); |
|
1139 | break; |
|
1140 | } |
|
1141 | if (! empty($QST_values)) { |
|
1142 | // insert system question |