org.fsf.memberdashboard.git
3 years agotypo master
Ruben Rodriguez [Thu, 28 May 2020 19:39:44 +0000 (15:39 -0400)]
typo

3 years agoAdded jitsi benefit
Ruben Rodriguez [Thu, 28 May 2020 19:36:52 +0000 (15:36 -0400)]
Added jitsi benefit

3 years agoAdded referral info text
Ruben Rodriguez [Thu, 30 Apr 2020 17:16:44 +0000 (13:16 -0400)]
Added referral info text

3 years agoAdded referral link
Ruben Rodriguez [Thu, 30 Apr 2020 16:47:25 +0000 (12:47 -0400)]
Added referral link

4 years agofix last commit
Ian Kelling [Thu, 30 Jan 2020 23:30:00 +0000 (18:30 -0500)]
fix last commit

4 years agodont allow pending members to have aliases
Ian Kelling [Thu, 30 Jan 2020 23:28:35 +0000 (18:28 -0500)]
dont allow pending members to have aliases

5 years agoupdated link to member forum in benefits page
Andrew Engelbrecht [Fri, 14 Dec 2018 21:08:41 +0000 (16:08 -0500)]
updated link to member forum in benefits page

6 years agoadded section about additional member benefits
Andrew Engelbrecht [Thu, 19 Apr 2018 16:47:45 +0000 (12:47 -0400)]
added section about additional member benefits

this section links to https://www.fsf.org/associate/benefits

 Please enter the commit message for your changes. Lines starting

6 years agoadd note about mail loop
Ian Kelling [Thu, 11 Jan 2018 19:40:09 +0000 (14:40 -0500)]
add note about mail loop

7 years agotest for git hook deployment to agpl.fsf.org
Andrew Engelbrecht [Wed, 25 Jan 2017 22:02:52 +0000 (17:02 -0500)]
test for git hook deployment to agpl.fsf.org

7 years agotest change ; checking on file read access
Andrew Engelbrecht [Wed, 25 Jan 2017 21:06:00 +0000 (16:06 -0500)]
test change ; checking on file read access

to ensure that the generated files can be read from agpl.fsf.org.

7 years agoanother test change
Andrew Engelbrecht [Tue, 10 Jan 2017 21:38:30 +0000 (16:38 -0500)]
another test change

7 years agoanother test change
Andrew Engelbrecht [Tue, 10 Jan 2017 21:36:14 +0000 (16:36 -0500)]
another test change

7 years agotest change for testing deployment to agpl.fsf.org
Andrew Engelbrecht [Tue, 10 Jan 2017 21:35:26 +0000 (16:35 -0500)]
test change for testing deployment to agpl.fsf.org

7 years agoexpand the scope of the $contactId variable
Andrew Engelbrecht [Tue, 10 Jan 2017 20:58:55 +0000 (15:58 -0500)]
expand the scope of the $contactId variable

this variable is used elsewhere in the outer function, so it should not
be limited to the lambda function.

7 years agospecify used variable in php closure
Andrew Engelbrecht [Fri, 6 Jan 2017 19:59:23 +0000 (14:59 -0500)]
specify used variable in php closure

this resolves an issue with a recent change that introduced an anonymous
function with a closure. the used variable must be specified in the
funciton definition.

7 years agoUpdated race cond handling for member badges gen
Andrew Engelbrecht [Tue, 3 Jan 2017 21:48:09 +0000 (16:48 -0500)]
Updated race cond handling for member badges gen

This change removes the universal 0.5 second sleep prior to querying the
database about the membership since date.

Instead, the process now goes right ahead with the query. It sleeps for
2 seconds if the first query did not succeed, then it re-attempts the
query a second time and continues on as before.

This should cost less time on average while catching more race
conditions with the longer conditional sleep.

7 years agoadded .gitignore
Andrew Engelbrecht [Fri, 23 Dec 2016 15:52:46 +0000 (10:52 -0500)]
added .gitignore

7 years agoadded usleep to prevent race condition
Andrew Engelbrecht [Fri, 23 Dec 2016 15:51:46 +0000 (10:51 -0500)]
added usleep to prevent race condition

this is relatively safe to do, even if 1000 memberships are created all
at once, upon occasion.

