From dcb0704567f830efd4fdbf8ca88b0d3a8b2b5e33 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Sat, 3 May 2014 16:21:12 +0530 Subject: [PATCH] -- added code to set default website type in inline mode, CRM-9288 ---------------------------------------- * CRM-9288: Website type improvements: allow multiple websites in Profiles, respect default type and update type options https://issues.civicrm.org/jira/browse/CRM-9288 --- CRM/Contact/Form/Inline/Website.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CRM/Contact/Form/Inline/Website.php b/CRM/Contact/Form/Inline/Website.php index d6f55e9586..674866bbfc 100644 --- a/CRM/Contact/Form/Inline/Website.php +++ b/CRM/Contact/Form/Inline/Website.php @@ -107,6 +107,12 @@ class CRM_Contact_Form_Inline_Website extends CRM_Contact_Form_Inline { $defaults['website'][$id] = $value; } } + else { + // set the default website type + $defaults['website'][1]['website_type_id'] = key(CRM_Core_OptionGroup::values('website_type', + FALSE, FALSE, FALSE, ' AND is_default = 1' + )); + } return $defaults; } -- 2.25.1