️ change json files to php files and add custom fields for projects

Changeing the file type is necessary to use the ts() function during custom field creation.

Added new custom fields to map the donation form settings.
This commit is contained in:
Marc Michalsky forumZFD 2021-04-12 09:47:42 +02:00
parent 968bb9d831
commit 0d9b312a9b
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
12 changed files with 1262 additions and 606 deletions

View file

@ -1,469 +0,0 @@
{
"campaign_types": {
"twingle_project": {
"name": "twingle_project",
"label": "Twingle Project"
},
"twingle_event": {
"name": "twingle_event",
"label": "Twingle Event"
},
"twingle_campaign": {
"name": "twingle_campaign",
"label": "Twingle Campaign"
}
},
"custom_groups": {
"twingle_project_information": {
"title": "Twingle Project Information",
"name": "Twingle_Project_Information",
"extends": "Campaign",
"campaign_type": "twingle_project",
"weight": "1"
},
"twingle_project_embed_codes": {
"title": "Twingle Project Embed Codes",
"name": "Twingle_Project_Embed_Codes",
"extends": "Campaign",
"campaign_type": "twingle_project",
"collapse_display": "1",
"weight": "2"
},
"twingle_event_information": {
"title": "Twingle Event Information",
"name": "Twingle_Event_Information",
"extends": "Campaign",
"campaign_type": "twingle_event"
},
"twingle_campaign_information": {
"title": "Twingle Campaign Information",
"name": "Twingle_Campaign_Information",
"extends": "Campaign",
"campaign_type": "twingle_campaign"
}
},
"custom_fields": {
"twingle_project_id": {
"custom_group_id": "Twingle_Project_Information",
"label": "Twingle Project ID",
"name": "twingle_project_id",
"is_required": 0,
"is_searchable": 1,
"data_type": "String",
"html_type": "Text",
"text_length": 16,
"is_active": 1,
"is_view": 1,
"weight": 1
},
"twingle_project_organisation_id": {
"custom_group_id": "Twingle_Project_Information",
"label": "Twingle Project organisation ID",
"name": "twingle_project_organisation_id",
"is_required": 0,
"is_searchable": 1,
"data_type": "String",
"html_type": "Text",
"text_length": 32,
"is_active": 1,
"is_view": 1,
"weight": 6
},
"twingle_project_identifier": {
"custom_group_id": "Twingle_Project_Information",
"label": "Twingle Project identifier",
"name": "twingle_project_identifier",
"is_required": 0,
"is_searchable": 1,
"data_type": "String",
"html_type": "Text",
"text_length": 15,
"is_active": 1,
"is_view": 1,
"weight": 3,
"help_post": "An unique identifier for a project (auto generated)"
},
"twingle_project_type": {
"custom_group_id": "Twingle_Project_Information",
"label": "Twingle Project Type",
"name": "twingle_project_type",
"is_required": 0,
"is_searchable": 1,
"data_type": "String",
"html_type": "Select",
"option_values": {
"default": "Default",
"event": "Events",
"membership": "Membership"
},
"text_length": 32,
"is_active": 1,
"is_view": 0,
"weight": 2,
"help_post": "Choose the project type. Allow users to create own events or to pay a membership fee.",
"default_value": "default"
},
"twingle_project_allow_more": {
"custom_group_id": "Twingle_Project_Information",
"label": "Twingle Project allow more",
"name": "twingle_project_allow_more",
"is_required": 0,
"is_searchable": 1,
"data_type": "Boolean",
"html_type": "Radio",
"text_length": 4,
"is_active": 1,
"is_view": 0,
"weight": 4,
"help_post": "Allow to donate more than is defined in the target"
},
"twingle_project_transaction_type": {
"custom_group_id": "Twingle_Project_Information",
"label": "Twingle Project transaction type",
"name": "twingle_project_transaction_type",
"is_required": 0,
"is_searchable": 1,
"data_type": "String",
"html_type": "Text",
"text_length": 32,
"is_active": 1,
"is_view": 0,
"weight": 5
},
"twingle_project_url": {
"custom_group_id": "Twingle_Project_Information",
"label": "Twingle Project URL",
"name": "twingle_project_url",
"is_required": 0,
"is_searchable": 0,
"data_type": "Memo",
"html_type": "TextArea",
"text_length": 600,
"is_active": 1,
"is_view": 0,
"weight": 6
},
"twingle_project_widget": {
"custom_group_id": "Twingle_Project_Embed_Codes",
"label": "Twingle Project Widget",
"name": "twingle_project_widget",
"is_required": 0,
"is_searchable": 0,
"data_type": "Memo",
"html_type": "TextArea",
"text_length": 600,
"is_active": 1,
"is_view": 1,
"weight": 1
},
"twingle_project_form": {
"custom_group_id": "Twingle_Project_Embed_Codes",
"label": "Twingle Project Form",
"name": "twingle_project_form",
"is_required": 0,
"is_searchable": 0,
"data_type": "Memo",
"html_type": "TextArea",
"text_length": 600,
"is_active": 1,
"is_view": 1,
"weight": 2
},
"twingle_project_widget-single": {
"custom_group_id": "Twingle_Project_Embed_Codes",
"label": "Twingle Project Widget Single",
"name": "twingle_project_widget-single",
"is_required": 0,
"is_searchable": 0,
"data_type": "Memo",
"html_type": "TextArea",
"text_length": 600,
"is_active": 1,
"is_view": 1,
"weight": 3
},
"twingle_project_form-single": {
"custom_group_id": "Twingle_Project_Embed_Codes",
"label": "Twingle Project Form Single",
"name": "twingle_project_form-single",
"is_required": 0,
"is_searchable": 0,
"data_type": "Memo",
"html_type": "TextArea",
"text_length": 600,
"is_active": 1,
"is_view": 1,
"weight": 4
},
"twingle_project_eventall": {
"custom_group_id": "Twingle_Project_Embed_Codes",
"label": "Twingle Project All Events",
"name": "twingle_project_eventall",
"is_required": 0,
"is_searchable": 0,
"data_type": "Memo",
"html_type": "TextArea",
"text_length": 1300,
"is_active": 1,
"is_view": 1,
"weight": 5
},
"twingle_project_eventlist": {
"custom_group_id": "Twingle_Project_Embed_Codes",
"label": "Twingle Project Event List",
"name": "twingle_project_eventlist",
"is_required": 0,
"is_searchable": 0,
"data_type": "Memo",
"html_type": "TextArea",
"text_length": 1300,
"is_active": 1,
"is_view": 1,
"weight": 6
},
"twingle_project_counter": {
"custom_group_id": "Twingle_Project_Embed_Codes",
"label": "Twingle Project Counter",
"name": "twingle_project_counter",
"is_required": 0,
"is_searchable": 0,
"data_type": "Memo",
"html_type": "TextArea",
"text_length": 120,
"is_active": 1,
"is_view": 1,
"weight": 7
},
"twingle_project_page": {
"custom_group_id": "Twingle_Project_Embed_Codes",
"label": "Twingle Project Page",
"name": "twingle_project_page",
"is_required": 0,
"is_searchable": 0,
"data_type": "Memo",
"html_type": "TextArea",
"text_length": 600,
"is_active": 1,
"is_view": 1,
"weight": 8
},
"twingle_event_id": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event ID",
"name": "twingle_event_id",
"is_required": 1,
"is_searchable": 1,
"data_type": "String",
"html_type": "Text",
"text_length": 16,
"is_active": 1,
"is_view": 1,
"weight": 1
},
"twingle_event_project_id": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Project ID",
"name": "twingle_event_project_id",
"is_required": 0,
"is_searchable": 1,
"data_type": "String",
"html_type": "Text",
"text_length": 16,
"is_active": 1,
"is_view": 1,
"weight": 2
},
"twingle_event_identifier": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event Identifier",
"name": "twingle_event_identifier",
"is_required": 0,
"is_searchable": 0,
"data_type": "String",
"html_type": "Text",
"text_length": 16,
"is_active": 1,
"is_view": 1,
"weight": 3
},
"twingle_event_contact": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event Initiator",
"name": "twingle_event_contact",
"is_required": 0,
"is_searchable": 1,
"data_type": "ContactReference",
"html_type": "Autocomplete-Select",
"is_active": 1,
"is_view": 0,
"weight": 5
},
"twingle_event_user_email": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event Initiator Email",
"name": "twingle_event_user_email",
"is_required": 0,
"is_searchable": 0,
"data_type": "String",
"html_type": "Text",
"text_length": 128,
"is_active": 1,
"is_view": 1,
"weight": 6
},
"twingle_event_is_public": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event is public",
"name": "twingle_event_is_public",
"is_required": 0,
"is_searchable": 1,
"data_type": "Boolean",
"html_type": "Radio",
"is_active": 1,
"is_view": 1,
"weight": 7
},
"twingle_event_deleted": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event Deleted",
"name": "twingle_event_deleted",
"is_required": 0,
"is_searchable": 1,
"data_type": "Boolean",
"html_type": "Radio",
"is_active": 1,
"is_view": 1,
"weight": 8
},
"twingle_event_confirmed_at": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event Confirmed At",
"name": "twingle_event_confirmed_at",
"is_required": 0,
"is_searchable": 0,
"data_type": "String",
"html_type": "Text",
"text_length": 64,
"is_active": 1,
"is_view": 1,
"weight": 9
},
"twingle_event_created_at": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event Created At",
"name": "twingle_event_created_at",
"is_required": 0,
"is_searchable": 0,
"data_type": "String",
"html_type": "Text",
"text_length": 64,
"is_active": 1,
"is_view": 1,
"weight": 10
},
"twingle_event_creation_url": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event Creation URL",
"name": "twingle_event_creation_url",
"is_required": 0,
"is_searchable": 0,
"data_type": "String",
"html_type": "Text",
"text_length": 256,
"is_active": 1,
"is_view": 1,
"weight": 11
},
"twingle_event_url_internal": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event Internal URL",
"name": "twingle_event_url_internal",
"is_required": 0,
"is_searchable": 0,
"data_type": "String",
"html_type": "Text",
"text_length": 256,
"is_active": 1,
"is_view": 1,
"weight": 12
},
"twingle_event_url_external": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event External URL",
"name": "twingle_event_url_external",
"is_required": 0,
"is_searchable": 0,
"data_type": "String",
"html_type": "Text",
"text_length": 256,
"is_active": 1,
"is_view": 1,
"weight": 13
},
"twingle_event_url_edit_internal": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event Edit Internal URL",
"name": "twingle_event_url_edit_internal",
"is_required": 0,
"is_searchable": 0,
"data_type": "String",
"html_type": "Text",
"text_length": 256,
"is_active": 1,
"is_view": 1,
"weight": 14
},
"twingle_event_url_edit_external": {
"custom_group_id": "Twingle_Event_Information",
"label": "Twingle Event Edit External URL",
"name": "twingle_event_url_edit_external",
"is_required": 0,
"is_searchable": 0,
"data_type": "String",
"html_type": "Text",
"text_length": 256,
"is_active": 1,
"is_view": 1,
"weight": 15
},
"twingle_campaign_parent_project_id": {
"custom_group_id": "Twingle_Campaign_Information",
"label": "Parent TwingleProject ID",
"name": "twingle_campaign_parent_project_id",
"is_required": 0,
"is_searchable": 1,
"data_type": "String",
"html_type": "Text",
"text_length": 16,
"is_active": 1,
"is_view": 1,
"weight": 1
},
"twingle_campaign_cid": {
"custom_group_id": "Twingle_Campaign_Information",
"label": "Twingle Campaign CID",
"name": "twingle_campaign_cid",
"is_required": 0,
"is_searchable": 0,
"data_type": "Memo",
"html_type": "Text",
"text_length": 32,
"is_active": 1,
"is_view": 1,
"weight": 2
},
"twingle_campaign_url": {
"custom_group_id": "Twingle_Campaign_Information",
"label": "Twingle Campaign URL",
"name": "twingle_campaign_url",
"is_required": 0,
"is_searchable": 0,
"data_type": "Memo",
"html_type": "TextArea",
"text_length": 600,
"is_active": 1,
"is_view": 1,
"weight": 3
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,13 +0,0 @@
{
"TwingleProject": {
"name": "title",
"last_update": "last_modified_date",
"project_target": "goal_revenue"
},
"TwingleEvent": {
"description": "title",
"updated_at": "last_modified_date",
"created_at": "start_date",
"target": "goal_revenue"
}
}

View file

@ -0,0 +1,18 @@
<?php
return [
"TwingleProject" => [
"name" => "title",
"last_update" => "last_modified_date",
"project_target" => "goal_revenue",
"counter-url" => "counter",
"embed" => "embed_codes"
],
"TwingleEvent" => [
"description" => "title",
"updated_at" => "last_modified_date",
"created_at" => "start_date",
"target" => "goal_revenue"
]
];

View file

@ -1,8 +0,0 @@
{
"twingle_event_donation": {
"name": "twingle_event_donation",
"label": "Twingle Event",
"description": "A soft credit type for TwingleEvent initiators.",
"option_group_id": "soft_credit_type"
}
}

View file

@ -0,0 +1,10 @@
<?php
return [
"twingle_event_donation" => [
"name" => "twingle_event_donation",
"label" => "Twingle Event",
"description" => "A soft credit type for TwingleEvent initiators.",
"option_group_id" => "soft_credit_type"
]
];

View file

@ -1,61 +0,0 @@
{
"TwingleProject": [
"id",
"identifier",
"allow_more",
"name",
"organisation_id",
"project_target",
"transaction_type",
"type",
"last_update",
"url"
],
"project_embed_data": [
"page",
"widget",
"form",
"form-single",
"widget-single",
"eventall",
"eventlist",
"counter"
],
"TwingleEvent": [
"id",
"project_id",
"identifier",
"description",
"user_name",
"user_email",
"is_public",
"deleted",
"confirmed_at",
"created_at",
"updated_at",
"target",
"creation_url",
"show_internal",
"show_external",
"edit_internal",
"edit_external",
"urls"
],
"event_embed_data": [
"page",
"eventpage",
"widget",
"form",
"widget-single",
"form-single",
"eventall",
"eventlist",
"eventeditcreate"
],
"TwingleCampaign": [
"id",
"parent_id",
"name",
"title"
]
}

View file

@ -0,0 +1,114 @@
<?php
return [
"TwingleProject" => [
"project_data" => [
"id",
"identifier",
"allow_more",
"name",
"organisation_id",
"project_target",
"transaction_type",
"type",
"last_update",
"url"
],
"project_embed_data" => [
"page",
"widget",
"form",
"form-single",
"widget-single",
"eventall",
"eventlist",
"counter"
],
"project_options" => [
"has_confirmation_mail",
"has_donation_receipt",
"has_contact_data",
"donation_rhythm",
"default_rhythm",
"has_newsletter_registration",
"has_postinfo_registration",
"design_background_color",
"design_primary_color",
"design_font_color",
"bcc_email_address",
"donation_value_min",
"donation_value_max",
"donation_value_default",
"contact_fields",
"exclude_contact_fields",
"mandatory_contact_fields",
"custom_css",
"share_url",
"has_contact_mandatory",
"has_doi",
"has_force_donation_target_buttons",
"slidericon",
"has_hidden_logo",
"has_projecttarget_as_money",
"has_donationtarget_textfield",
"has_civi_crm_activated",
"has_step_index",
"languages",
"has_buttons",
"has_no_slider",
"buttons",
"has_newsletter_namerequest",
"has_show_donator_data"
],
"payment_methods" => [
"has_paypal",
"has_banktransfer",
"has_debit",
"has_sofortueberweisung",
"has_paypal_recurring",
"has_debit_recurring"
]
],
"TwingleEvent" => [
"event_data" => [
"id",
"project_id",
"identifier",
"description",
"user_name",
"user_email",
"is_public",
"deleted",
"confirmed_at",
"created_at",
"updated_at",
"target",
"creation_url",
"show_internal",
"show_external",
"edit_internal",
"edit_external",
"urls"
],
"event_embed_data" => [
"page",
"eventpage",
"widget",
"form",
"widget-single",
"form-single",
"eventall",
"eventlist",
"eventeditcreate"
]
],
"TwingleCampaign" => [
"campaign_data" => [
"id",
"parent_id",
"name",
"title"
]
]
];