7 years agoupdated order of perks in member benefits page
Andrew Engelbrecht [Thu, 22 Dec 2016 21:38:31 +0000 (16:38 -0500)]
updated order of perks in member benefits page

zak requested the re-ordering of benefits on the member benefits page.

7 years agoAdded change for R#T1151046 plus previous modifications
Ruben Rodriguez [Thu, 29 Sep 2016 17:27:51 +0000 (13:27 -0400)]
Added change for R#T1151046 plus previous modifications

9 years agoAdd message to info page to guide users around LibreJS bug.
David Thompson [Tue, 10 Mar 2015 13:40:52 +0000 (09:40 -0400)]
Add message to info page to guide users around LibreJS bug.

There's a bug in LibreJS that breaks the XHR request to fetch a profile
in JSON form.  Civi returns HTML instead for some reason, which breaks
the JavaScript code.

* templates/CRM/Memberdashboard/Page/Info.tpl: Add paragraph directing
  users to server-side rendered profile page.

9 years agodashboard: contribute: Add instructions for canceling.
David Thompson [Wed, 18 Feb 2015 14:02:56 +0000 (09:02 -0500)]
dashboard: contribute: Add instructions for canceling.

* templates/CRM/Memberdashboard/Page/Element/CiviContribute.tpl: Add
  instructions for how to cancel a recurring contribution.

9 years agodashboard: contribute: Remove extraneous ':'.
David Thompson [Wed, 18 Feb 2015 13:53:44 +0000 (08:53 -0500)]
dashboard: contribute: Remove extraneous ':'.

* templates/CRM/Memberdashboard/Page/Element/CiviContribute.tpl: Remove
  ':' in recurring contributions table header.

9 years agomembership: Make renewal link more readable.
David Thompson [Mon, 9 Feb 2015 14:37:52 +0000 (09:37 -0500)]
membership: Make renewal link more readable.

* templates/CRM/Memberdashboard/Page/Element/CiviMember.tpl: Shorten
  "Renew Now" to "Renew" and remove the square brackets surrounding it.

9 years agoRedirect to member dashboard after updating CC info.
David Thompson [Thu, 5 Feb 2015 14:25:19 +0000 (09:25 -0500)]
Redirect to member dashboard after updating CC info.

* memberdashboard.php (memberdashboard_civicrm_postProcess): New function.

9 years agoFix build form hook.
David Thompson [Thu, 15 Jan 2015 17:19:50 +0000 (12:19 -0500)]
Fix build form hook.

* memberdashboard.php (memberdashboard_civicrm_buildForm): s/concactId/contactId/

9 years agodashboard: Add some non-breaking spaces to template.
David Thompson [Tue, 6 Jan 2015 17:59:02 +0000 (12:59 -0500)]
dashboard: Add some non-breaking spaces to template.

* templates/CRM/Memberdashboard/Page/Element/CiviContribute.tpl: Add
  non-breaking spaces where necessary.

9 years agodashboard: Add checksum for editing recurring contributions.
David Thompson [Tue, 6 Jan 2015 17:54:35 +0000 (12:54 -0500)]
dashboard: Add checksum for editing recurring contributions.

* CRM/Memberdashboard/Page/MemberDashboard.php
  (CRM_Memberdashboard_Page_MemberDashboard) [makeChecksum]: New method.
  [run]: Assign 'contributionChecksum' Smarty variable.
* templates/CRM/Memberdashboard/Page/Element/CiviContribute.tpl: Render
  checksum in edit links for recurring contributions.

9 years agodashboard: Better recurring contribution rendering.
David Thompson [Tue, 6 Jan 2015 17:52:43 +0000 (12:52 -0500)]
dashboard: Better recurring contribution rendering.

* templates/CRM/Memberdashboard/Page/Element/CiviContribute.tpl: Do not
  render "for X installments" if the recurring contribution is
  indefinite.

9 years agodashboard: Improve rendering of installments for recurring contributions.
David Thompson [Tue, 6 Jan 2015 17:27:55 +0000 (12:27 -0500)]
dashboard: Improve rendering of installments for recurring contributions.

* templates/CRM/Memberdashboard/Page/Element/CiviContribute.tpl: Render
  an infinity symbol for contributions with unlimited installments.

