projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix year in headers
[civicrm-core.git]
/
templates
/
CRM
/
Contribute
/
Form
/
PCP.js.tpl
diff --git
a/templates/CRM/Contribute/Form/PCP.js.tpl
b/templates/CRM/Contribute/Form/PCP.js.tpl
index 5d81d64dffb2ab551eac5cc25c917a804817fa4d..1b137b5441aa81f1e97e413e2b8f5e53161c34cc 100644
(file)
--- a/
templates/CRM/Contribute/Form/PCP.js.tpl
+++ b/
templates/CRM/Contribute/Form/PCP.js.tpl
@@
-2,7
+2,7
@@
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
5
|
+ | Copyright CiviCRM LLC (c) 2004-201
7
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-47,7
+47,11
@@
})
// This is just a cheap trick to store the name when the form reloads
.on('change', function() {
})
// This is just a cheap trick to store the name when the form reloads
.on('change', function() {
- $('[name=pcp_made_through]', $form).val($(this).select2('data').text || '');
+ var fieldNameVal = $(this).select2('data');
+ if (!fieldNameVal) {
+ fieldNameVal = '';
+ }
+ $('[name=pcp_made_through]', $form).val(fieldNameVal.text);
});
});
</script>
});
});
</script>