Created
July 21, 2014 11:14
-
-
Save jalama/cee3a6d611e677125f5b to your computer and use it in GitHub Desktop.
Commerce Exactor patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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