9 years agodashboard: Display link to edit recurring contribution payment info.
David Thompson [Tue, 6 Jan 2015 17:26:55 +0000 (12:26 -0500)]
dashboard: Display link to edit recurring contribution payment info.

* templates/CRM/Memberdashboard/Page/Element/CiviContribute.tpl: Render
  edit link for recurring contributions.

9 years agodashboard: Show personal campaign pages.
David Thompson [Thu, 11 Dec 2014 16:04:33 +0000 (11:04 -0500)]
dashboard: Show personal campaign pages.

* CRM/Memberdashboard/Page/MemberDashboard.php
  (CRM_Memberdashboard_Page_MemberDashboard) [campaignPages]: New method.
  [run]: Assign 'campaignPages' variable for use from smarty.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Render PCP table.

9 years agoDo not look contact in buildForm hook when there is no logged in user.
David Thompson [Thu, 4 Dec 2014 16:05:34 +0000 (11:05 -0500)]
Do not look contact in buildForm hook when there is no logged in user.

* memberdashboard.php (memberdashboard_civicrm_buildForm): Null check
  against user id.

9 years agoChange state field name in buildForm hook. v0.1
David Thompson [Wed, 3 Dec 2014 17:26:20 +0000 (12:26 -0500)]
Change state field name in buildForm hook.

* memberdashboard.php (memberdashboard_civicrm_buildForm): Change field
  name to what it is on live.  Yup, this is a hack.

9 years agoAdd buildForm hook to fix state select box when editing info profile.
David Thompson [Wed, 3 Dec 2014 17:17:49 +0000 (12:17 -0500)]
Add buildForm hook to fix state select box when editing info profile.

* memberdashboard.php (memberdashboard_civicrm_buildFrom): New function.

9 years agojs: Fix LibreJS compliance issue.
David Thompson [Tue, 25 Nov 2014 19:49:13 +0000 (14:49 -0500)]
js: Fix LibreJS compliance issue.

* assets/js/member-info.js: Use a license comment block that satisfies
  the AGPLv3 regexp in LibreJS.

9 years agoFix query string for member button API call.
David Thompson [Tue, 25 Nov 2014 14:38:57 +0000 (09:38 -0500)]
Fix query string for member button API call.

* memberdashboard.php (memberdashboard_civicrm_post): Manually construct
  query string instead of using 'http_build_query'.

9 years agojs: underscore: Add LibreJS compatibility.
David Thompson [Fri, 21 Nov 2014 17:23:23 +0000 (12:23 -0500)]
js: underscore: Add LibreJS compatibility.

* assets/js/underscore.js: Add LibreJS licensing data.

9 years agoRemove more HTML that wasn't supposed to be committed.
David Thompson [Mon, 17 Nov 2014 21:32:00 +0000 (16:32 -0500)]
Remove more HTML that wasn't supposed to be committed.

9 years agoRemove some HTML that wasn't supposed to be committed.
David Thompson [Mon, 17 Nov 2014 21:31:07 +0000 (16:31 -0500)]
Remove some HTML that wasn't supposed to be committed.

9 years agoWrap hook in a try/catch block.
David Thompson [Mon, 17 Nov 2014 21:16:18 +0000 (16:16 -0500)]
Wrap hook in a try/catch block.

* memberdashboard.php (memberdashboard_civicrm_post): Wrap DB and API
  calls in a try/catch.

9 years agobenefits: Display member button.
David Thompson [Mon, 17 Nov 2014 21:12:55 +0000 (16:12 -0500)]
benefits: Display member button.

* CRM/Admin/Form/Setting/MemberDashboard.php
  (CRM_Admin_Form_Setting_MemberDashboard) [buildQuickForm]: Add input
  for static button URL.
  [postProcess]: Save static button URL.
* CRM/Memberdashboard/Page/Benefits.php
  (CRM_Memberdashboard_Page_Benefits) [run]: Add 'contact' and
  'buttonUrl' smarty variables.
* settings/MemberDashboard.setting.php
  (memberdashboard_button_static_url): New setting.
* templates/CRM/Admin/Form/Setting/MemberDashboard.tpl: Render static
  button URL form field.
* templates/CRM/Memberdashboard/Page/Benefits.tpl: Render member button.

