Eileen has submitted this change and it was merged.
Change subject: Reworked patch to be smaller and error proof.
......................................................................
Reworked patch to be smaller and error proof.
Change-Id: I82a4dfd3d44043f6ede130a1221a89a9b7a7a775
---
M CRM/Profile/Page/MultipleRecordFieldsListing.php
1 file changed, 22 insertions(+), 24 deletions(-)
Approvals:
Eileen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/CRM/Profile/Page/MultipleRecordFieldsListing.php
b/CRM/Profile/Page/MultipleRecordFieldsListing.php
index 808a5f9..09644e0 100644
--- a/CRM/Profile/Page/MultipleRecordFieldsListing.php
+++ b/CRM/Profile/Page/MultipleRecordFieldsListing.php
@@ -337,33 +337,31 @@
// TODO: Not all widget types and validation rules are supported
by crmEditable so some fields will not be in-place editable
$fieldAttributes = array('class' =>
"crmf-custom_{$fieldId}_$recId");
$editable = FALSE;
- if ($linkAction & CRM_Core_Action::UPDATE) {
+ if (!$options[$fieldId]['attributes']['is_view'] && $linkAction
& CRM_Core_Action::UPDATE) {
$spec = $options[$fieldId]['attributes'];
- if ($spec['is_view'] == '0') {
- switch ($spec['html_type']) {
- case 'Text':
- // Other data types like money would require some extra
validation
- // FIXME: crmEditable currently does not support any
validation rules :(
- $supportedDataTypes = array('Float', 'String', 'Int');
- $editable = in_array($spec['data_type'],
$supportedDataTypes);
- break;
+ switch ($spec['html_type']) {
+ case 'Text':
+ // Other data types like money would require some extra
validation
+ // FIXME: crmEditable currently does not support any
validation rules :(
+ $supportedDataTypes = array('Float', 'String', 'Int');
+ $editable = in_array($spec['data_type'],
$supportedDataTypes);
+ break;
- case 'TextArea':
- $editable = TRUE;
- $fieldAttributes['data-type'] = 'textarea';
- break;
+ case 'TextArea':
+ $editable = TRUE;
+ $fieldAttributes['data-type'] = 'textarea';
+ break;
- case 'Radio':
- case 'Select':
- case 'Select Country':
- case 'Select State/Province':
- $editable = TRUE;
- $fieldAttributes['data-type'] = $spec['data_type'] ==
'Boolean' ? 'boolean' : 'select';
- if (!$spec['is_required']) {
- $fieldAttributes['data-empty-option'] = ts('- none -');
- }
- break;
- }
+ case 'Radio':
+ case 'Select':
+ case 'Select Country':
+ case 'Select State/Province':
+ $editable = TRUE;
+ $fieldAttributes['data-type'] = $spec['data_type'] ==
'Boolean' ? 'boolean' : 'select';
+ if (!$spec['is_required']) {
+ $fieldAttributes['data-empty-option'] = ts('- none -');
+ }
+ break;
}
}
if ($editable) {
--
To view, visit https://gerrit.wikimedia.org/r/268700
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I82a4dfd3d44043f6ede130a1221a89a9b7a7a775
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Eileen <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits