@@ -46,15 +46,15 @@ |
||
| 46 | 46 | * Contributor(s): ______________________________________.. |
| 47 | 47 | ********************************************************************************/ |
| 48 | 48 | $fields_array['ProspectList'] = array ('column_fields' => array( |
| 49 | - "id", "date_entered", |
|
| 50 | - "date_modified", "modified_user_id", |
|
| 51 | - "assigned_user_id", "created_by", |
|
| 52 | - "name", "description",'list_type','domain_name', |
|
| 53 | - ), |
|
| 49 | + "id", "date_entered", |
|
| 50 | + "date_modified", "modified_user_id", |
|
| 51 | + "assigned_user_id", "created_by", |
|
| 52 | + "name", "description",'list_type','domain_name', |
|
| 53 | + ), |
|
| 54 | 54 | 'list_fields' => array( |
| 55 | - 'id', 'name', 'description','list_type', |
|
| 56 | - 'assigned_user_id','assigned_user_name', |
|
| 57 | - ), |
|
| 55 | + 'id', 'name', 'description','list_type', |
|
| 56 | + 'assigned_user_id','assigned_user_name', |
|
| 57 | + ), |
|
| 58 | 58 | 'required_fields' => array('name'=>1,'list_type'=>2), |
| 59 | 59 | ); |
| 60 | 60 | ?> |
| 61 | 61 | \ No newline at end of file |
@@ -52,71 +52,71 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | function getForm($prefix, $mod='', $form=''){ |
| 54 | 54 | |
| 55 | - if(!ACLController::checkAccess('ProspectLists', 'edit', true)){ |
|
| 56 | - return ''; |
|
| 57 | - } |
|
| 55 | + if(!ACLController::checkAccess('ProspectLists', 'edit', true)){ |
|
| 56 | + return ''; |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | - if(!empty($mod)){ |
|
| 60 | - global $current_language; |
|
| 61 | - $mod_strings = return_module_language($current_language, $mod); |
|
| 62 | - } else { |
|
| 63 | - global $mod_strings; |
|
| 64 | - } |
|
| 65 | - global $app_strings,$current_user; |
|
| 59 | + if(!empty($mod)){ |
|
| 60 | + global $current_language; |
|
| 61 | + $mod_strings = return_module_language($current_language, $mod); |
|
| 62 | + } else { |
|
| 63 | + global $mod_strings; |
|
| 64 | + } |
|
| 65 | + global $app_strings,$current_user; |
|
| 66 | 66 | |
| 67 | - $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE']; |
|
| 68 | - $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY']; |
|
| 69 | - $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL']; |
|
| 70 | - $user_id = $current_user->id; |
|
| 67 | + $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE']; |
|
| 68 | + $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY']; |
|
| 69 | + $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL']; |
|
| 70 | + $user_id = $current_user->id; |
|
| 71 | 71 | |
| 72 | 72 | |
| 73 | - $the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']); |
|
| 74 | - $the_form .= <<<EOQ |
|
| 73 | + $the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']); |
|
| 74 | + $the_form .= <<<EOQ |
|
| 75 | 75 | <form name="${prefix}ProspectListSave" onSubmit="return check_form('${prefix}ProspectListSave');" method="POST" action="index.php"> |
| 76 | 76 | <input type="hidden" name="${prefix}module" value="ProspectLists"> |
| 77 | 77 | <input type="hidden" name="${prefix}action" value="Save"> |
| 78 | 78 | <input type="hidden" name="assigned_user_id" value='${user_id}'> |
| 79 | 79 | EOQ; |
| 80 | 80 | |
| 81 | - $the_form .= $this->getFormBody($prefix, $mod, $prefix."ProspectListSave"); |
|
| 82 | - $the_form .= <<<EOQ |
|
| 81 | + $the_form .= $this->getFormBody($prefix, $mod, $prefix."ProspectListSave"); |
|
| 82 | + $the_form .= <<<EOQ |
|
| 83 | 83 | <p><input title="$lbl_save_button_title" accessKey="$lbl_save_button_key" class="button" type="submit" name="button" value=" $lbl_save_button_label " ></p> |
| 84 | 84 | </form> |
| 85 | 85 | |
| 86 | 86 | EOQ; |
| 87 | 87 | |
| 88 | - $the_form .= get_left_form_footer(); |
|
| 89 | - $the_form .= get_validate_record_js(); |
|
| 88 | + $the_form .= get_left_form_footer(); |
|
| 89 | + $the_form .= get_validate_record_js(); |
|
| 90 | 90 | |
| 91 | - return $the_form; |
|
| 91 | + return $the_form; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | function getFormBody($prefix, $mod='',$formname='', $size='30',$script=true) { |
| 95 | - if(!ACLController::checkAccess('ProspectLists', 'edit', true)){ |
|
| 96 | - return ''; |
|
| 97 | - } |
|
| 98 | - global $mod_strings; |
|
| 99 | - $temp_strings = $mod_strings; |
|
| 100 | - if(!empty($mod)){ |
|
| 101 | - global $current_language; |
|
| 102 | - $mod_strings = return_module_language($current_language, $mod); |
|
| 103 | - } |
|
| 104 | - global $app_strings; |
|
| 105 | - global $current_user; |
|
| 106 | - global $app_list_strings; |
|
| 95 | + if(!ACLController::checkAccess('ProspectLists', 'edit', true)){ |
|
| 96 | + return ''; |
|
| 97 | + } |
|
| 98 | + global $mod_strings; |
|
| 99 | + $temp_strings = $mod_strings; |
|
| 100 | + if(!empty($mod)){ |
|
| 101 | + global $current_language; |
|
| 102 | + $mod_strings = return_module_language($current_language, $mod); |
|
| 103 | + } |
|
| 104 | + global $app_strings; |
|
| 105 | + global $current_user; |
|
| 106 | + global $app_list_strings; |
|
| 107 | 107 | |
| 108 | - $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL']; |
|
| 109 | - $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE']; |
|
| 110 | - $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY']; |
|
| 111 | - $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL']; |
|
| 112 | - $user_id = $current_user->id; |
|
| 108 | + $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL']; |
|
| 109 | + $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE']; |
|
| 110 | + $lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY']; |
|
| 111 | + $lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL']; |
|
| 112 | + $user_id = $current_user->id; |
|
| 113 | 113 | |
| 114 | - $list_options=get_select_options_with_id($app_list_strings['prospect_list_type_dom'], 'default'); |
|
| 114 | + $list_options=get_select_options_with_id($app_list_strings['prospect_list_type_dom'], 'default'); |
|
| 115 | 115 | |
| 116 | - $lbl_prospect_list_name = $mod_strings['LBL_PROSPECT_LIST_NAME']; |
|
| 117 | - $lbl_list_type = $mod_strings['LBL_LIST_TYPE']; |
|
| 116 | + $lbl_prospect_list_name = $mod_strings['LBL_PROSPECT_LIST_NAME']; |
|
| 117 | + $lbl_list_type = $mod_strings['LBL_LIST_TYPE']; |
|
| 118 | 118 | |
| 119 | - $form = <<<EOQ |
|
| 119 | + $form = <<<EOQ |
|
| 120 | 120 | <p><input type="hidden" name="record" value=""> |
| 121 | 121 | $lbl_prospect_list_name <span class="required">$lbl_required_symbol</span><br> |
| 122 | 122 | <input name='name' type="text" value=""><br> |
@@ -126,43 +126,43 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | |
| 128 | 128 | |
| 129 | - $javascript = new javascript(); |
|
| 130 | - $javascript->setFormName($formname); |
|
| 131 | - $javascript->setSugarBean(new ProspectList()); |
|
| 132 | - $javascript->addRequiredFields($prefix); |
|
| 133 | - $form .=$javascript->getScript(); |
|
| 134 | - $mod_strings = $temp_strings; |
|
| 135 | - return $form; |
|
| 129 | + $javascript = new javascript(); |
|
| 130 | + $javascript->setFormName($formname); |
|
| 131 | + $javascript->setSugarBean(new ProspectList()); |
|
| 132 | + $javascript->addRequiredFields($prefix); |
|
| 133 | + $form .=$javascript->getScript(); |
|
| 134 | + $mod_strings = $temp_strings; |
|
| 135 | + return $form; |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - function handleSave($prefix,$redirect=true, $useRequired=false){ |
|
| 138 | + function handleSave($prefix,$redirect=true, $useRequired=false){ |
|
| 139 | 139 | |
| 140 | 140 | |
| 141 | - require_once('include/formbase.php'); |
|
| 141 | + require_once('include/formbase.php'); |
|
| 142 | 142 | |
| 143 | 143 | |
| 144 | - $focus = new ProspectList(); |
|
| 145 | - if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))){ |
|
| 146 | - return null; |
|
| 147 | - } |
|
| 148 | - $focus = populateFromPost($prefix, $focus); |
|
| 149 | - if(!$focus->ACLAccess('Save')){ |
|
| 150 | - ACLController::displayNoAccess(true); |
|
| 151 | - sugar_cleanup(true); |
|
| 152 | - } |
|
| 153 | - if(empty($focus->name)){ |
|
| 154 | - return null; |
|
| 155 | - } |
|
| 144 | + $focus = new ProspectList(); |
|
| 145 | + if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))){ |
|
| 146 | + return null; |
|
| 147 | + } |
|
| 148 | + $focus = populateFromPost($prefix, $focus); |
|
| 149 | + if(!$focus->ACLAccess('Save')){ |
|
| 150 | + ACLController::displayNoAccess(true); |
|
| 151 | + sugar_cleanup(true); |
|
| 152 | + } |
|
| 153 | + if(empty($focus->name)){ |
|
| 154 | + return null; |
|
| 155 | + } |
|
| 156 | 156 | if ( !isset($focus->assigned_user_id) || $focus->assigned_user_id == '' ) |
| 157 | 157 | $focus->assigned_user_id = $GLOBALS['current_user']->id; |
| 158 | 158 | |
| 159 | - $return_id = $focus->save(); |
|
| 160 | - if($redirect){ |
|
| 161 | - $GLOBALS['log']->debug("Saved record with id of ".$return_id); |
|
| 162 | - handleRedirect($return_id, "ProspectLists"); |
|
| 163 | - } else { |
|
| 164 | - return $focus; |
|
| 165 | - } |
|
| 166 | - } |
|
| 159 | + $return_id = $focus->save(); |
|
| 160 | + if($redirect){ |
|
| 161 | + $GLOBALS['log']->debug("Saved record with id of ".$return_id); |
|
| 162 | + handleRedirect($return_id, "ProspectLists"); |
|
| 163 | + } else { |
|
| 164 | + return $focus; |
|
| 165 | + } |
|
| 166 | + } |
|
| 167 | 167 | } |
| 168 | 168 | ?> |
@@ -67,9 +67,9 @@ discard block |
||
| 67 | 67 | $button = "<form action='index.php' method='post' name='ProspectListForm' id='ProspectListForm'>\n"; |
| 68 | 68 | $button .= "<input type='hidden' name='module' value='ProspectLists'>\n"; |
| 69 | 69 | if ($currentModule == 'Campaigns') { |
| 70 | - $button .= "<input type='hidden' name='campaign_id' value='$focus->id'>\n"; |
|
| 71 | - $button .= "<input type='hidden' name='record' value='$focus->id'>\n"; |
|
| 72 | - $button .= "<input type='hidden' name='campaign_name' value=\"$focus->name\">\n"; |
|
| 70 | + $button .= "<input type='hidden' name='campaign_id' value='$focus->id'>\n"; |
|
| 71 | + $button .= "<input type='hidden' name='record' value='$focus->id'>\n"; |
|
| 72 | + $button .= "<input type='hidden' name='campaign_name' value=\"$focus->name\">\n"; |
|
| 73 | 73 | } |
| 74 | 74 | $button .= "<input type='hidden' name='prospect_list_id' value=''>\n"; |
| 75 | 75 | $button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n"; |
@@ -80,28 +80,28 @@ discard block |
||
| 80 | 80 | $button .= "<input title='".$app_strings['LBL_NEW_BUTTON_TITLE']."' accessyKey='".$app_strings['LBL_NEW_BUTTON_KEY']."' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value=' ".$app_strings['LBL_NEW_BUTTON_LABEL']." '>\n"; |
| 81 | 81 | if ($currentModule == 'Campaigns') |
| 82 | 82 | { |
| 83 | - /////////////////////////////////////// |
|
| 84 | - /// |
|
| 85 | - /// SETUP PARENT POPUP |
|
| 83 | + /////////////////////////////////////// |
|
| 84 | + /// |
|
| 85 | + /// SETUP PARENT POPUP |
|
| 86 | 86 | |
| 87 | - $popup_request_data = array( |
|
| 88 | - 'call_back_function' => 'set_return_prospect_list_and_save', |
|
| 89 | - 'form_name' => 'ProspectListForm', |
|
| 90 | - 'field_to_name_array' => array( |
|
| 91 | - 'id' => 'prospect_list_id', |
|
| 92 | - ), |
|
| 93 | - ); |
|
| 87 | + $popup_request_data = array( |
|
| 88 | + 'call_back_function' => 'set_return_prospect_list_and_save', |
|
| 89 | + 'form_name' => 'ProspectListForm', |
|
| 90 | + 'field_to_name_array' => array( |
|
| 91 | + 'id' => 'prospect_list_id', |
|
| 92 | + ), |
|
| 93 | + ); |
|
| 94 | 94 | |
| 95 | - $json = getJSONobj(); |
|
| 96 | - $encoded_popup_request_data = $json->encode($popup_request_data); |
|
| 95 | + $json = getJSONobj(); |
|
| 96 | + $encoded_popup_request_data = $json->encode($popup_request_data); |
|
| 97 | 97 | |
| 98 | - // |
|
| 99 | - /////////////////////////////////////// |
|
| 98 | + // |
|
| 99 | + /////////////////////////////////////// |
|
| 100 | 100 | |
| 101 | - $button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE'] |
|
| 102 | - ." 'accessyKey='".$app_strings['LBL_SELECT_BUTTON_KEY'] |
|
| 103 | - ."' type='button' class='button' value=' ".$app_strings['LBL_SELECT_BUTTON_LABEL'] |
|
| 104 | - ." ' name='button' onclick='open_popup(\"ProspectLists\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n"; |
|
| 101 | + $button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE'] |
|
| 102 | + ." 'accessyKey='".$app_strings['LBL_SELECT_BUTTON_KEY'] |
|
| 103 | + ."' type='button' class='button' value=' ".$app_strings['LBL_SELECT_BUTTON_LABEL'] |
|
| 104 | + ." ' name='button' onclick='open_popup(\"ProspectLists\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n"; |
|
| 105 | 105 | // ." ' name='button' onclick='window.open(\"index.php?module=ProspectLists&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'>\n"; |
| 106 | 106 | } |
| 107 | 107 | |
@@ -40,24 +40,24 @@ |
||
| 40 | 40 | |
| 41 | 41 | |
| 42 | 42 | $layout_defs['AOS_Products'] = array( |
| 43 | - // list of what Subpanels to show in the DetailView |
|
| 44 | - 'subpanel_setup' => array( |
|
| 43 | + // list of what Subpanels to show in the DetailView |
|
| 44 | + 'subpanel_setup' => array( |
|
| 45 | 45 | |
| 46 | - 'aos_products_purchases' => array( |
|
| 47 | - 'order' => 100, |
|
| 48 | - 'module' => 'AOS_Quotes', |
|
| 49 | - 'subpanel_name' => 'ForProductPurchases', |
|
| 50 | - 'sort_order' => 'asc', |
|
| 51 | - 'sort_by' => 'id', |
|
| 52 | - 'title_key' => 'LBL_CUSTOMERS_PURCHASED_PRODUCTS_SUBPANEL_TITLE', |
|
| 53 | - //'get_subpanel_data' => 'aos_products_aos_quotes_1', |
|
| 54 | - 'get_subpanel_data' => 'function:getCustomersPurchasedProductsQuery', |
|
| 55 | - 'top_buttons' => |
|
| 56 | - array( |
|
| 57 | - ), |
|
| 58 | - ), |
|
| 46 | + 'aos_products_purchases' => array( |
|
| 47 | + 'order' => 100, |
|
| 48 | + 'module' => 'AOS_Quotes', |
|
| 49 | + 'subpanel_name' => 'ForProductPurchases', |
|
| 50 | + 'sort_order' => 'asc', |
|
| 51 | + 'sort_by' => 'id', |
|
| 52 | + 'title_key' => 'LBL_CUSTOMERS_PURCHASED_PRODUCTS_SUBPANEL_TITLE', |
|
| 53 | + //'get_subpanel_data' => 'aos_products_aos_quotes_1', |
|
| 54 | + 'get_subpanel_data' => 'function:getCustomersPurchasedProductsQuery', |
|
| 55 | + 'top_buttons' => |
|
| 56 | + array( |
|
| 57 | + ), |
|
| 58 | + ), |
|
| 59 | 59 | |
| 60 | - ), |
|
| 60 | + ), |
|
| 61 | 61 | ); |
| 62 | 62 | |
| 63 | 63 | |
@@ -30,27 +30,27 @@ |
||
| 30 | 30 | global $current_user; |
| 31 | 31 | |
| 32 | 32 | $dashletData['AOS_ProductsDashlet']['searchFields'] = array('date_entered' => array('default' => ''), |
| 33 | - 'date_modified' => array('default' => ''), |
|
| 33 | + 'date_modified' => array('default' => ''), |
|
| 34 | 34 | |
| 35 | 35 | |
| 36 | 36 | |
| 37 | - 'assigned_user_id' => array('type' => 'assigned_user_name', |
|
| 38 | - 'default' => $current_user->name)); |
|
| 37 | + 'assigned_user_id' => array('type' => 'assigned_user_name', |
|
| 38 | + 'default' => $current_user->name)); |
|
| 39 | 39 | $dashletData['AOS_ProductsDashlet']['columns'] = array( 'name' => array('width' => '40', |
| 40 | - 'label' => 'LBL_LIST_NAME', |
|
| 41 | - 'link' => true, |
|
| 42 | - 'default' => true), |
|
| 43 | - 'date_entered' => array('width' => '15', |
|
| 44 | - 'label' => 'LBL_DATE_ENTERED', |
|
| 45 | - 'default' => true), |
|
| 46 | - 'date_modified' => array('width' => '15', |
|
| 47 | - 'label' => 'LBL_DATE_MODIFIED'), |
|
| 48 | - 'created_by' => array('width' => '8', |
|
| 40 | + 'label' => 'LBL_LIST_NAME', |
|
| 41 | + 'link' => true, |
|
| 42 | + 'default' => true), |
|
| 43 | + 'date_entered' => array('width' => '15', |
|
| 44 | + 'label' => 'LBL_DATE_ENTERED', |
|
| 45 | + 'default' => true), |
|
| 46 | + 'date_modified' => array('width' => '15', |
|
| 47 | + 'label' => 'LBL_DATE_MODIFIED'), |
|
| 48 | + 'created_by' => array('width' => '8', |
|
| 49 | 49 | 'label' => 'LBL_CREATED'), |
| 50 | - 'assigned_user_name' => array('width' => '8', |
|
| 51 | - 'label' => 'LBL_LIST_ASSIGNED_USER'), |
|
| 50 | + 'assigned_user_name' => array('width' => '8', |
|
| 51 | + 'label' => 'LBL_LIST_ASSIGNED_USER'), |
|
| 52 | 52 | |
| 53 | 53 | |
| 54 | 54 | |
| 55 | 55 | |
| 56 | - ); |
|
| 56 | + ); |
|
@@ -2,129 +2,129 @@ |
||
| 2 | 2 | $module_name = 'AOS_Products'; |
| 3 | 3 | $viewdefs [$module_name] = |
| 4 | 4 | array ( |
| 5 | - 'EditView' => |
|
| 6 | - array ( |
|
| 5 | + 'EditView' => |
|
| 6 | + array ( |
|
| 7 | 7 | 'templateMeta' => |
| 8 | 8 | array ( |
| 9 | - 'maxColumns' => '2', |
|
| 10 | - 'widths' => |
|
| 11 | - array ( |
|
| 9 | + 'maxColumns' => '2', |
|
| 10 | + 'widths' => |
|
| 11 | + array ( |
|
| 12 | 12 | 0 => |
| 13 | 13 | array ( |
| 14 | - 'label' => '10', |
|
| 15 | - 'field' => '30', |
|
| 14 | + 'label' => '10', |
|
| 15 | + 'field' => '30', |
|
| 16 | 16 | ), |
| 17 | 17 | 1 => |
| 18 | 18 | array ( |
| 19 | - 'label' => '10', |
|
| 20 | - 'field' => '30', |
|
| 19 | + 'label' => '10', |
|
| 20 | + 'field' => '30', |
|
| 21 | + ), |
|
| 21 | 22 | ), |
| 22 | - ), |
|
| 23 | - 'form' => |
|
| 24 | - array ( |
|
| 23 | + 'form' => |
|
| 24 | + array ( |
|
| 25 | 25 | 'enctype' => 'multipart/form-data', |
| 26 | 26 | 'headerTpl' => 'modules/AOS_Products/tpls/EditViewHeader.tpl', |
| 27 | - ), |
|
| 28 | - 'includes' => |
|
| 29 | - array ( |
|
| 27 | + ), |
|
| 28 | + 'includes' => |
|
| 29 | + array ( |
|
| 30 | 30 | 0 => |
| 31 | 31 | array ( |
| 32 | - 'file' => 'modules/AOS_Products/js/products.js', |
|
| 32 | + 'file' => 'modules/AOS_Products/js/products.js', |
|
| 33 | 33 | ), |
| 34 | - ), |
|
| 35 | - 'useTabs' => false, |
|
| 36 | - 'tabDefs' => |
|
| 37 | - array ( |
|
| 34 | + ), |
|
| 35 | + 'useTabs' => false, |
|
| 36 | + 'tabDefs' => |
|
| 37 | + array ( |
|
| 38 | 38 | 'DEFAULT' => |
| 39 | 39 | array ( |
| 40 | - 'newTab' => false, |
|
| 41 | - 'panelDefault' => 'expanded', |
|
| 40 | + 'newTab' => false, |
|
| 41 | + 'panelDefault' => 'expanded', |
|
| 42 | + ), |
|
| 42 | 43 | ), |
| 43 | - ), |
|
| 44 | 44 | ), |
| 45 | 45 | 'panels' => |
| 46 | 46 | array ( |
| 47 | - 'default' => |
|
| 48 | - array ( |
|
| 47 | + 'default' => |
|
| 48 | + array ( |
|
| 49 | 49 | 0 => |
| 50 | 50 | array ( |
| 51 | - 0 => |
|
| 52 | - array ( |
|
| 51 | + 0 => |
|
| 52 | + array ( |
|
| 53 | 53 | 'name' => 'name', |
| 54 | 54 | 'label' => 'LBL_NAME', |
| 55 | - ), |
|
| 56 | - 1 => |
|
| 57 | - array ( |
|
| 55 | + ), |
|
| 56 | + 1 => |
|
| 57 | + array ( |
|
| 58 | 58 | 'name' => 'part_number', |
| 59 | 59 | 'label' => 'LBL_PART_NUMBER', |
| 60 | - ), |
|
| 60 | + ), |
|
| 61 | 61 | ), |
| 62 | 62 | 1 => |
| 63 | 63 | array ( |
| 64 | - 0 => |
|
| 65 | - array ( |
|
| 64 | + 0 => |
|
| 65 | + array ( |
|
| 66 | 66 | 'name' => 'aos_product_category_name', |
| 67 | 67 | 'label' => 'LBL_AOS_PRODUCT_CATEGORYS_NAME', |
| 68 | - ), |
|
| 69 | - 1 => |
|
| 70 | - array ( |
|
| 68 | + ), |
|
| 69 | + 1 => |
|
| 70 | + array ( |
|
| 71 | 71 | 'name' => 'type', |
| 72 | 72 | 'label' => 'LBL_TYPE', |
| 73 | - ), |
|
| 73 | + ), |
|
| 74 | 74 | ), |
| 75 | 75 | 2 => |
| 76 | 76 | array ( |
| 77 | - 0 => |
|
| 78 | - array ( |
|
| 77 | + 0 => |
|
| 78 | + array ( |
|
| 79 | 79 | 'name' => 'currency_id', |
| 80 | 80 | 'studio' => 'visible', |
| 81 | 81 | 'label' => 'LBL_CURRENCY', |
| 82 | - ), |
|
| 82 | + ), |
|
| 83 | 83 | ), |
| 84 | 84 | 3 => |
| 85 | 85 | array ( |
| 86 | - 0 => |
|
| 87 | - array ( |
|
| 86 | + 0 => |
|
| 87 | + array ( |
|
| 88 | 88 | 'name' => 'cost', |
| 89 | 89 | 'label' => 'LBL_COST', |
| 90 | - ), |
|
| 91 | - 1 => |
|
| 92 | - array ( |
|
| 90 | + ), |
|
| 91 | + 1 => |
|
| 92 | + array ( |
|
| 93 | 93 | 'name' => 'price', |
| 94 | 94 | 'label' => 'LBL_PRICE', |
| 95 | - ), |
|
| 95 | + ), |
|
| 96 | 96 | ), |
| 97 | 97 | 4 => |
| 98 | 98 | array ( |
| 99 | - 0 => |
|
| 100 | - array ( |
|
| 99 | + 0 => |
|
| 100 | + array ( |
|
| 101 | 101 | 'name' => 'contact', |
| 102 | 102 | 'label' => 'LBL_CONTACT', |
| 103 | - ), |
|
| 104 | - 1 => |
|
| 105 | - array ( |
|
| 103 | + ), |
|
| 104 | + 1 => |
|
| 105 | + array ( |
|
| 106 | 106 | 'name' => 'url', |
| 107 | 107 | 'label' => 'LBL_URL', |
| 108 | - ), |
|
| 108 | + ), |
|
| 109 | 109 | ), |
| 110 | 110 | 5 => |
| 111 | 111 | array ( |
| 112 | - 0 => |
|
| 113 | - array ( |
|
| 112 | + 0 => |
|
| 113 | + array ( |
|
| 114 | 114 | 'name' => 'description', |
| 115 | 115 | 'label' => 'LBL_DESCRIPTION', |
| 116 | - ), |
|
| 116 | + ), |
|
| 117 | 117 | ), |
| 118 | 118 | 6 => |
| 119 | 119 | array ( |
| 120 | - 0 => |
|
| 121 | - array ( |
|
| 120 | + 0 => |
|
| 121 | + array ( |
|
| 122 | 122 | 'name' => 'product_image', |
| 123 | 123 | 'customCode' => '{$PRODUCT_IMAGE}', |
| 124 | - ), |
|
| 124 | + ), |
|
| 125 | + ), |
|
| 125 | 126 | ), |
| 126 | - ), |
|
| 127 | 127 | ), |
| 128 | - ), |
|
| 128 | + ), |
|
| 129 | 129 | ); |
| 130 | 130 | ?> |
@@ -4,94 +4,94 @@ |
||
| 4 | 4 | 'varName' => 'AOS_Products', |
| 5 | 5 | 'orderBy' => 'aos_products.name', |
| 6 | 6 | 'whereClauses' => array ( |
| 7 | - 'name' => 'aos_products.name', |
|
| 8 | - 'part_number' => 'aos_products.part_number', |
|
| 9 | - 'cost' => 'aos_products.cost', |
|
| 10 | - 'price' => 'aos_products.price', |
|
| 11 | - 'created_by' => 'aos_products.created_by', |
|
| 7 | + 'name' => 'aos_products.name', |
|
| 8 | + 'part_number' => 'aos_products.part_number', |
|
| 9 | + 'cost' => 'aos_products.cost', |
|
| 10 | + 'price' => 'aos_products.price', |
|
| 11 | + 'created_by' => 'aos_products.created_by', |
|
| 12 | 12 | ), |
| 13 | 13 | 'searchInputs' => array ( |
| 14 | - 1 => 'name', |
|
| 15 | - 4 => 'part_number', |
|
| 16 | - 5 => 'cost', |
|
| 17 | - 6 => 'price', |
|
| 18 | - 7 => 'created_by', |
|
| 14 | + 1 => 'name', |
|
| 15 | + 4 => 'part_number', |
|
| 16 | + 5 => 'cost', |
|
| 17 | + 6 => 'price', |
|
| 18 | + 7 => 'created_by', |
|
| 19 | 19 | ), |
| 20 | 20 | 'searchdefs' => array ( |
| 21 | - 'name' => |
|
| 22 | - array ( |
|
| 21 | + 'name' => |
|
| 22 | + array ( |
|
| 23 | 23 | 'name' => 'name', |
| 24 | 24 | 'width' => '10%', |
| 25 | - ), |
|
| 26 | - 'part_number' => |
|
| 27 | - array ( |
|
| 25 | + ), |
|
| 26 | + 'part_number' => |
|
| 27 | + array ( |
|
| 28 | 28 | 'name' => 'part_number', |
| 29 | 29 | 'width' => '10%', |
| 30 | - ), |
|
| 31 | - 'cost' => |
|
| 32 | - array ( |
|
| 30 | + ), |
|
| 31 | + 'cost' => |
|
| 32 | + array ( |
|
| 33 | 33 | 'name' => 'cost', |
| 34 | 34 | 'width' => '10%', |
| 35 | - ), |
|
| 36 | - 'price' => |
|
| 37 | - array ( |
|
| 35 | + ), |
|
| 36 | + 'price' => |
|
| 37 | + array ( |
|
| 38 | 38 | 'name' => 'price', |
| 39 | 39 | 'width' => '10%', |
| 40 | - ), |
|
| 41 | - 'created_by' => |
|
| 42 | - array ( |
|
| 40 | + ), |
|
| 41 | + 'created_by' => |
|
| 42 | + array ( |
|
| 43 | 43 | 'name' => 'created_by', |
| 44 | 44 | 'label' => 'LBL_CREATED', |
| 45 | 45 | 'type' => 'enum', |
| 46 | 46 | 'function' => |
| 47 | 47 | array ( |
| 48 | - 'name' => 'get_user_array', |
|
| 49 | - 'params' => |
|
| 50 | - array ( |
|
| 48 | + 'name' => 'get_user_array', |
|
| 49 | + 'params' => |
|
| 50 | + array ( |
|
| 51 | 51 | 0 => false, |
| 52 | - ), |
|
| 52 | + ), |
|
| 53 | 53 | ), |
| 54 | 54 | 'width' => '10%', |
| 55 | - ), |
|
| 55 | + ), |
|
| 56 | 56 | ), |
| 57 | 57 | 'listviewdefs' => array ( |
| 58 | - 'NAME' => |
|
| 59 | - array ( |
|
| 58 | + 'NAME' => |
|
| 59 | + array ( |
|
| 60 | 60 | 'width' => '25%', |
| 61 | 61 | 'label' => 'LBL_NAME', |
| 62 | 62 | 'default' => true, |
| 63 | 63 | 'link' => true, |
| 64 | 64 | 'name' => 'name', |
| 65 | - ), |
|
| 66 | - 'PART_NUMBER' => |
|
| 67 | - array ( |
|
| 65 | + ), |
|
| 66 | + 'PART_NUMBER' => |
|
| 67 | + array ( |
|
| 68 | 68 | 'width' => '10%', |
| 69 | 69 | 'label' => 'LBL_PART_NUMBER', |
| 70 | 70 | 'default' => true, |
| 71 | 71 | 'name' => 'part_number', |
| 72 | - ), |
|
| 73 | - 'COST' => |
|
| 74 | - array ( |
|
| 72 | + ), |
|
| 73 | + 'COST' => |
|
| 74 | + array ( |
|
| 75 | 75 | 'width' => '10%', |
| 76 | 76 | 'label' => 'LBL_COST', |
| 77 | 77 | 'default' => true, |
| 78 | 78 | 'name' => 'cost', |
| 79 | - ), |
|
| 80 | - 'PRICE' => |
|
| 81 | - array ( |
|
| 79 | + ), |
|
| 80 | + 'PRICE' => |
|
| 81 | + array ( |
|
| 82 | 82 | 'width' => '10%', |
| 83 | 83 | 'label' => 'LBL_PRICE', |
| 84 | 84 | 'default' => true, |
| 85 | 85 | 'name' => 'price', |
| 86 | - ), |
|
| 87 | - 'CURRENCY_ID' => |
|
| 88 | - array ( |
|
| 86 | + ), |
|
| 87 | + 'CURRENCY_ID' => |
|
| 88 | + array ( |
|
| 89 | 89 | 'type' => 'id', |
| 90 | 90 | 'studio' => 'visible', |
| 91 | 91 | 'label' => 'LBL_CURRENCY', |
| 92 | 92 | 'width' => '10%', |
| 93 | 93 | 'default' => false, |
| 94 | 94 | 'name' => 'currency_id', |
| 95 | - ), |
|
| 95 | + ), |
|
| 96 | 96 | ), |
| 97 | 97 | ); |
@@ -2,71 +2,71 @@ |
||
| 2 | 2 | $module_name = 'AOS_Products'; |
| 3 | 3 | $searchdefs [$module_name] = |
| 4 | 4 | array ( |
| 5 | - 'layout' => |
|
| 6 | - array ( |
|
| 5 | + 'layout' => |
|
| 6 | + array ( |
|
| 7 | 7 | 'basic_search' => |
| 8 | 8 | array ( |
| 9 | - 0 => 'name', |
|
| 10 | - 1 => |
|
| 11 | - array ( |
|
| 9 | + 0 => 'name', |
|
| 10 | + 1 => |
|
| 11 | + array ( |
|
| 12 | 12 | 'name' => 'current_user_only', |
| 13 | 13 | 'label' => 'LBL_CURRENT_USER_FILTER', |
| 14 | 14 | 'type' => 'bool', |
| 15 | - ), |
|
| 15 | + ), |
|
| 16 | 16 | 'favorites_only' => array ('name' => 'favorites_only','label' => 'LBL_FAVORITES_FILTER','type' => 'bool',), |
| 17 | 17 | ), |
| 18 | 18 | 'advanced_search' => |
| 19 | 19 | array ( |
| 20 | - 'name' => |
|
| 21 | - array ( |
|
| 20 | + 'name' => |
|
| 21 | + array ( |
|
| 22 | 22 | 'name' => 'name', |
| 23 | 23 | 'default' => true, |
| 24 | 24 | 'width' => '10%', |
| 25 | - ), |
|
| 26 | - 'part_number' => |
|
| 27 | - array ( |
|
| 25 | + ), |
|
| 26 | + 'part_number' => |
|
| 27 | + array ( |
|
| 28 | 28 | 'name' => 'part_number', |
| 29 | 29 | 'default' => true, |
| 30 | 30 | 'width' => '10%', |
| 31 | - ), |
|
| 32 | - 'cost' => |
|
| 33 | - array ( |
|
| 31 | + ), |
|
| 32 | + 'cost' => |
|
| 33 | + array ( |
|
| 34 | 34 | 'name' => 'cost', |
| 35 | 35 | 'default' => true, |
| 36 | 36 | 'width' => '10%', |
| 37 | - ), |
|
| 38 | - 'price' => |
|
| 39 | - array ( |
|
| 37 | + ), |
|
| 38 | + 'price' => |
|
| 39 | + array ( |
|
| 40 | 40 | 'name' => 'price', |
| 41 | 41 | 'default' => true, |
| 42 | 42 | 'width' => '10%', |
| 43 | - ), |
|
| 44 | - 'created_by' => |
|
| 45 | - array ( |
|
| 43 | + ), |
|
| 44 | + 'created_by' => |
|
| 45 | + array ( |
|
| 46 | 46 | 'name' => 'created_by', |
| 47 | 47 | 'label' => 'LBL_CREATED', |
| 48 | 48 | 'type' => 'enum', |
| 49 | 49 | 'function' => |
| 50 | 50 | array ( |
| 51 | - 'name' => 'get_user_array', |
|
| 52 | - 'params' => |
|
| 53 | - array ( |
|
| 51 | + 'name' => 'get_user_array', |
|
| 52 | + 'params' => |
|
| 53 | + array ( |
|
| 54 | 54 | 0 => false, |
| 55 | - ), |
|
| 55 | + ), |
|
| 56 | 56 | ), |
| 57 | 57 | 'default' => true, |
| 58 | 58 | 'width' => '10%', |
| 59 | - ), |
|
| 59 | + ), |
|
| 60 | + ), |
|
| 60 | 61 | ), |
| 61 | - ), |
|
| 62 | - 'templateMeta' => |
|
| 63 | - array ( |
|
| 62 | + 'templateMeta' => |
|
| 63 | + array ( |
|
| 64 | 64 | 'maxColumns' => '3', |
| 65 | 65 | 'widths' => |
| 66 | 66 | array ( |
| 67 | - 'label' => '10', |
|
| 68 | - 'field' => '30', |
|
| 67 | + 'label' => '10', |
|
| 68 | + 'field' => '30', |
|
| 69 | + ), |
|
| 69 | 70 | ), |
| 70 | - ), |
|
| 71 | 71 | ); |
| 72 | 72 | ?> |
@@ -2,87 +2,87 @@ |
||
| 2 | 2 | // created: 2013-05-07 12:48:58 |
| 3 | 3 | global $current_user; |
| 4 | 4 | $searchFields['AOS_Products'] = array ( |
| 5 | - 'name' => |
|
| 6 | - array ( |
|
| 5 | + 'name' => |
|
| 6 | + array ( |
|
| 7 | 7 | 'query_type' => 'default', |
| 8 | - ), |
|
| 9 | - 'current_user_only' => |
|
| 10 | - array ( |
|
| 8 | + ), |
|
| 9 | + 'current_user_only' => |
|
| 10 | + array ( |
|
| 11 | 11 | 'query_type' => 'default', |
| 12 | 12 | 'db_field' => |
| 13 | 13 | array ( |
| 14 | - 0 => 'created_by', |
|
| 14 | + 0 => 'created_by', |
|
| 15 | 15 | ), |
| 16 | 16 | 'my_items' => true, |
| 17 | 17 | 'vname' => 'LBL_CURRENT_USER_FILTER', |
| 18 | 18 | 'type' => 'bool', |
| 19 | - ), |
|
| 20 | - 'range_price' => |
|
| 21 | - array ( |
|
| 19 | + ), |
|
| 20 | + 'range_price' => |
|
| 21 | + array ( |
|
| 22 | 22 | 'query_type' => 'default', |
| 23 | 23 | 'enable_range_search' => true, |
| 24 | - ), |
|
| 25 | - 'start_range_price' => |
|
| 26 | - array ( |
|
| 24 | + ), |
|
| 25 | + 'start_range_price' => |
|
| 26 | + array ( |
|
| 27 | 27 | 'query_type' => 'default', |
| 28 | 28 | 'enable_range_search' => true, |
| 29 | - ), |
|
| 30 | - 'end_range_price' => |
|
| 31 | - array ( |
|
| 29 | + ), |
|
| 30 | + 'end_range_price' => |
|
| 31 | + array ( |
|
| 32 | 32 | 'query_type' => 'default', |
| 33 | 33 | 'enable_range_search' => true, |
| 34 | - ), |
|
| 35 | - 'range_cost' => |
|
| 36 | - array ( |
|
| 34 | + ), |
|
| 35 | + 'range_cost' => |
|
| 36 | + array ( |
|
| 37 | 37 | 'query_type' => 'default', |
| 38 | 38 | 'enable_range_search' => true, |
| 39 | - ), |
|
| 40 | - 'start_range_cost' => |
|
| 41 | - array ( |
|
| 39 | + ), |
|
| 40 | + 'start_range_cost' => |
|
| 41 | + array ( |
|
| 42 | 42 | 'query_type' => 'default', |
| 43 | 43 | 'enable_range_search' => true, |
| 44 | - ), |
|
| 45 | - 'end_range_cost' => |
|
| 46 | - array ( |
|
| 44 | + ), |
|
| 45 | + 'end_range_cost' => |
|
| 46 | + array ( |
|
| 47 | 47 | 'query_type' => 'default', |
| 48 | 48 | 'enable_range_search' => true, |
| 49 | - ), |
|
| 50 | - 'range_date_entered' => |
|
| 51 | - array ( |
|
| 49 | + ), |
|
| 50 | + 'range_date_entered' => |
|
| 51 | + array ( |
|
| 52 | 52 | 'query_type' => 'default', |
| 53 | 53 | 'enable_range_search' => true, |
| 54 | 54 | 'is_date_field' => true, |
| 55 | - ), |
|
| 56 | - 'start_range_date_entered' => |
|
| 57 | - array ( |
|
| 55 | + ), |
|
| 56 | + 'start_range_date_entered' => |
|
| 57 | + array ( |
|
| 58 | 58 | 'query_type' => 'default', |
| 59 | 59 | 'enable_range_search' => true, |
| 60 | 60 | 'is_date_field' => true, |
| 61 | - ), |
|
| 62 | - 'end_range_date_entered' => |
|
| 63 | - array ( |
|
| 61 | + ), |
|
| 62 | + 'end_range_date_entered' => |
|
| 63 | + array ( |
|
| 64 | 64 | 'query_type' => 'default', |
| 65 | 65 | 'enable_range_search' => true, |
| 66 | 66 | 'is_date_field' => true, |
| 67 | - ), |
|
| 68 | - 'range_date_modified' => |
|
| 69 | - array ( |
|
| 67 | + ), |
|
| 68 | + 'range_date_modified' => |
|
| 69 | + array ( |
|
| 70 | 70 | 'query_type' => 'default', |
| 71 | 71 | 'enable_range_search' => true, |
| 72 | 72 | 'is_date_field' => true, |
| 73 | - ), |
|
| 74 | - 'start_range_date_modified' => |
|
| 75 | - array ( |
|
| 73 | + ), |
|
| 74 | + 'start_range_date_modified' => |
|
| 75 | + array ( |
|
| 76 | 76 | 'query_type' => 'default', |
| 77 | 77 | 'enable_range_search' => true, |
| 78 | 78 | 'is_date_field' => true, |
| 79 | - ), |
|
| 80 | - 'end_range_date_modified' => |
|
| 81 | - array ( |
|
| 79 | + ), |
|
| 80 | + 'end_range_date_modified' => |
|
| 81 | + array ( |
|
| 82 | 82 | 'query_type' => 'default', |
| 83 | 83 | 'enable_range_search' => true, |
| 84 | 84 | 'is_date_field' => true, |
| 85 | - ), |
|
| 85 | + ), |
|
| 86 | 86 | 'favorites_only' => array( |
| 87 | 87 | 'query_type'=>'format', |
| 88 | 88 | 'operator' => 'subquery', |