9 years agoDon't call member button API if settings aren't configured.
David Thompson [Mon, 17 Nov 2014 19:36:53 +0000 (14:36 -0500)]
Don't call member button API if settings aren't configured.

* memberdashboard.php (memberdashboard_civicrm_post): Make sure API url,
  user, and password are not empty before making RPC.

9 years agoRevert William's ill-fated style improvements.
David Thompson [Mon, 17 Nov 2014 19:33:58 +0000 (14:33 -0500)]
Revert William's ill-fated style improvements.

9 years agoAdd civicrm_post hook to regenerate member buttons.
David Thompson [Mon, 17 Nov 2014 19:26:14 +0000 (14:26 -0500)]
Add civicrm_post hook to regenerate member buttons.

* CRM/Admin/Form/Setting/MemberDashboard.php
  (CRM_Admin_Form_Setting_MemberDashboard) [buildQuickForm]: Add inputs
  for API settings.
  [postProcess]: Update API settings.
* memberdashboard.php (memberdashboard_civicrm_post): New function.
* settings/MemberDashboard.setting.php: Add url, user, and password settings.
* templates/CRM/Admin/Form/Setting/MemberDashboard.tpl: Render new
  setting form inputs.

9 years agoinfo: Fix link to profile.
David Thompson [Mon, 17 Nov 2014 15:11:47 +0000 (10:11 -0500)]
info: Fix link to profile.

* templates/CRM/Memberdashboard/Page/Info.tpl: Remove '/drupal'.

9 years agoInclude stylesheet as resource
William Theaker [Fri, 14 Nov 2014 21:03:56 +0000 (16:03 -0500)]
Include stylesheet as resource

9 years agoAdded MemberDashboard landing page boxes
William Theaker [Fri, 14 Nov 2014 21:00:37 +0000 (16:00 -0500)]
Added MemberDashboard landing page boxes

9 years agoAdded stylesheet
William Theaker [Fri, 14 Nov 2014 20:34:12 +0000 (15:34 -0500)]
Added stylesheet

9 years agoinfo: Add LibreJS metadata to JS.
David Thompson [Fri, 14 Nov 2014 20:13:18 +0000 (15:13 -0500)]
info: Add LibreJS metadata to JS.

* assets/js/member-info.js: Add @licstart/@licend metadata.

9 years agoinfo: Fix state select box not updating when country is changed.
David Thompson [Fri, 14 Nov 2014 20:10:36 +0000 (15:10 -0500)]
info: Fix state select box not updating when country is changed.

* assets/js/member-info.js: Watch country select box for changes and
  fetch relevant states via AJAX.

9 years agoadmin: Show all profiles in select box instead of just unreserved ones.
David Thompson [Fri, 14 Nov 2014 17:19:20 +0000 (12:19 -0500)]
admin: Show all profiles in select box instead of just unreserved ones.

* CRM/Admin/Form/Setting/MemberDashboard.php
  (CRM_Admin_Form_Setting_MemberDashboard) [fetchProfiles]: Remove
  'WHERE' clause in query.

9 years agoMark dashboard pages as public.
David Thompson [Tue, 11 Nov 2014 23:21:29 +0000 (18:21 -0500)]
Mark dashboard pages as public.

* xml/Menu/memberdashboard.xml: Set is_public to true for all non-admin
  dashboard pages.

9 years agoSSL changes
William Theaker [Mon, 10 Nov 2014 17:21:07 +0000 (12:21 -0500)]
SSL changes

9 years agobenefits: Add uniqueness validation for email aliases.
David Thompson [Fri, 7 Nov 2014 15:48:37 +0000 (10:48 -0500)]
benefits: Add uniqueness validation for email aliases.

* CRM/Memberdashboard/BAO/EmailAlias.php (CRM_Memberdashboard_BAO_EmailAlias)
  [findByLocalpart]: New method.
* CRM/Memberdashboard/Page/Benefits.php (CRM_Memberdashboard_Page_Benefits)
  [add, edit]: Check local part of alias for uniqueness.

9 years agodashboard: Remove placeholder member button markup.
David Thompson [Thu, 6 Nov 2014 21:51:14 +0000 (16:51 -0500)]
dashboard: Remove placeholder member button markup.

* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Remove
  placeholder markup.

