This file contains hidden or 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
$form['settings'] = array( | |
'#type' => 'textfield', | |
'#states' => array( | |
// Only show this field when the 'toggle_me' checkbox is enabled. | |
'visible' => array( | |
':input[name="toggle_me"]' => array('checked' => TRUE), | |
), | |
), | |
); |
This file contains hidden or 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
// this will not work | |
$form['whitelist'] = array( | |
'#type' => 'checkbox', | |
'#states' => array( | |
// uncheck this box when the other checkbox is checked. | |
'unchecked' => array( | |
':input[name="blacklist"]' => array('checked' => TRUE), | |
), | |
), |
This file contains hidden or 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
// toggle-chk.js | |
// ------------------------------------------------------------------ | |
// | |
// functions to toggle the checked state of checkboxes. | |
// | |
// The Drupal FAPI is too cumbersome to use for setting up | |
// mutually exclusive checkboxes. | |
// | |
// created: Wed Aug 3 15:53:33 2016 | |
// last saved: <2016-August-03 16:17:04> |
This file contains hidden or 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
// this works, with the toggle-chk.js logic | |
$form['blacklist'] = array( | |
'#type' => 'checkbox', | |
'#attributes' => array( 'data-unset-if-checked' => 'whitelist' ) | |
); | |
$form['whitelist'] = array( | |
'#type' => 'checkbox', | |
'#attributes' => array( 'data-unset-if-checked' => 'blacklist' ) |
This file contains hidden or 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
function MYMODULENAME_init() { | |
if (arg(0) == 'admin') { | |
// for module-specific css and JS | |
drupal_add_js(drupal_get_path('module', 'MYMODULENAME') . '/toggle-chk.js'); | |
} | |
} | |
This file contains hidden or 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
<OAuthV2 name='OAuthV2-GenerateAccessToken-PG'> | |
<!-- created at 2016-03-26T02:43:06+0000 --> | |
<Operation>GenerateAccessToken</Operation> | |
<!-- | |
ExpiresIn, in milliseconds. The ref is optional. The explicitly specified | |
value is the default, when the variable reference cannot be resolved. | |
1800000 = 30 minutes | |
2400000 = 40 minutes | |
3600000 = 60 minutes | |
--> |
This file contains hidden or 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
curl -i -u VyFNU1xB6oDjmRaAQEmpNZzGNA9X3IAM:HDs4t5JSSSzsBAhA \ | |
https://nordstrom-eval1-test.apigee.net/v2/authorizationservice/shopperauth/token -X POST \ | |
-d 'grant_type=password&[email protected]&password=Passw0rd' | |
curl -i https://nordstrom-eval1-test.apigee.net/shopper-service/validate \ | |
-H Content-type:application/json \ | |
-d '{"username":"[email protected]", "password": "Passw0rd"}' |
This file contains hidden or 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
// generateUuid.js | |
// ------------------------------------------------------------------ | |
// | |
// created: Wed Dec 14 13:44:38 2016 | |
// last saved: <2016-December-14 13:44:44> | |
function generateUUID(){ | |
var d = new Date().getTime(); | |
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = (d + Math.random()*16)%16 | 0; |
This file contains hidden or 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
deb-src http://archive.ubuntu.com/ubuntu trusty main restricted #Added by software-properties | |
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty restricted main universe multiverse #Added by software-properties | |
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-updates restricted main universe multiverse #Added by software-properties | |
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse #Added by software-properties | |
deb-src http://security.ubuntu.com/ubuntu trusty-security restricted main universe multiverse #Added by software-properties | |
deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-proposed restricted main universe multiverse #Added by software-properties | |