Introduce new `communication_style` field for Contacts
[civicrm-core.git] / CRM / Contact / Form / Test.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
232624b1 4 | CiviCRM version 4.4 |
6a488035
TO
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2013 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
26*/
27
28/**
29 *
30 * @package CRM
31 * @copyright CiviCRM LLC (c) 2004-2013
32 * $Id$
33 *
34 */
35
36/**
37 * This class generates form components generic to all the contact types.
38 *
39 * It delegates the work to lower level subclasses and integrates the changes
40 * back in. It also uses a lot of functionality with the CRM API's, so any change
41 * made here could potentially affect the API etc. Be careful, be aware, use unit tests.
42 *
43 */
44class CRM_Contact_Form_Test extends CRM_Core_Form {
45 function preProcess() {}
46
47 /**
48 * This function sets the default values for the form. Note that in edit/view mode
49 * the default values are retrieved from the database
50 *
51 * @access public
52 *
53 * @return None
54 */
55 function setDefaultValues() {
56 $defaults = array();
57 $params = array();
58 }
59
60 /**
61 * Function to actually build the form
62 *
63 * @return None
64 * @access public
65 */
66 public function buildQuickForm() {
67
68 $this->addElement('text', "state", ts('State / Province'), 'onkeyup="getState(this,event, false);" onblur="getState(this,event, false);" autocomplete="off"');
69
70 $this->addElement('text', "state_id", ts('State / Province Id'));
71 //$this->addElement('text', "country", ts('Country'));
72 // $this->addElement('text', "country_id", ts('Country Id'));
73 $this->addElement('select', "country", ts('Country'), array('' => ts('- select -')), 'onblur="getState(this,event, true);"');
74 }
75
76 /**
77 * Form submission of new/edit contact is processed.
78 *
79 * @access public
80 *
81 * @return None
82 */
83 public function postProcess() {}
84}
85