9 years agobenefits: Don't allow non-members to access benefits page.
David Thompson [Thu, 6 Nov 2014 21:22:34 +0000 (16:22 -0500)]
benefits: Don't allow non-members to access benefits page.

* CRM/Memberdashboard/Page/Benefits.php (CRM_Memberdashboard_Page_Benefits)
  [hasValidMembership]: New method.
  [postProcess]: Restrict POST actions to members only.
  [run]: Pass 'hasValidMembership' variable to smarty template.
* templates/CRM/Memberdashboard/Page/Benefits.tpl: Display an access
  denied page if the user is a non-member.

9 years agobenefits: Validate local part of email alias.
David Thompson [Thu, 6 Nov 2014 21:20:58 +0000 (16:20 -0500)]
benefits: Validate local part of email alias.

* CRM/Memberdashboard/Page/Benefits.php (CRM_Memberdashboard_Page_Benefits)
  [add]: Validate local part.
  [edit]: Likewise.

9 years agobenefits: Add email alias CRUD.
David Thompson [Thu, 6 Nov 2014 19:05:53 +0000 (14:05 -0500)]
benefits: Add email alias CRUD.

* CRM/Memberdashboard/BAO/EmailAlias.php: New file.
* CRM/Memberdashboard/Page/Benefits.php (CRM_Memberdashboard_Page_Benefits)
  [loadEmailAliases]: Delegate to BAO.
  [postProcess, add, edit]: New methods.
  [padEmailAliases]: Delete.
  [run]: Handle POST requests.
* templates/CRM/Memberdashboard/Page/Benefits.tpl: Update edit/add forms.

9 years agoinfo: Improve appearance of rendered profile even more.
David Thompson [Thu, 6 Nov 2014 00:11:40 +0000 (19:11 -0500)]
info: Improve appearance of rendered profile even more.

* assets/js/member-info.js: Wrap labels and inputs in divs with the
  necessary classes applied for good style.

9 years agoinfo: Improve appearance of rendered profile.
David Thompson [Wed, 5 Nov 2014 23:56:10 +0000 (18:56 -0500)]
info: Improve appearance of rendered profile.

* assets/js/member-info.js: Add 'form-item' class to form field divs.

9 years agoinfo: Fix JavaScript to support older versions of CiviCRM and jQuery.
David Thompson [Wed, 5 Nov 2014 23:48:59 +0000 (18:48 -0500)]
info: Fix JavaScript to support older versions of CiviCRM and jQuery.

* assets/js/member-info.js: Fall back to using 'jQuery' instead of
  'CRM.$'.  Parse profile JSON if it hasn't already been parsed.
* templates/CRM/Memberdashboard/Page/Info.tpl

9 years agoRemove temporary testing links.
David Thompson [Wed, 5 Nov 2014 23:08:57 +0000 (18:08 -0500)]
Remove temporary testing links.

* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Remove links
  to other dashboard pages.

9 years agoinfo: Fix the profile link displayed in noscript tag.
David Thompson [Wed, 5 Nov 2014 23:06:22 +0000 (18:06 -0500)]
info: Fix the profile link displayed in noscript tag.

* CRM/Memberdashboard/Page/Info.php (CRM_Memberdashboard_Page_Info)
  [run]: Assign 'profileId' for smarty template.
* templates/CRM/Memberdashboard/Page/Info.tpl: Fix profile URL.

9 years agoinfo: Fix issue where jquery.notify.js is sometimes not loaded and
David Thompson [Wed, 5 Nov 2014 22:44:48 +0000 (17:44 -0500)]
info: Fix issue where jquery.notify.js is sometimes not loaded and
breaks the page.

* CRM/Memberdashboard/Page/Info.php (CRM_Memberdashboard_Page_Info)
  [run]: Add jquery.notify.min.js resource.

9 years agojs: Use better method for using civi's jquery.
David Thompson [Wed, 5 Nov 2014 22:44:05 +0000 (17:44 -0500)]
js: Use better method for using civi's jquery.

* assets/js/member-info.js: Use 'CRM.$'.

9 years agoFix permissions.
David Thompson [Wed, 5 Nov 2014 22:43:15 +0000 (17:43 -0500)]
Fix permissions.

* xml/Menu/memberdashboard.xml: Use the 'profile edit' permission
  instead.

