Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Commerce Exactor patch
diff --git a/modules/commerce_exactor_calc/commerce_exactor_calc.module b/modules/commerce_exactor_calc/commerce_exactor_calc.module
index e3cb463..e99cf27 100644
--- a/modules/commerce_exactor_calc/commerce_exactor_calc.module
+++ b/modules/commerce_exactor_calc/commerce_exactor_calc.module
@@ -6,6 +6,51 @@
*/
/**
+ * Implemments hook_form_FORM_ID_alter().
+ */
+function commerce_exactor_calc_form_commerce_exactor_settings_form_alter(&$form, &$form_state, $form_id) {
+ $form['exactor_obfuscate_records'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Obfuscate Name & Email'),
+ '#description' => t('If you would like to disguise the name and email records stored in Exactor\'s databases. The idea here is to limit the scope of Personally Indentifiable Information (PII) stored at Exactor. Note: this will not affect the records stored in your Drupal database.'),
+ '#default_value' => variable_get('exactor_obfuscate_records'),
+ );
+ $form['exactor_obfuscate_fname'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Disguised First Name'),
+ '#description' => t('First name you want used for every record stored at Exactor.'),
+ '#default_value' => variable_get('exactor_obfuscate_fname', t('Name')),
+ '#states' => array(
+ 'invisible' => array(
+ ':input[name="exactor_obfuscate_records"]' => array('checked' => FALSE),
+ ),
+ ),
+ );
+ $form['exactor_obfuscate_lname'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Disguised Last Name'),
+ '#description' => t('Last name you want used for every record stored at Exactor.'),
+ '#default_value' => variable_get('exactor_obfuscate_lname', t('Surname')),
+ '#states' => array(
+ 'invisible' => array(
+ ':input[name="exactor_obfuscate_records"]' => array('checked' => FALSE),
+ ),
+ ),
+ );
+ $form['exactor_obfuscate_email'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Disguised Email'),
+ '#description' => t('Email name you want used for every record stored at Exactor.'),
+ '#default_value' => variable_get('exactor_obfuscate_email', t('name@example.com')),
+ '#states' => array(
+ 'invisible' => array(
+ ':input[name="exactor_obfuscate_records"]' => array('checked' => FALSE),
+ ),
+ ),
+ );
+}
+
+/**
* Implements hook_commerce_line_item_type_info().
*
* @see hook_commerce_line_item_type_info().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.