<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2015
*/
/**
- * form helper class for an Website object
+ * Form helper class for an Website object,
*/
class CRM_Contact_Form_Inline_Website extends CRM_Contact_Form_Inline {
/**
* Build the form object elements for website object.
- *
- * @return void
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form.
- *
- * @return void
*/
public function postProcess() {
$params = $this->exportValues();
+ foreach ($this->_websites as $count => $value) {
+ if (!empty($value['id']) && isset($params['website'][$count])) {
+ $params['website'][$count]['id'] = $value['id'];
+ }
+ }
// Process / save websites
CRM_Core_BAO_Website::create($params['website'], $this->_contactId, TRUE);