9 years agobenefits: Display email aliases in a table.
David Thompson [Tue, 4 Nov 2014 17:53:05 +0000 (12:53 -0500)]
benefits: Display email aliases in a table.

* CRM/Memberdashboard/Page/Benefits.php (CRM_Memberdashboard_Page_Benefits)
  [loadEmailAliases]: New method.
  [padEmailAliases]: New method.
* memberdashboard.php (MEMBERDASHBOARD_MAX_EMAIL_ALIASES): New constant.
* templates/CRM/Memberdashboard/Page/Benefits.tpl: Render email aliases.

9 years agoAdd member_email_alias table.
David Thompson [Tue, 4 Nov 2014 15:22:55 +0000 (10:22 -0500)]
Add member_email_alias table.

* CRM/Memberdashboard/Upgrader.php: New file.
* CRM/Memberdashboard/Upgrader/Base.php: New file.
* sql/install.sql: New file.

9 years agobenefits: Simplify Drupal user access.
David Thompson [Tue, 4 Nov 2014 14:28:24 +0000 (09:28 -0500)]
benefits: Simplify Drupal user access.

* CRM/Memberdashboard/Page/Benefits.php (CRM_Memberdashboard_Page_Benefits)
  [loadUser]: Delete.
  [run]: Use $user global variable.

9 years agobenefits: Display proper XMPP username and elaborate on other benefits.
David Thompson [Fri, 31 Oct 2014 17:02:43 +0000 (13:02 -0400)]
benefits: Display proper XMPP username and elaborate on other benefits.

9 years agoAdd benefits page.
David Thompson [Thu, 30 Oct 2014 20:59:18 +0000 (16:59 -0400)]
Add benefits page.

* CRM/Memberdashboard/Page/Benefits.php: New file.
* templates/CRM/Memberdashboard/Page/Benefits.tpl: New file.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Add link to
  benefits page.
* xml/Menu/memberdashboard.xml: Add route.

9 years agocommunications: Copy and tweak the groups template from civi core.
David Thompson [Fri, 24 Oct 2014 20:59:43 +0000 (16:59 -0400)]
communications: Copy and tweak the groups template from civi core.

* templates/CRM/Memberdashboard/Page/Communications.tpl: Render custom
  groups template.
* templates/CRM/Memberdashboard/Page/Element/Group.tpl: New file.

9 years agocommunication: Add custom group subscription form.
David Thompson [Fri, 24 Oct 2014 20:44:19 +0000 (16:44 -0400)]
communication: Add custom group subscription form.

* CRM/Memberdashboard/Page/Communications.php
  (CRM_Memberdashboard_Page_Communications) [getGroups]: New method.
  [postProcess]: Add contact to given group.
  [run]: Add groups for rendering.
* templates/CRM/Memberdashboard/Page/Communications.tpl: Render group
  select box.

9 years agoFix docstring.
David Thompson [Thu, 23 Oct 2014 20:57:37 +0000 (16:57 -0400)]
Fix docstring.

* CRM/Memberdashboard/Page/ComponentHelper.php
  (CRM_Memberdashboard_Page_ComponentHelper) [buildDashboardElements]:
  Correct outdated docstring.

9 years agocommunications: Apply civi CSS to form elements.
David Thompson [Thu, 23 Oct 2014 20:56:07 +0000 (16:56 -0400)]
communications: Apply civi CSS to form elements.

* templates/CRM/Memberdashboard/Page/Communications.tpl: Remove form
  tag.  Use 'crm-select2' class for email format dropdown.  Use
  'crm-form-submit' class for 'Save' button.

9 years agoExtract base page class.
David Thompson [Thu, 23 Oct 2014 16:10:51 +0000 (12:10 -0400)]
Extract base page class.

* CRM/Memberdashboard/Page.php: New file.
* CRM/Memberdashboard/Page/Communications.php
  (CRM_Memberdashboard_Page_Communications): Inherit from base page.
  [contactId, loadContact, isPOST]: Remove methods.
  [run]: Use pre-loaded contact object.
* CRM/Memberdashboard/Page/MemberDashboard.php
  (CRM_Memberdashboard_Page_MemberDashboard): Inherit from base page.
  [$contact]: Remove variable.
  [__construct, loadContact]: Remove methods.

