From 5805fc587e22cc0b0b32e2fe0814ce8dd725a1a7 Mon Sep 17 00:00:00 2001 From: Lauren Schaefer Date: Tue, 22 May 2018 16:16:01 -0500 Subject: [PATCH] Fixes #65: Submit online application to Prof M School - Add new fields for the application form - Update the Applicant record view layout - Create Online Application Form - Create page that is displayed when user submits application form - Update Postman Collection to create campaigns - Update Postman sample data to include application data - Add unit tests - Add acceptance tests - Add documentation --- data/ProfessorM_PostmanCollection.json | 80 ++++- docs/AcceptanceTests.md | 14 + docs/OnlineApplications.md | 38 ++ docs/UseCases.md | 4 + package/pack.php | 97 ++++++ .../Ext/EntryPointRegistry/getCampaign.php | 6 + .../ar_SA.sugar_languages.leadscustomized.php | 11 + .../bg_BG.sugar_languages.leadscustomized.php | 11 + .../ca_ES.sugar_languages.leadscustomized.php | 11 + .../cs_CZ.sugar_languages.leadscustomized.php | 11 + .../da_DK.sugar_languages.leadscustomized.php | 11 + .../de_DE.sugar_languages.leadscustomized.php | 11 + .../el_EL.sugar_languages.leadscustomized.php | 11 + .../en_UK.sugar_languages.leadscustomized.php | 11 + .../en_us.sugar_languages.leadscustomized.php | 11 + .../es_ES.sugar_languages.leadscustomized.php | 11 + .../es_LA.sugar_languages.leadscustomized.php | 11 + .../et_EE.sugar_languages.leadscustomized.php | 11 + .../fi_FI.sugar_languages.leadscustomized.php | 11 + .../fr_FR.sugar_languages.leadscustomized.php | 11 + .../he_IL.sugar_languages.leadscustomized.php | 11 + .../hr_HR.sugar_languages.leadscustomized.php | 11 + .../hu_HU.sugar_languages.leadscustomized.php | 11 + .../it_it.sugar_languages.leadscustomized.php | 11 + .../ja_JP.sugar_languages.leadscustomized.php | 11 + .../ko_KR.sugar_languages.leadscustomized.php | 11 + .../lt_LT.sugar_languages.leadscustomized.php | 11 + .../lv_LV.sugar_languages.leadscustomized.php | 11 + .../nb_NO.sugar_languages.leadscustomized.php | 11 + .../nl_NL.sugar_languages.leadscustomized.php | 11 + .../pl_PL.sugar_languages.leadscustomized.php | 11 + .../pt_BR.sugar_languages.leadscustomized.php | 11 + .../pt_PT.sugar_languages.leadscustomized.php | 11 + .../ro_RO.sugar_languages.leadscustomized.php | 11 + .../ru_RU.sugar_languages.leadscustomized.php | 11 + .../sk_SK.sugar_languages.leadscustomized.php | 11 + .../sq_AL.sugar_languages.leadscustomized.php | 11 + .../sr_RS.sugar_languages.leadscustomized.php | 11 + .../sv_SE.sugar_languages.leadscustomized.php | 11 + .../th_TH.sugar_languages.leadscustomized.php | 11 + .../tr_TR.sugar_languages.leadscustomized.php | 11 + .../uk_UA.sugar_languages.leadscustomized.php | 11 + .../zh_CN.sugar_languages.leadscustomized.php | 11 + .../zh_TW.sugar_languages.leadscustomized.php | 11 + .../en_us.ProfessorMStudioChanges.lang.php | 5 + .../Leads/Ext/Vardefs/sugarfield_gpa_c.php | 7 + .../Ext/Vardefs/sugarfield_highschool_c.php | 12 + .../sugarfield_programminglanguages_c.php | 7 + .../Ext/Vardefs/sugarfield_transcript_c.php | 12 + .../clients/base/views/record/record.php | 36 +- .../online_application_form/ApplyOnline.html | 327 ++++++++++++++++++ .../ApplyOnlineSuccess.html | 18 + .../ApplicationCampaignManager.php | 61 ++++ .../GetCampaignEntrypoint.php | 9 + .../ApplicationCampaignManagerTest.php | 70 ++++ 55 files changed, 1206 insertions(+), 15 deletions(-) create mode 100644 docs/AcceptanceTests.md create mode 100644 docs/OnlineApplications.md create mode 100644 package/src/custom/Extension/application/Ext/EntryPointRegistry/getCampaign.php create mode 100644 package/src/custom/Extension/application/Ext/Language/ar_SA.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/bg_BG.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/ca_ES.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/cs_CZ.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/da_DK.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/de_DE.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/el_EL.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/en_UK.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/en_us.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/es_ES.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/es_LA.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/et_EE.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/fi_FI.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/fr_FR.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/he_IL.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/hr_HR.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/hu_HU.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/it_it.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/ja_JP.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/ko_KR.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/lt_LT.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/lv_LV.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/nb_NO.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/nl_NL.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/pl_PL.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/pt_BR.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/pt_PT.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/ro_RO.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/ru_RU.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/sk_SK.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/sq_AL.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/sr_RS.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/sv_SE.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/th_TH.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/tr_TR.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/uk_UA.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/zh_CN.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/application/Ext/Language/zh_TW.sugar_languages.leadscustomized.php create mode 100644 package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_gpa_c.php create mode 100644 package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_highschool_c.php create mode 100644 package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_programminglanguages_c.php create mode 100644 package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_transcript_c.php create mode 100644 package/src/custom/online_application_form/ApplyOnline.html create mode 100644 package/src/custom/online_application_form/ApplyOnlineSuccess.html create mode 100644 package/src/custom/src/application_campaign/ApplicationCampaignManager.php create mode 100644 package/src/custom/src/application_campaign/GetCampaignEntrypoint.php create mode 100644 package/src/custom/tests/School/unit-php/src/application_campaign/ApplicationCampaignManagerTest.php diff --git a/data/ProfessorM_PostmanCollection.json b/data/ProfessorM_PostmanCollection.json index 969be6da..83264fa4 100644 --- a/data/ProfessorM_PostmanCollection.json +++ b/data/ProfessorM_PostmanCollection.json @@ -3,7 +3,7 @@ "info": { "name": "ProfessorM Sample Data", "_postman_id": "fc375495-ded0-309d-599e-fa5c27b17910", - "description": "This collection is associated with the tutorial posted at XXXX and the environment posted at YYYYY.", + "description": "See https://github.com/sugarcrm/school for more information.", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, "item": [ @@ -1709,7 +1709,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Firebird\",\n\t\"salutation\":\"Ms.\",\n\t\"first_name\":\"Janice\",\n\t\"last_name\":\"Beige\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Employee\",\n\t\"birthdate\":\"1975-05-22\",\n\t\"status_description\":\"Beware: potentially volatile\",\n\t\"pr_professors_leadspr_professors_ida\":\"{{Professor_Beige}}\",\n\t\"account_name\":\"M-Men\",\n\t\"account_id\":\"{{SuperGroup_M-Men}}\",\n\t\"contact_id\":\"{{Student_Firebird}}\"\n}" + "raw": "{\n\t\"alias_c\":\"Firebird\",\n\t\"salutation\":\"Ms.\",\n\t\"first_name\":\"Janice\",\n\t\"last_name\":\"Beige\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Employee\",\n\t\"birthdate\":\"1975-05-22\",\n\t\"status_description\":\"Beware: potentially volatile\",\n\t\"pr_professors_leadspr_professors_ida\":\"{{Professor_Beige}}\",\n\t\"account_name\":\"M-Men\",\n\t\"account_id\":\"{{SuperGroup_M-Men}}\",\n\t\"contact_id\":\"{{Student_Firebird}}\",\n\t\"highschool_c\":\"Superhero Academy\",\n\t\"gpa_c\": \"3.22\",\n\t\"programminglanguages_c\": [\"php\"],\n\t\"transcript_c\": \"Math: A-\\nEnglish: A\\nScience: B+\\nAgility: A+\"\n}" }, "description": "" }, @@ -1747,7 +1747,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Glamour\",\n\t\"salutation\":\"Ms.\",\n\t\"first_name\":\"Symone\",\n\t\"last_name\":\"Lighthome\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Partner\",\n\t\"birthdate\":\"1961-07-11\",\n\t\"status_description\":\"Shifty, but highly skilled.\",\n\t\"account_name\":\"Brotherhood of Deviants\",\n\t\"account_id\":\"{{SuperGroup_Brotherhood}}\",\n\t\"contact_id\":\"{{Student_Glamour}}\"\n}" + "raw": "{\n\t\"alias_c\":\"Glamour\",\n\t\"salutation\":\"Ms.\",\n\t\"first_name\":\"Symone\",\n\t\"last_name\":\"Lighthome\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Partner\",\n\t\"birthdate\":\"1961-07-11\",\n\t\"status_description\":\"Shifty, but highly skilled.\",\n\t\"account_name\":\"Brotherhood of Deviants\",\n\t\"account_id\":\"{{SuperGroup_Brotherhood}}\",\n\t\"contact_id\":\"{{Student_Glamour}}\",\n\t\"highschool_c\":\"School of Superheroes\",\n\t\"gpa_c\": \"3.47\",\n\t\"programminglanguages_c\": [\"java\",\"go\"],\n\t\"transcript_c\": \"Math: B\\nEnglish: A\\nScience: A-\\nEthics of Superpowers: B\"\n}" }, "description": "" }, @@ -1785,7 +1785,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Attracto\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Val\",\n\t\"last_name\":\"Eisenhower\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Self Generated\",\n\t\"birthdate\":\"1928-08-05\",\n\t\"status_description\":\"Shows great potential. Anger issues.\",\n\t\"account_name\":\"Brotherhood of Deviants\",\n\t\"account_id\":\"{{SuperGroup_Brotherhood}}\",\n\t\"contact_id\":\"{{Student_Attracto}}\"\n}" + "raw": "{\n\t\"alias_c\":\"Attracto\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Val\",\n\t\"last_name\":\"Eisenhower\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Self Generated\",\n\t\"birthdate\":\"1928-08-05\",\n\t\"status_description\":\"Shows great potential. Anger issues.\",\n\t\"account_name\":\"Brotherhood of Deviants\",\n\t\"account_id\":\"{{SuperGroup_Brotherhood}}\",\n\t\"contact_id\":\"{{Student_Attracto}}\",\n\t\"highschool_c\":\"School of Superheroes\",\n\t\"gpa_c\": \"2.95\",\n\t\"programminglanguages_c\": [\"java\",\"python\"],\n\t\"transcript_c\": \"Math: B\\nEnglish: B-\\nScience: B+\\nEthics of Superpowers: B\"\n}" }, "description": "" }, @@ -1823,7 +1823,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Honey Badger\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Jimmy\",\n\t\"last_name\":\"Harwit\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Cold Call\",\n\t\"birthdate\":\"1887-05-08\",\n\t\"status_description\":\"Does not play nicely with others.\",\n\t\"account_name\":\"M-Men\",\n\t\"account_id\":\"{{SuperGroup_M-Men}}\",\n\t\"contact_id\":\"{{Student_HoneyBadger}}\",\n\t\"primary_address_city\":\"Whitehorse\",\n\t\"primary_address_state\":\"YT\",\n\t\"primary_address_country\":\"Canada\"\n}" + "raw": "{\n\t\"alias_c\":\"Honey Badger\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Jimmy\",\n\t\"last_name\":\"Harwit\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Cold Call\",\n\t\"birthdate\":\"1887-05-08\",\n\t\"status_description\":\"Does not play nicely with others.\",\n\t\"account_name\":\"M-Men\",\n\t\"account_id\":\"{{SuperGroup_M-Men}}\",\n\t\"contact_id\":\"{{Student_HoneyBadger}}\",\n\t\"primary_address_city\":\"Whitehorse\",\n\t\"primary_address_state\":\"YT\",\n\t\"primary_address_country\":\"Canada\",\n\t\"highschool_c\":\"Whitehorse High School\",\n\t\"gpa_c\": \"3.10\",\n\t\"programminglanguages_c\": [\"python\",\"go\"],\n\t\"transcript_c\": \"Math: A\\nEnglish: B-\\nScience: B+\\nDon't Care: A+\"\n}" }, "description": "" }, @@ -1861,7 +1861,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Rascal\",\n\t\"salutation\":\"Ms.\",\n\t\"first_name\":\"Annette\",\n\t\"last_name\":\"Mary\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Partner\",\n\t\"birthdate\":\"1989-12-26\",\n\t\"status_description\":\"Former Brotherhood member. Trust issues.\",\n\t\"account_name\":\"M-Men\",\n\t\"account_id\":\"{{SuperGroup_M-Men}}\",\n\t\"contact_id\":\"{{Student_Rascal}}\",\n\t\"primary_address_city\":\"Caldecott\",\n\t\"primary_address_state\":\"MS\",\n\t\"primary_address_country\":\"USA\"\n}" + "raw": "{\n\t\"alias_c\":\"Rascal\",\n\t\"salutation\":\"Ms.\",\n\t\"first_name\":\"Annette\",\n\t\"last_name\":\"Mary\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Partner\",\n\t\"birthdate\":\"1989-12-26\",\n\t\"status_description\":\"Former Brotherhood member. Trust issues.\",\n\t\"account_name\":\"M-Men\",\n\t\"account_id\":\"{{SuperGroup_M-Men}}\",\n\t\"contact_id\":\"{{Student_Rascal}}\",\n\t\"primary_address_city\":\"Caldecott\",\n\t\"primary_address_state\":\"MS\",\n\t\"primary_address_country\":\"USA\",\n\t\"highschool_c\":\"Caldecott Academy\",\n\t\"gpa_c\": \"3.61\",\n\t\"programminglanguages_c\": [\"php\"],\n\t\"transcript_c\": \"Math: A-\\nEnglish: A\\nScience: A-\\nSucceeding as a Superhero: A\"\n}" }, "description": "" }, @@ -1899,7 +1899,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Shadylynx\",\n\t\"salutation\":\"Ms.\",\n\t\"first_name\":\"Cate\",\n\t\"last_name\":\"Purry\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Partner\",\n\t\"birthdate\":\"1992-01-24\",\n\t\"status_description\":\"Very apt student.\",\n\t\"account_name\":\"Young M-Men\",\n\t\"account_id\":\"{{SuperGroup_Young}}\",\n\t\"contact_id\":\"{{Student_Shadylynx}}\",\n\t\"primary_address_city\":\"Deerfield\",\n\t\"primary_address_state\":\"IL\",\n\t\"primary_address_country\":\"USA\"\n}" + "raw": "{\n\t\"alias_c\":\"Shadylynx\",\n\t\"salutation\":\"Ms.\",\n\t\"first_name\":\"Cate\",\n\t\"last_name\":\"Purry\",\n\t\"converted\":true,\n\t\"status\":\"Converted\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Partner\",\n\t\"birthdate\":\"1992-01-24\",\n\t\"status_description\":\"Very apt student.\",\n\t\"account_name\":\"Young M-Men\",\n\t\"account_id\":\"{{SuperGroup_Young}}\",\n\t\"contact_id\":\"{{Student_Shadylynx}}\",\n\t\"primary_address_city\":\"Deerfield\",\n\t\"primary_address_state\":\"IL\",\n\t\"primary_address_country\":\"USA\",\n\t\"highschool_c\":\"Deerfield School for the Gifted\",\n\t\"gpa_c\": \"4.00\",\n\t\"programminglanguages_c\": [\"php\",\"java\"],\n\t\"transcript_c\": \"Math: A+\\nEnglish: A+\\nScience: A+\\nHistory of Superheroes: A+\"\n}" }, "description": "" }, @@ -1937,7 +1937,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Deathpond\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Wayne\",\n\t\"last_name\":\"Williams\",\n\t\"converted\":false,\n\t\"status\":\"Dead\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Word of mouth\",\n\t\"birthdate\":\"1986-03-18\",\n\t\"status_description\":\"DO NOT ALLOW ANYWHERE NEAR STUDENTS.\",\n\t\"primary_address_city\":\"Clare\",\n\t\"primary_address_state\":\"SK\",\n\t\"primary_address_country\":\"Canada\"\n}" + "raw": "{\n\t\"alias_c\":\"Deathpond\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Wayne\",\n\t\"last_name\":\"Williams\",\n\t\"converted\":false,\n\t\"status\":\"Dead\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Word of mouth\",\n\t\"birthdate\":\"1986-03-18\",\n\t\"status_description\":\"DO NOT ALLOW ANYWHERE NEAR STUDENTS.\",\n\t\"primary_address_city\":\"Clare\",\n\t\"primary_address_state\":\"SK\",\n\t\"primary_address_country\":\"Canada\",\n\t\"highschool_c\":\"Clare High School\",\n\t\"gpa_c\": \"2.5\",\n\t\"programminglanguages_c\": [\"php\"],\n\t\"transcript_c\": \"Math: C\\nEnglish: B\\nScience: B+\\nEthics: C\"\n}" }, "description": "" }, @@ -1975,7 +1975,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Mr. Fabulous\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Roy\",\n\t\"last_name\":\"Rogers\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Genetically Enhanced\", \"Genius\", \"Human\"],\n\t\"birthdate\":\"1969-02-12\"\n}" + "raw": "{\n\t\"alias_c\":\"Mr. Fabulous\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Roy\",\n\t\"last_name\":\"Rogers\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Genetically Enhanced\", \"Genius\", \"Human\"],\n\t\"birthdate\":\"1969-02-12\",\n\t\"highschool_c\":\"School of Superheroes\",\n\t\"gpa_c\": \"3.80\",\n\t\"programminglanguages_c\": [\"java\",\"go\"],\n\t\"transcript_c\": \"Math: A+\\nEnglish: A\\nScience: A+\\nEthics of Superpowers: A+\"\n}" }, "description": "" }, @@ -2013,7 +2013,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Steel Man\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Tony\",\n\t\"last_name\":\"Stork\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Genius\", \"Human\"],\n\t\"lead_source\":\"Campaign\",\n\t\"birthdate\":\"1972-04-02\",\n\t\"account_name\":\"Revengers\",\n\t\"primary_address_city\":\"Long Island\",\n\t\"primary_address_state\":\"NY\",\n\t\"primary_address_country\":\"USA\"\n}" + "raw": "{\n\t\"alias_c\":\"Steel Man\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Tony\",\n\t\"last_name\":\"Stork\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Genius\", \"Human\"],\n\t\"lead_source\":\"Campaign\",\n\t\"birthdate\":\"1972-04-02\",\n\t\"account_name\":\"Revengers\",\n\t\"primary_address_city\":\"Long Island\",\n\t\"primary_address_state\":\"NY\",\n\t\"primary_address_country\":\"USA\",\n\t\"highschool_c\":\"Long Island Academy\",\n\t\"gpa_c\": \"3.62\",\n\t\"programminglanguages_c\": [\"java\",\"go\"],\n\t\"transcript_c\": \"Math: A\\nEnglish: A+\\nScience: A\\nSuperpowers in the Modern World: A+\"\n}" }, "description": "" }, @@ -2051,7 +2051,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"The Hunk\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Brian\",\n\t\"last_name\":\"Pennant\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Genetically Enhanced\", \"Genius\", \"Human\"],\n\t\"lead_source\":\"Campaign\",\n\t\"birthdate\":\"1980-11-03\",\n\t\"account_name\":\"Revengers\"\n}" + "raw": "{\n\t\"alias_c\":\"The Hunk\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Brian\",\n\t\"last_name\":\"Pennant\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Genetically Enhanced\", \"Genius\", \"Human\"],\n\t\"lead_source\":\"Campaign\",\n\t\"birthdate\":\"1980-11-03\",\n\t\"account_name\":\"Revengers\",\n\t\"highschool_c\":\"Superhero Academy\",\n\t\"gpa_c\": \"3.00\",\n\t\"programminglanguages_c\": [\"go\",\"python\"],\n\t\"transcript_c\": \"Math: B\\nEnglish: A\\nScience: B\\nAgility: A\"\n}" }, "description": "" }, @@ -2089,7 +2089,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Blonde Tarantula\",\n\t\"salutation\":\"Ms.\",\n\t\"first_name\":\"Iggy\",\n\t\"last_name\":\"Ora\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Assassin\", \"Human\"],\n\t\"lead_source\":\"Campaign\",\n\t\"birthdate\":\"1982-06-06\",\n\t\"account_name\":\"Revengers\",\n\t\"primary_address_city\":\"Volgograd\",\n\t\"primary_address_country\":\"Russia\"\n}" + "raw": "{\n\t\"alias_c\":\"Blonde Tarantula\",\n\t\"salutation\":\"Ms.\",\n\t\"first_name\":\"Iggy\",\n\t\"last_name\":\"Ora\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Assassin\", \"Human\"],\n\t\"lead_source\":\"Campaign\",\n\t\"birthdate\":\"1982-06-06\",\n\t\"account_name\":\"Revengers\",\n\t\"primary_address_city\":\"Volgograd\",\n\t\"primary_address_country\":\"Russia\",\n\t\"highschool_c\":\"Volgograd Academy\",\n\t\"gpa_c\": \"3.44\",\n\t\"programminglanguages_c\": [\"java\",\"javascript\"],\n\t\"transcript_c\": \"Math: A+\\nLiterature: A\\nScience: A-\\nHistory of Superheroes: A+\"\n}" }, "description": "" }, @@ -2127,7 +2127,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Chance\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Ronny\",\n\t\"last_name\":\"LeFlame\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Web Site\",\n\t\"birthdate\":\"1984-09-09\",\n\t\"account_name\":\"M-Men\",\n\t\"primary_address_city\":\"New Orleans\",\n\t\"primary_address_state\":\"LA\",\n\t\"primary_address_country\":\"USA\"\n}" + "raw": "{\n\t\"alias_c\":\"Chance\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Ronny\",\n\t\"last_name\":\"LeFlame\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Mutants\"],\n\t\"lead_source\":\"Web Site\",\n\t\"birthdate\":\"1984-09-09\",\n\t\"account_name\":\"M-Men\",\n\t\"primary_address_city\":\"New Orleans\",\n\t\"primary_address_state\":\"LA\",\n\t\"primary_address_country\":\"USA\",\n\t\"highschool_c\":\"New Orleans High School\",\n\t\"gpa_c\": \"3.22\",\n\t\"programminglanguages_c\": [\"python\"],\n\t\"transcript_c\": \"Math: B\\nEnglish: A\\nScience: B+\\nSuperhero Skills: A+\"\n}" }, "description": "" }, @@ -2165,7 +2165,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"alias_c\":\"Captain USA\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Jamie\",\n\t\"last_name\":\"Rahn\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Genetically Enhanced\", \"Human\"],\n\t\"lead_source\":\"Campaign\",\n\t\"birthdate\":\"1925-10-20\",\n\t\"account_name\":\"Revengers\",\n\t\"primary_address_city\":\"Bronx\",\n\t\"primary_address_state\":\"NY\",\n\t\"primary_address_country\":\"USA\"\n}" + "raw": "{\n\t\"alias_c\":\"Captain USA\",\n\t\"salutation\":\"Mr.\",\n\t\"first_name\":\"Jamie\",\n\t\"last_name\":\"Rahn\",\n\t\"converted\":false,\n\t\"status\":\"New\",\n\t\"tag\":[\"Genetically Enhanced\", \"Human\"],\n\t\"lead_source\":\"Campaign\",\n\t\"birthdate\":\"1925-10-20\",\n\t\"account_name\":\"Revengers\",\n\t\"primary_address_city\":\"Bronx\",\n\t\"primary_address_state\":\"NY\",\n\t\"primary_address_country\":\"USA\",\n\t\"highschool_c\":\"Ninja Academy\",\n\t\"gpa_c\": \"3.75\",\n\t\"programminglanguages_c\": [\"javascript\",\"java\"],\n\t\"transcript_c\": \"Math: B+\\nEnglish: A+\\nBalance: A\\nAgility: A+\\nGrip strength: B+\"\n}" }, "description": "" }, @@ -2590,6 +2590,58 @@ "response": [] } ] + }, + { + "name": "Create Campaigns", + "description": "", + "item": [ + { + "name": "Create Online Applications Campaign", + "event": [ + { + "listen": "test", + "script": { + "id": "23a0541a-2487-4e76-84db-5aca2dd77723", + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var idOfCampaign = jsonData.id;", + "", + "tests[\"Successful POST request\"] = responseCode.code === 200;", + "tests[\"id exists\"] = idOfCampaign !== null || idOfCampaign !== \"\";" + ] + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "OAuth-Token", + "value": "{{access_token}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": " {\n \"name\": \"Online Applications\",\n \"status\": \"Active\",\n \"campaign_type\": \"Web\",\n \"module\": \"Campaigns\",\n \"end_date\": \"2020-05-18\",\n \"assigned_user_name\": \"Administrator\",\n \"assigned_user_id\": \"1\",\n \"team_name_collection_0\": \"Global\"\n }" + }, + "url": { + "raw": "{{url}}{{rest_endpoint}}/Campaigns", + "host": [ + "{{url}}{{rest_endpoint}}" + ], + "path": [ + "Campaigns" + ] + } + }, + "response": [] + } + ] } ] } diff --git a/docs/AcceptanceTests.md b/docs/AcceptanceTests.md new file mode 100644 index 00000000..16bd6432 --- /dev/null +++ b/docs/AcceptanceTests.md @@ -0,0 +1,14 @@ +## Acceptance Test Plan ## + +This test plan represents high-level acceptance tests for features implemented in the Professor M's School for Gifted +Coders package. These tests are not automated and should be executed manually. + +Before executing these tests, ensure you have done the following: +1. Installed Sugar. +1. Created an Admin user. +1. Installed the Professor M Module Loadable Package. +1. [Installed the Professor M sample data using the Professor M Postman Collection](https://github.com/sugarcrm/school#use-the-sugar-rest-api-to-create-the-professor-m-sample-data). + +| Use case | Test steps | Expected Results | +| --- | --- | ---| +| [Online Applications](OnlineApplications.md) |
  1. Navigate to http://{site_url}/
    custom/online_application_form/ApplyOnline.html.
  2. Input the following information:
    **First Name:** Joe
    **Last Name:** Morwasky
    **Email Address:** joetheweatherman@example.com
    **Street Address:** 222 Lightning Lane
    **City:** Monroe
    **State:** CT
    **Zip:** 06468
    **Country:** USA
    **High School:** Monroe High
    **Grade Point Average (GPA):** 3.85
    **Programming Languages:** PHP, Java
    **Transcript:** Meteorology A+
    Math: A-
    English: B+
    Agility: A+
  3. Click **Submit**.
  4. |
    1. A "Thank you!" page is displayed.
    2. A new Applicant (Lead) record has been created with the following data:
      **Name:** Joe Morwasky
      **High School:** Monroe High
      **Grade Point Average (GPA):** 3.85000000
      **Programming Languages:** PHP, Java
      **Transcript:**
      Meteorology A+
      Math: A-
      English: B+
      Agility: A+
      **Email Address:** joetheweatherman@example.com
      **Primary Address:**
      222 Lightning Lane
      Monroe, CT 06468
      USA
    3. The new Applicant (Lead) has a link to the **Online Applications** campaign in the Campaign Log.
    4. \ No newline at end of file diff --git a/docs/OnlineApplications.md b/docs/OnlineApplications.md new file mode 100644 index 00000000..17ff6549 --- /dev/null +++ b/docs/OnlineApplications.md @@ -0,0 +1,38 @@ +## Online Applications ## + +Professor M wants to ensure he has a quality pipeline of students for his school. He has decided to allow prospective +students to apply online. + +### Implementation Technique ### + +A [Web to Lead Form](http://support.sugarcrm.com/Knowledge_Base/Campaigns_Target_Lists/Creating_a_Web-to-Lead_Form/) was +created in Sugar and then customized to become the online application for the school. + +### Implementation Details ### + +[ApplyOnline.html](../package/src/custom/online_application_form/ApplyOnline.html) is a +customized Web to Lead Form. This form is the online application that students can complete. When students submit +the form, they are redirected to +[ApplyOnlineSuccess.html](../package/src/custom/online_application_form/ApplyOnlineSuccess.html), a static html file. + +Note that these two files are stored in the +[custom/online_application_form](../package/src/custom/online_application_form) directory for simplicity of deploying +this example. You could host these two files on any server. + +When the form is submitted, a new Applicant (Lead) record is automatically created in the system. + +### Extensions ### + +| Module | Extension | Name | Description | +| --- | --- | ---| ---| +| Leads | Vardefs | `highschool_c` | Varchar that displays the applicant's high school. | +| Leads | Vardefs | `transcript_c` | Text field that displays the applicant's transcript. | +| Leads | Vardefs | `gpa_c` | Decimal field that displays the applicant's grade point average (GPA). | +| Leads | Vardefs | `programminglanguages_c` | Multienum field that displays the applicant's programming languages based on the options stored in the `languages` drop down list.| + + +### View Customizations ### +| Module | View | Description | +| --- | --- | ---| +| Leads | Record | A new panel (Application) has been added to the record view below the Business Card. The panel displays the new custom fields for the application. | + diff --git a/docs/UseCases.md b/docs/UseCases.md index 848d6fa2..ab5e4bce 100644 --- a/docs/UseCases.md +++ b/docs/UseCases.md @@ -27,3 +27,7 @@ The Professor M School uses Sugar for the following high level use cases: - [Student Health Tracking](StudentHealthTracking.md) - [Gradebook Integration](Gradebook.md) + +## Acceptance Tests ## + +Acceptance tests for the use cases can be found in [AcceptanceTests.md](AcceptanceTests.md). diff --git a/package/pack.php b/package/pack.php index 81152cd6..6c612bc4 100755 --- a/package/pack.php +++ b/package/pack.php @@ -291,6 +291,103 @@ 'ext3' => NULL, 'ext4' => NULL, ), + 'Leadshighschool_c' => + array ( + 'id' => 'Leadshighschool_c', + 'name' => 'highschool_c', + 'label' => 'LBL_HIGHSCHOOL', + 'comments' => NULL, + 'help' => NULL, + 'module' => 'Leads', + 'type' => 'varchar', + 'max_size' => '255', + 'require_option' => '0', + 'default_value' => NULL, + 'date_modified' => '2018-05-10 22:50:43', + 'deleted' => '0', + 'audited' => '1', + 'mass_update' => '0', + 'duplicate_merge' => '1', + 'reportable' => '1', + 'importable' => 'true', + 'ext1' => NULL, + 'ext2' => NULL, + 'ext3' => NULL, + 'ext4' => NULL, + ), + 'Leadstranscript_c' => + array ( + 'id' => 'Leadstranscript_c', + 'name' => 'transcript_c', + 'label' => 'LBL_TRANSCRIPT', + 'comments' => NULL, + 'help' => NULL, + 'module' => 'Leads', + 'type' => 'text', + 'max_size' => NULL, + 'require_option' => '0', + 'default_value' => NULL, + 'date_modified' => '2018-05-10 22:50:43', + 'deleted' => '0', + 'audited' => '1', + 'mass_update' => '0', + 'duplicate_merge' => '1', + 'reportable' => '1', + 'importable' => 'true', + 'ext1' => NULL, + 'ext2' => 6, + 'ext3' => 80, + 'ext4' => NULL, + ), + 'Leadsgpa_c' => + array ( + 'id' => 'Leadsgpa_c', + 'name' => 'gpa_c', + 'label' => 'LBL_GPA', + 'comments' => NULL, + 'help' => NULL, + 'module' => 'Leads', + 'type' => 'decimal', + 'max_size' => '18', + 'precision' => '3', + 'require_option' => '0', + 'default_value' => NULL, + 'date_modified' => '2018-05-10 22:50:43', + 'deleted' => '0', + 'audited' => '1', + 'mass_update' => '0', + 'duplicate_merge' => '1', + 'reportable' => '1', + 'importable' => 'true', + 'ext1' => NULL, + 'ext2' => NULL, + 'ext3' => NULL, + 'ext4' => NULL, + ), + 'Leadsprogramminglanguages_c' => + array ( + 'id' => 'Leadsprogramminglanguages_c', + 'name' => 'programminglanguages_c', + 'label' => 'LBL_PROGRAMMINGLANGUAGES', + 'comments' => NULL, + 'help' => NULL, + 'module' => 'Leads', + 'type' => 'multienum', + 'max_size' => '100', + 'require_option' => '0', + 'default_value' => NULL, + 'date_modified' => '2018-05-10 14:05:09', + 'deleted' => '0', + 'audited' => '0', + 'mass_update' => '1', + 'duplicate_merge' => '1', + 'reportable' => '1', + 'importable' => 'true', + 'ext1' => 'languages', + 'ext2' => NULL, + 'ext3' => NULL, + 'ext4' => NULL, + ), ), ); diff --git a/package/src/custom/Extension/application/Ext/EntryPointRegistry/getCampaign.php b/package/src/custom/Extension/application/Ext/EntryPointRegistry/getCampaign.php new file mode 100644 index 00000000..d255696c --- /dev/null +++ b/package/src/custom/Extension/application/Ext/EntryPointRegistry/getCampaign.php @@ -0,0 +1,6 @@ + 'custom/src/application_campaign/GetCampaignEntrypoint.php', + 'auth' => false +); diff --git a/package/src/custom/Extension/application/Ext/Language/ar_SA.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/ar_SA.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/ar_SA.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/bg_BG.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/bg_BG.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/bg_BG.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/ca_ES.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/ca_ES.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/ca_ES.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/cs_CZ.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/cs_CZ.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/cs_CZ.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/da_DK.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/da_DK.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/da_DK.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/de_DE.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/de_DE.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/de_DE.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/el_EL.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/el_EL.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/el_EL.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/en_UK.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/en_UK.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/en_UK.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/en_us.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/en_us.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/en_us.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/es_ES.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/es_ES.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/es_ES.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/es_LA.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/es_LA.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/es_LA.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/et_EE.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/et_EE.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/et_EE.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/fi_FI.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/fi_FI.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/fi_FI.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/fr_FR.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/fr_FR.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/fr_FR.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/he_IL.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/he_IL.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/he_IL.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/hr_HR.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/hr_HR.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/hr_HR.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/hu_HU.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/hu_HU.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/hu_HU.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/it_it.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/it_it.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/it_it.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/ja_JP.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/ja_JP.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/ja_JP.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/ko_KR.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/ko_KR.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/ko_KR.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/lt_LT.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/lt_LT.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/lt_LT.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/lv_LV.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/lv_LV.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/lv_LV.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/nb_NO.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/nb_NO.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/nb_NO.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/nl_NL.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/nl_NL.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/nl_NL.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/pl_PL.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/pl_PL.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/pl_PL.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/pt_BR.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/pt_BR.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/pt_BR.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/pt_PT.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/pt_PT.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/pt_PT.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/ro_RO.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/ro_RO.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/ro_RO.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/ru_RU.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/ru_RU.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/ru_RU.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/sk_SK.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/sk_SK.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/sk_SK.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/sq_AL.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/sq_AL.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/sq_AL.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/sr_RS.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/sr_RS.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/sr_RS.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/sv_SE.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/sv_SE.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/sv_SE.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/th_TH.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/th_TH.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/th_TH.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/tr_TR.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/tr_TR.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/tr_TR.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/uk_UA.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/uk_UA.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/uk_UA.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/zh_CN.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/zh_CN.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/zh_CN.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/application/Ext/Language/zh_TW.sugar_languages.leadscustomized.php b/package/src/custom/Extension/application/Ext/Language/zh_TW.sugar_languages.leadscustomized.php new file mode 100644 index 00000000..c62b144b --- /dev/null +++ b/package/src/custom/Extension/application/Ext/Language/zh_TW.sugar_languages.leadscustomized.php @@ -0,0 +1,11 @@ + 'PHP', + 'javascript' => 'JavaScript', + 'net' => '.NET', + 'java' => 'Java', + 'c' => 'C/C++', + 'go' => 'Go', + 'python' => 'Python', + 'ruby' => 'Ruby', +); \ No newline at end of file diff --git a/package/src/custom/Extension/modules/Leads/Ext/Language/en_us.ProfessorMStudioChanges.lang.php b/package/src/custom/Extension/modules/Leads/Ext/Language/en_us.ProfessorMStudioChanges.lang.php index bc9ee6dc..ebd34387 100644 --- a/package/src/custom/Extension/modules/Leads/Ext/Language/en_us.ProfessorMStudioChanges.lang.php +++ b/package/src/custom/Extension/modules/Leads/Ext/Language/en_us.ProfessorMStudioChanges.lang.php @@ -28,3 +28,8 @@ $mod_strings['LBL_LEAD_SOURCE_DESCRIPTION'] = 'Applicant Source Description:'; $mod_strings['LBL_ALIAS'] = 'Alias'; $mod_strings['LBL_DESCRIPTION'] = 'Origin Story'; +$mod_strings['LBL_PROGRAMMINGLANGUAGES'] = 'Programming Languages'; +$mod_strings['LBL_TRANSCRIPT'] = 'Transcript'; +$mod_strings['LBL_HIGHSCHOOL'] = 'High School'; +$mod_strings['LBL_GPA'] = 'Grade Point Average (GPA)'; +$mod_strings['LBL_RECORDVIEW_PANEL1'] = 'Application'; diff --git a/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_gpa_c.php b/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_gpa_c.php new file mode 100644 index 00000000..2aa06763 --- /dev/null +++ b/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_gpa_c.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_highschool_c.php b/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_highschool_c.php new file mode 100644 index 00000000..75771fc1 --- /dev/null +++ b/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_highschool_c.php @@ -0,0 +1,12 @@ + '0', + 'boost' => '1', + 'searchable' => false, +); +$dictionary['Lead']['fields']['highschool_c']['enforced']=''; +$dictionary['Lead']['fields']['highschool_c']['dependency']=''; + + ?> \ No newline at end of file diff --git a/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_programminglanguages_c.php b/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_programminglanguages_c.php new file mode 100644 index 00000000..b135e510 --- /dev/null +++ b/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_programminglanguages_c.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_transcript_c.php b/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_transcript_c.php new file mode 100644 index 00000000..dd31d909 --- /dev/null +++ b/package/src/custom/Extension/modules/Leads/Ext/Vardefs/sugarfield_transcript_c.php @@ -0,0 +1,12 @@ + '0', + 'boost' => '1', + 'searchable' => false, +); +$dictionary['Lead']['fields']['transcript_c']['enforced']=''; +$dictionary['Lead']['fields']['transcript_c']['dependency']=''; + + ?> \ No newline at end of file diff --git a/package/src/custom/modules/Leads/clients/base/views/record/record.php b/package/src/custom/modules/Leads/clients/base/views/record/record.php index ae1cdfed..cb628042 100644 --- a/package/src/custom/modules/Leads/clients/base/views/record/record.php +++ b/package/src/custom/modules/Leads/clients/base/views/record/record.php @@ -259,7 +259,41 @@ ), ), ), - 2 => + 2 => + array ( + 'newTab' => false, + 'panelDefault' => 'expanded', + 'name' => 'LBL_RECORDVIEW_PANEL1', + 'label' => 'LBL_RECORDVIEW_PANEL1', + 'columns' => 2, + 'labelsOnTop' => 1, + 'placeholders' => 1, + 'fields' => + array ( + 0 => + array ( + 'name' => 'highschool_c', + 'label' => 'LBL_HIGHSCHOOL', + ), + 1 => + array ( + 'name' => 'gpa_c', + 'label' => 'LBL_GPA', + ), + 2 => + array ( + 'name' => 'programminglanguages_c', + 'label' => 'LBL_PROGRAMMINGLANGUAGES', + ), + 3 => + array ( + 'name' => 'transcript_c', + 'studio' => 'visible', + 'label' => 'LBL_TRANSCRIPT', + ), + ), + ), + 3 => array ( 'name' => 'panel_hidden', 'label' => 'LBL_RECORD_SHOWMORE', diff --git a/package/src/custom/online_application_form/ApplyOnline.html b/package/src/custom/online_application_form/ApplyOnline.html new file mode 100644 index 00000000..886d52df --- /dev/null +++ b/package/src/custom/online_application_form/ApplyOnline.html @@ -0,0 +1,327 @@ + + + + +

      + +

      +
      + + +
      + Professor M's School for Gifted Coders Logo +

      Application for Admission

      +
      + +
      +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      +
      + +
      +
      +
      +
      + +
      +
      +
      +
      + +
      +
      + +
      +
      +
      +
      + +
      +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      +
      + +
      +
      +
      + +
      + +
      + +
      + + + + + + + +
      +

      + +

      diff --git a/package/src/custom/online_application_form/ApplyOnlineSuccess.html b/package/src/custom/online_application_form/ApplyOnlineSuccess.html new file mode 100644 index 00000000..d0fcd71e --- /dev/null +++ b/package/src/custom/online_application_form/ApplyOnlineSuccess.html @@ -0,0 +1,18 @@ + + + + + + + +
      + Professor M's School for Gifted Coders Logo +

      Thank you!

      +

      We appreciate your interest in attending our school! We'll get back to you soon.

      +
      + + diff --git a/package/src/custom/src/application_campaign/ApplicationCampaignManager.php b/package/src/custom/src/application_campaign/ApplicationCampaignManager.php new file mode 100644 index 00000000..b0f1e1c4 --- /dev/null +++ b/package/src/custom/src/application_campaign/ApplicationCampaignManager.php @@ -0,0 +1,61 @@ +getSugarQuery(); + $q->select(array('id', 'name')); + $q->from($this->getNewCampaignBean(), array('team_security' => false)); + $q->where()->equals('name', 'Online Applications'); + $q->orderBy('date_modified', 'desc'); + $q->limit(1); + + $results = $q->execute(); + + if(sizeof($results) != 1 || !$results[0]['id']){ + throw new \Exception("Unable to find ID for the Campaign named Online Applications"); + } + return $results[0]['id']; + } + + /** + * Get Sugar Query. + * + * @return \SugarQuery + */ + protected function getSugarQuery() + { + return new \SugarQuery(); + } + + /** + * Get a new Campaign Bean + * + * @return null|\SugarBean + */ + protected function getNewCampaignBean() + { + return \BeanFactory::newBean('Campaigns'); + } + +} diff --git a/package/src/custom/src/application_campaign/GetCampaignEntrypoint.php b/package/src/custom/src/application_campaign/GetCampaignEntrypoint.php new file mode 100644 index 00000000..121f1d62 --- /dev/null +++ b/package/src/custom/src/application_campaign/GetCampaignEntrypoint.php @@ -0,0 +1,9 @@ +getOnlineApplicationsCampaignId(); diff --git a/package/src/custom/tests/School/unit-php/src/application_campaign/ApplicationCampaignManagerTest.php b/package/src/custom/tests/School/unit-php/src/application_campaign/ApplicationCampaignManagerTest.php new file mode 100644 index 00000000..af6e5ce3 --- /dev/null +++ b/package/src/custom/tests/School/unit-php/src/application_campaign/ApplicationCampaignManagerTest.php @@ -0,0 +1,70 @@ +where = $this->createMock('SugarQuery_Builder_Where'); + $this->sugarQuery = $this->createMock('SugarQuery'); + $this->sugarQuery->method('where')->willReturn($this->where); + + $this->campaignBean = $this->createMock('SugarBean'); + + $this->acm = TestMockHelper::createPartialMock($this, + '\\Sugarcrm\\Sugarcrm\\custom\\application_campaign\\ApplicationCampaignManager', + ['getSugarQuery', 'getNewCampaignBean']); + $this->acm->method('getSugarQuery')->willReturn($this->sugarQuery); + $this->acm->method('getNewCampaignBean')->willReturn($this->campaignBean); + } + + /** + * @covers ::getOnlineApplicationsCampaignId + */ + public function testGetOnlineApplicationsCampaignIdWithResults() + { + $this->campaignId = "57f5a666-70c3-11e8-bbb3-34363bc46900"; + $this->queryResults = array( + 0 => array( + "id" => $this->campaignId, + "name" => "Online Applications", + "campaigns__date_modified" => "2018-06-15 17:41:32" + ) + ); + $this->sugarQuery->method('execute')->willReturn($this->queryResults); + + $this->sugarQuery->expects($this->once())->method('execute'); + $this->assertEquals($this->campaignId, $this->acm->getOnlineApplicationsCampaignId()); + } + + /** + * @covers ::getOnlineApplicationsCampaignId + */ + public function testGetOnlineApplicationsCampaignIdWithNoResults() + { + $this->queryResults = array(); + $this->sugarQuery->method('execute')->willReturn($this->queryResults); + + $this->sugarQuery->expects($this->once())->method('execute'); + $this->expectException(Exception::class, "Unable to find ID for the Campaign named Online Applications"); + $this->acm->getOnlineApplicationsCampaignId(); + } + +}