-
Notifications
You must be signed in to change notification settings - Fork 1
/
webform_salsa.install~
115 lines (106 loc) · 2.89 KB
/
webform_salsa.install~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
/**
* @file
* defines database schema
*/
/**
* Implements hook_schema().
*/
function webform_salsa_schema() {
$schema['webform_salsa_options'] = array(
'description' => 'Stores options for Webform External API',
'fields' => array(
'oid' => array(
'description' => 'Unique identifier for option set',
'type' => 'serial',
'size' => 'big',
'not null' => TRUE,
),
'nid' => array(
'description' => 'nid of webform node',
'type' => 'int',
'not null' => TRUE,
),
'salsa_enabled' => array(
'description' => 'Enable Salsa integration',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
),
'salsa_node_url' => array(
'description' => 'URL to access Salsa API',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'salsa_organization_key' => array(
'description' => 'Salsa organization key',
'type' => 'int',
'not null' => TRUE,
),
'salsa_chapter_key' => array(
'description' => 'Salsa chapter key',
'type' => 'int',
'not null' => TRUE,
),
'salsa_account_email' => array(
'description' => 'Email of Salsa user account',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'salsa_password' => array(
'description' => 'Password of Salsa user account',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'salsa_field_mapping' => array(
'description' => 'Salsa field mapping',
'type' => 'text',
'not null' => TRUE,
),
'salsa_boolean_field_mapping' => array(
'description' => 'Salsa checkbox to boolean mapping',
'type' => 'text',
'not null' => TRUE,
),
'salsa_groups_field_mapping' => array(
'description' => 'Salsa checkbox to groups mapping',
'type' => 'text',
'not null' => TRUE,
),
'salsa_group_id' => array(
'description' => 'Salsa group id',
'type' => 'int',
'not null' => TRUE,
),
'salsa_tag' => array(
'description' => 'Salsa tags',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
),
'primary key' => array('oid'),
'unique keys' => array(
'oid' => array('oid')
),
'indexes' => array(
'nid' => array('nid'),
),
);
return $schema;
}
/**
* Implementation of hook_uninstall().
*/
function webform_salsa_uninstall() {
variable_del('webform_salsa_node_url');
variable_del('webform_salsa_organization_key');
variable_del('webform_salsa_chapter_key');
variable_del('webform_salsa_account_email');
variable_del('webform_salsa_password');
variable_del('webform_salsa_group_id');
variable_del('webform_salsa_tag');
}