9 years agocommunications: Add email preferences.
David Thompson [Thu, 23 Oct 2014 15:55:07 +0000 (11:55 -0400)]
communications: Add email preferences.

* CRM/Memberdashboard/Page/Communications.php
  (CRM_Memberdashboard_Page_Communications) [contactId, loadContact,
  isPOST, postProcess): New methods.
  [run]: Disable group editing for now.  Add 'contact' and 'mailFormats'
  template variables.
* templates/CRM/Memberdashboard/Page/Communications.tpl: Add email
  preferences form.

9 years agoinfo: Add loading spinner.
David Thompson [Wed, 22 Oct 2014 16:23:37 +0000 (12:23 -0400)]
info: Add loading spinner.

* assets/js/member-info.js: Remove loading spinner when form is loaded.
* templates/CRM/Memberdashboard/Page/Info.tpl: Add loading spinner.

9 years agosettings: Refactor method.
David Thompson [Wed, 22 Oct 2014 14:30:41 +0000 (10:30 -0400)]
settings: Refactor method.

* CRM/Admin/Form/Setting/MemberDashboard.php
  (CRM_Admin_Form_Setting_MemberDashboard) [fetchProfiles]: New method.
  [buildQuickForm]: Use it.

9 years agoAdd a settings page.
David Thompson [Tue, 21 Oct 2014 14:04:05 +0000 (10:04 -0400)]
Add a settings page.

* CRM/Admin/Form/Setting/MemberDashboard.php: New file.
* templates/CRM/Admin/Form/Setting/MemberDashboard.tpl: New file.
* xml/Menu/memberdashboard.xml: Add menu entry.

9 years agojs: Use the correct profile ID on info page.
David Thompson [Mon, 20 Oct 2014 18:05:28 +0000 (14:05 -0400)]
js: Use the correct profile ID on info page.

* assets/js/member-info.js: s/profile_id/profileId/

9 years agoDefine constant for settings group name.
David Thompson [Mon, 20 Oct 2014 17:17:53 +0000 (13:17 -0400)]
Define constant for settings group name.

* memberdashboard.php (MEMBERDASHBOARD_SETTINGS_GROUP): New constant.
* CRM/Memberdashboard/Page/Info.php (CRM_Memberdashboard_Page_Info.run):
  Use it.

9 years agoAdd member info profile setting.
David Thompson [Mon, 20 Oct 2014 16:03:57 +0000 (12:03 -0400)]
Add member info profile setting.

* settings/MemberDashboard.setting.php: New file.
* CRM/Memberdashboard/Page/Info.php (CRM_Memberdashboard_Page_Info.run):
  Fetch member info profile and pass it to the client.
* assets/js/member-info.js: Load the configured profile instead of a
  hardcoded one.
* README.org (Configuration): New section.

9 years agoLoad user info profile via AJAX call.
David Thompson [Thu, 9 Oct 2014 14:42:19 +0000 (10:42 -0400)]
Load user info profile via AJAX call.

Present a link to the user when JavaScript is disabled.

9 years agoUse API to fetch contact.
David Thompson [Thu, 2 Oct 2014 14:51:05 +0000 (10:51 -0400)]
Use API to fetch contact.

* CRM/Memberdashboard/Page/MemberDashboard.php (loadContact): Use API.
  (run): '$contact' is now an array.

9 years agoAdd info page boilerplate.
David Thompson [Thu, 2 Oct 2014 14:32:53 +0000 (10:32 -0400)]
Add info page boilerplate.

* CRM/Memberdashboard/Page/Info.php: New file.
* templates/CRM/Memberdashboard/Page/Info.tpl: New file.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Add link.
* xml/Menu/memberdashboard.xml (<menu>): Add item for info page.

9 years agoAdd communications page.
David Thompson [Wed, 1 Oct 2014 20:54:21 +0000 (16:54 -0400)]
Add communications page.

* CRM/Memberdashboard/Page/Communications.php: New file.
* templates/CRM/Memberdashboard/Page/Communications.tpl: New file.
* templates/CRM/Memberdashboard/Page/Element/CiviEvent.tpl: New file.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Link to new page.
* xml/Menu/memberdashboard.xml (<menu>): Add item for new page.

9 years agoFactor out a helper class from the member dashboard.
David Thompson [Wed, 1 Oct 2014 20:48:34 +0000 (16:48 -0400)]
Factor out a helper class from the member dashboard.

