case 'RichTextEditor':
$attributes = array('rows' => $field->note_rows, 'cols' => $field->note_columns);
if ($field->text_length) {
- $attributes['maxlength'] = $field->text_length;
+ $attributes['maxlength'] = $field->text_length;
}
$qf->addWysiwyg($elementName, $label, $attributes, $search);
break;
* Path to wkhtmltopdf if available
*/
public $wkhtmltopdfPath = FALSE;
-
+
/**
* Allow second-degree relations permission to edit contacts
*/
array('fv' => array('includeGroups' => array('3', '5')),
'id' => array(
'13', '14', '15', '16', '17', '18',
- '19', '20', '21', '22', '23', '24',
+ '19', '20', '21', '22', '23', '24',
'27', '28',
),
),
// Exclude tag 7
array('fv' => array('excludeTags' => array('7')),
'id' => array(
- '9', '10', '13', '14', '17', '18',
+ '9', '10', '13', '14', '17', '18',
'21', '22', '27',
),
),
'andOr' => 0,
),
'id' => array(
- '11', '12', '15', '16', '17', '18',
+ '11', '12', '15', '16', '17', '18',
'19', '20', '21', '22', '23', '24',
'26', '27', '28',
),
/>
<civicrm_entity_tag
entity_id="14"
- entity_table="civicrm_contact"
+ entity_table="civicrm_contact"
tag_id="9"
/>
<civicrm_entity_tag
entity_id="16"
- entity_table="civicrm_contact"
+ entity_table="civicrm_contact"
tag_id="9"
/>
<civicrm_entity_tag
$a->set('bar', $barValue);
$this->assertDBQuery(2, 'SELECT count(*) FROM civicrm_cache WHERE group_name = "testSameInstance"');
$this->assertEquals($a->get('bar'), 45.78);
-
+
$a->delete('foo');
$this->assertDBQuery(1, 'SELECT count(*) FROM civicrm_cache WHERE group_name = "testSameInstance"');
if (empty($civicrm_root)) {
$civicrm_root = dirname (dirname (dirname (dirname( __FILE__ ) )));
}
-#$civicrm_root = '/var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/modules/civicrm';
+#$civicrm_root = '/var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/modules/civicrm';
// set this to a temporary directory. it defaults to /tmp/civi on linux
//define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'the/absolute/path/' );
function testProfileAddContactstoGroup() {
$this->webtestLogin();
-
+
// take group name and create group
$groupName = 'group_' . substr(sha1(rand()), 0, 7);
$this->WebtestAddGroup($groupName);
-
+
// Add new profile.
$this->openCiviPage('admin/uf/group', 'reset=1');
//click on save
$this->clickLink('_qf_Group_next');
-
+
//check for profile create
$this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
$this->click("//option[@value='$type']");
$this->click('field_name_1');
$this->select('field_name_1', "value=$field");
- $this->clickLink('_qf_Field_next_new-top');
+ $this->clickLink('_qf_Field_next_new-top');
}
// create mode
$this->type('last_name', $lastName1);
$this->type('email-Primary', "$firstName1.$lastName1@example.com");
$this->clickLink('_qf_Edit_next', NULL);
-
+
//anonymous contact
$this->webtestLogout();
$this->openCiviPage('profile/create', "gid=$gid&reset=1", NULL);
$this->type('last_name', $lastName2);
$this->type('email-Primary', "$firstName2.$lastName2@example.com");
$this->clickLink('_qf_Edit_next', NULL);
-
+
$this->webtestLogin();
//check the existence of the two contacts in the group
$this->openCiviPage('group', 'reset=1');
$this->waitForVisible('crm-group-selector_processing');
$this->waitForElementPresent("xpath=//table[@id='crm-group-selector']/tbody/tr/td[contains(text(), '$groupName')]/following-sibling::td[@class='crm-group-group_links']/span/a");
$this->clickLink("xpath=//table[@id='crm-group-selector']/tbody/tr/td[1][text()= '$groupName']/following-sibling::td[@class='crm-group-group_links']/span/a");
- $contactEmails = array(
- 1 => "$lastName1, $firstName1",
+ $contactEmails = array(
+ 1 => "$lastName1, $firstName1",
2 => "$lastName2, $firstName2"
);
foreach ($contactEmails as $row => $name) {
$this->openCiviPage('admin/uf/group', 'reset=1');
$this->_testdeleteProfile($profileTitle);
}
-
+
function _testdeleteProfile($profileTitle) {
//$this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForElementPresent("//div[@id='user-profiles']/div/div/table/tbody//tr/td[1]/span[text() = '$profileTitle']/../following-sibling::td[4]/span[2][text()='more']/ul/li[4]/a[text()='Delete']");
<value>Gift</value> <!-- name -->
<value>For some worthwhile cause</value> <!-- description -->
<value>0</value> <!-- is_deductible -->
- <null /> <!-- is_reserved -->
- <value>1</value> <!-- is_active -->
+ <null /> <!-- is_reserved -->
+ <value>1</value> <!-- is_active -->
</row>
<row>
<value>Prize</value> <!-- name -->
<value>Also for some worthwhile cause</value> <!-- description -->
<value>0</value> <!-- is_deductible -->
- <null /> <!-- is_reserved -->
- <value>1</value> <!-- is_active -->
- </row>
+ <null /> <!-- is_reserved -->
+ <value>1</value> <!-- is_active -->
+ </row>
</table>
</dataset>
<value>10</value> <!-- id -->
<value>civicrm_financial_type</value> <!-- entity_table -->
<value>10</value> <!-- entity_id -->
- <value>1</value> <!-- account_relationship -->
- <value>1</value> <!-- financial_account_id -->
+ <value>1</value> <!-- account_relationship -->
+ <value>1</value> <!-- financial_account_id -->
</row>
<row>
<value>11</value> <!-- id -->
<value>civicrm_financial_type</value> <!-- entity_table -->
<value>11</value> <!-- entity_id -->
- <value>1</value> <!-- account_relationship -->
- <value>1</value> <!-- financial_account_id -->
- </row>
+ <value>1</value> <!-- account_relationship -->
+ <value>1</value> <!-- financial_account_id -->
+ </row>
</table>
</dataset>
<value>4</value> <!-- id -->
<value>2</value> <!-- parent_group_id -->
<value>4</value> <!-- child_group_id -->
- </row>
+ </row>
</table>
</dataset>
<null /> <!-- parents -->
<null /> <!-- children -->
<value>0</value> <!-- is_hidden -->
- </row>
+ </row>
</table>
</dataset>
<value>0</value>
<value>1</value>
<null />
- </row>
+ </row>
<row>
<null />
<value>2</value>
<value>1</value>
<value>1</value>
<value>9</value>
- </row>
+ </row>
</table>
<table name="civicrm_option_value">
<column>id</column>
<value>0</value>
<value>0</value>
<value>1</value>
- </row>
+ </row>
</table>
</dataset>
<value>1</value> <!-- is_active -->
<null /> <!-- component_id -->
<null /> <!-- visibility_id -->
- </row>
+ </row>
<row>
<value>66</value> <!-- id -->
<value>11</value> <!-- option_group_id -->
<value>1</value> <!-- is_active -->
<null /> <!-- component_id -->
<null /> <!-- visibility_id -->
- </row>
+ </row>
<row>
<value>63</value> <!-- id -->
<value>11</value> <!-- option_group_id -->
<value>1</value> <!-- is_active -->
<null /> <!-- component_id -->
<null /> <!-- visibility_id -->
- </row>
+ </row>
</table>
</dataset>