|
|
@ -1,6 +1,7 @@
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
function fulcrm_apiv2_admin_form_submit( $form, &$form_state ) {
|
|
|
|
function fulcrm_apiv2_admin_form_submit( $form, &$form_state ) {
|
|
|
|
|
|
|
|
variable_set( 'fulcrm_apiv2_hostname', $form_state[ 'values' ][ 'hostname' ] );
|
|
|
|
variable_set( 'fulcrm_apiv2_user', $form_state[ 'values' ][ 'apiuser' ] );
|
|
|
|
variable_set( 'fulcrm_apiv2_user', $form_state[ 'values' ][ 'apiuser' ] );
|
|
|
|
variable_set( 'fulcrm_apiv2_key', $form_state[ 'values' ][ 'apikey' ] );
|
|
|
|
variable_set( 'fulcrm_apiv2_key', $form_state[ 'values' ][ 'apikey' ] );
|
|
|
|
variable_set( 'fulcrm_apiv2_client_id', $form_state[ 'values' ][ 'clientid' ] );
|
|
|
|
variable_set( 'fulcrm_apiv2_client_id', $form_state[ 'values' ][ 'clientid' ] );
|
|
|
@ -16,12 +17,20 @@ function fulcrm_apiv2_admin_form( $form, &$form_state ) {
|
|
|
|
'#title' => 'fulcrm.org APIv2 Credentials',
|
|
|
|
'#title' => 'fulcrm.org APIv2 Credentials',
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$form[ 'api' ][ 'hostname' ] = array( '#type' => 'select',
|
|
|
|
|
|
|
|
'#title' => 'Instance',
|
|
|
|
|
|
|
|
'#description' => 'fulcrm.org APIv2 instance',
|
|
|
|
|
|
|
|
'#options' => array( 'fulcrm.org' => 'LIVE',
|
|
|
|
|
|
|
|
'test.fulcrm.org' => 'TEST (live data, pre-production code)',
|
|
|
|
|
|
|
|
'dev.fulcrm.org' => 'DEV (test data, in-development code)',
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
'#default_value' => variable_get( 'fulcrm_apiv2_hostname', 'fulcrm.org' ),
|
|
|
|
|
|
|
|
);
|
|
|
|
$form[ 'api' ][ 'apiuser' ] = array( '#type' => 'textfield',
|
|
|
|
$form[ 'api' ][ 'apiuser' ] = array( '#type' => 'textfield',
|
|
|
|
'#title' => 'API Username',
|
|
|
|
'#title' => 'API Username',
|
|
|
|
'#description' => 'fulcrm.org APIv2 username',
|
|
|
|
'#description' => 'fulcrm.org APIv2 username',
|
|
|
|
'#default_value' => variable_get( 'fulcrm_apiv2_user', '' ),
|
|
|
|
'#default_value' => variable_get( 'fulcrm_apiv2_user', '' ),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
$form[ 'api' ][ 'apikey' ] = array( '#type' => 'textfield',
|
|
|
|
$form[ 'api' ][ 'apikey' ] = array( '#type' => 'textfield',
|
|
|
|
'#title' => 'API Key',
|
|
|
|
'#title' => 'API Key',
|
|
|
|
'#description' => 'fulcrm.org APIv2 key',
|
|
|
|
'#description' => 'fulcrm.org APIv2 key',
|
|
|
|