* CRM/Memberdashboard/Page/ComponentHelper.php: New file.
* CRM/Memberdashboard/Page/MemberDashboard.php ($components): Delete
  variable.
  (loadComponents, buildDashboardElements): Delete methods.
  (__construct): Don't load dashboard components;
  (run): Use helper class.

9 years agoAdd placeholder markup for referral code section.
David Thompson [Wed, 1 Oct 2014 16:04:01 +0000 (12:04 -0400)]
Add placeholder markup for referral code section.

* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Add it.

9 years agoFix docstring.
David Thompson [Wed, 1 Oct 2014 15:50:42 +0000 (11:50 -0400)]
Fix docstring.

* CRM/Memberdashboard/Page/MemberDashboard.php (loadComponents): Fix
  '@return' in docstring.

9 years agoFactor out the side-effects of building the bashboard.
David Thompson [Wed, 1 Oct 2014 15:41:43 +0000 (11:41 -0400)]
Factor out the side-effects of building the bashboard.

* CRM/Memberdashboard/Page/MemberDashboard.php ($components): New
  variable.
  (__construct): Load components.
  (loadComponents): New method.
  (buildDashboard): Renamed.
  (buildDashboardElements): Remove side-effects.
  (run): Call 'run' method on dashboard components.

9 years agoRemove 'Receipt sent' column from contributions table.
David Thompson [Wed, 1 Oct 2014 15:26:17 +0000 (11:26 -0400)]
Remove 'Receipt sent' column from contributions table.

* templates/CRM/Memberdashboard/Page/Element/CiviContribute.tpl: Remove column.

9 years agoCopy dashboard element templates from CiviCRM core.
David Thompson [Wed, 1 Oct 2014 15:22:02 +0000 (11:22 -0400)]
Copy dashboard element templates from CiviCRM core.

These will be modified to our needs later.

* CRM/Memberdashboard/Page/MemberDashboard.php (buildDashboard): Change
  template path.
* templates/CRM/Memberdashboard/Page/Element/CiviContribute.tpl: New file.
* templates/CRM/Memberdashboard/Page/Element/CiviMember.tpl: New file.

9 years agoRemove debugging code.
David Thompson [Wed, 1 Oct 2014 15:20:44 +0000 (11:20 -0400)]
Remove debugging code.

* templates/CRM/Memberdashboard/Page/DashboardElement.tpl: Remove it.

9 years agoAdd license headers to files.
David Thompson [Wed, 1 Oct 2014 15:06:42 +0000 (11:06 -0400)]
Add license headers to files.

* README.md (Copyright): Tweak licensing info.
* CRM/Memberdashboard/Page/MemberDashboard.php: Add license header.
* templates/CRM/Memberdashboard/Page/DashboardElement.tpl: Ditto.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Ditto.

9 years agoFix page title.
David Thompson [Wed, 1 Oct 2014 14:21:48 +0000 (10:21 -0400)]
Fix page title.

* CRM/Memberdashboard/Page/MemberDashboard.php (run): Set page title
  after calling the superclass method.

9 years agoDisplay CiviMember and CiviContribute dashboard elements.
David Thompson [Wed, 1 Oct 2014 14:14:31 +0000 (10:14 -0400)]
Display CiviMember and CiviContribute dashboard elements.

* CRM/Memberdashboard/Page/MemberDashboard.php (__construct): Assign the
  result of 'loadContact'.
  (loadContact): Return the contact rather than assigning it to a
  variable.
  (buildDashboard): Return an array with CiviMember and CiviContribute
  dashboard elements.
  (pageTitle): New method.
  (run): Use 'pageTitle' method.  Assign dashboard elements for rendering.
* templates/CRM/Memberdashboard/Page/DashboardElement.tpl: New file.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Render
  CiviMember and CiviContribute elements.

9 years agoRender the CiviMember component on the dashboard.
David Thompson [Tue, 30 Sep 2014 20:04:07 +0000 (16:04 -0400)]
Render the CiviMember component on the dashboard.

* CRM/Memberdashboard/Page/MemberDashboard.php (buildDashboard): New
  method.
* templates/CRM/Memberdashboard/Page/MemberDashboard.tpl: Render component.