Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Family External Information Verify #1570

Merged
merged 60 commits into from
Jan 9, 2017
Merged

Family External Information Verify #1570

merged 60 commits into from
Jan 9, 2017

Conversation

DawoudIO
Copy link
Contributor

@DawoudIO DawoudIO commented Dec 13, 2016

Closes #1571

  • New token table
  • New external site for loading family via token
  • Display Family info & People in the family.
  • Fixed Default Head Role Ids
  • Fixed Needing to pass sRootPath to external Sites
  • Using System URL for includes
  • Fixed FamilyService Photo
  • Fixed Email Family Report
  • Move Confirm Reports to Member Dashboard
  • Revamped Verify Button
  • Added Verify Email

image

image

image

@crossan007
Copy link
Contributor

How do i test this?

@DawoudIO
Copy link
Contributor Author

I don't have the token create working yet so let me do that 1st

@DawoudIO
Copy link
Contributor Author

Ok with the changes from today here is how to test it...

  1. Create a family
  2. Post to http://192.168.33.10/api/families/verify/2 <-- id = family ID
  3. Copy the generated token from the tokens table in the db
  4. http://192.168.33.10/external/verify/58555d75f03d5 <-- token id

Copy link
Contributor Author

@DawoudIO DawoudIO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all done please review for finial merge

@@ -110,6 +110,8 @@
?>
<br/>
<a href="FamilyList.php" class="btn btn-app"><i class="fa fa-users"></i><?= gettext("All Families") ?></a>
<a href="Reports/ConfirmReport.php" class="btn btn-app"><i class="fa fa-file-pdf-o"></i><?= gettext("Download Families Letters") ?></a>
<a href="Reports/ConfirmReportEmail.php" class="btn btn-app"><i class="fa fa-envelope-open"></i><?= gettext("Email Families Letters") ?></a>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1581 <-- to track Confirm Emails

// Set the page title and include HTML header
$sPageTitle = "ChurchCRM - Family Registration";
require(__DIR__ . "/../../../Include/HeaderNotLoggedIn.php");
require(SystemURLs::getDocumentRoot(). "/Include/HeaderNotLoggedIn.php");
?>

<form action="<?= $sRootPath ?>/external/register/done" method="post">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these break as we move stuff around the file system.

$sPageTitle = gettext("Family Verification");
$sRootPath = SystemURLs::getRootPath();

require(SystemURLs::getDocumentRoot(). "/Include/HeaderNotLoggedIn.php");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not rendering window.CRM.root correctly:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is that wrong based on your settings it is going to be "" so that is is expected

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah.. you're correct. I think I was expecting to see a full URL there, but we're not doing that anywhere else.. False assumption on my part...

<i class="fa fa-fw fa-map-marker" title="<?= gettext("Home Address")?>"></i><?= $family->getAddress() ?><br/>
<i class="fa fa-fw fa-phone" title="<?= gettext("Home Phone")?>"> </i><?= $family->getHomePhone() ?><br/>
<i class="fa fa-fw fa-envelope" title="<?= gettext("Family Email")?>"></i><?= $family->getEmail() ?><br/>
<i class="fa fa-fw fa-heart" title="<?= gettext("Wedding Date")?>"></i><?= $family->getWeddingDate() ?><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is throwing a php/500 error:
image

image

<i class="fa fa-fw fa-phone" title="<?= gettext("Home Phone")?>"> </i><?= $family->getHomePhone() ?><br/>
<i class="fa fa-fw fa-envelope" title="<?= gettext("Family Email")?>"></i><?= $family->getEmail() ?><br/>
<i class="fa fa-fw fa-heart" title="<?= gettext("Wedding Date")?>"></i><?= $family->getWeddingDate() ?><br/>
<i class="fa fa-fw fa-newspaper-o" title="<?= gettext("Send Newsletter")?>"></i><?= $family->getWeddingDate() ?><br/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy / paste error?

Copy link
Contributor Author

@DawoudIO DawoudIO Dec 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, fixed

@@ -141,7 +141,7 @@ INSERT INTO `config_cfg` (`cfg_id`, `cfg_name`, `cfg_value`, `cfg_type`, `cfg_de
(25, 'sSendType', 'smtp', 'choice', 'smtp', 'The method for sending email. Either "smtp" or "sendmail"', 'General', NULL, '{"Choices":["smtp","SendMail"]}'),
(26, 'sToEmailAddress', '', 'text', '', 'Default account for receiving a copy of all emails', 'General', NULL, NULL),
(27, 'sSMTPHost', '', 'text', '', 'SMTP Server Address (mail.server.com:25)', 'General', NULL, NULL),
(28, 'sSMTPAuth', '1', 'boolean', '1', 'Does your SMTP server require auththentication (username/password)?', 'General', NULL, NULL),
(28, 'sSMTPAuth', '0', 'boolean', '0', 'Does your SMTP server require auththentication (username/password)?', 'General', NULL, NULL),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

`type` ENUM('verifyFamily', 'verifyPerson') NOT NULL,
`reference_id` INT(9) NOT NULL,
`valid_until_date` datetime NULL,
`remainingUses` INT(2) NULL,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1



$("#onlineVerifyBtn").click(function () {
$.post(window.CRM.root + '/external/verify/' + token,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again - window.CRM.root is not initializing correctly

@crossan007
Copy link
Contributor

@DawoudIO still not quite working for me. Also there are conflicts to resolve.

@crossan007
Copy link
Contributor

This is personal opinion: starting a second verification should expire any existing verification tokens.

@crossan007
Copy link
Contributor

I temporarily removed the "wedding date," and the page loads (mostly) as expected.

The group listings at the bottom render strangely:
image

@crossan007
Copy link
Contributor

Also - the checkbox at the top to "verify" should have a text label
image

@DawoudIO
Copy link
Contributor Author

image

@DawoudIO
Copy link
Contributor Author

now it deletes all old tokens when creating a new one..
I need to review how the system works to see how a person can have 2 roles for the same group...

@DawoudIO
Copy link
Contributor Author

DawoudIO commented Jan 1, 2017

@crossan007

  • was the issue the wedding date due to data
  • how do you have a group where the person is in 2 roles...

@DawoudIO
Copy link
Contributor Author

DawoudIO commented Jan 8, 2017

Is this ok to merge now

@DawoudIO DawoudIO dismissed crossan007’s stale review January 9, 2017 06:35

let us test in the RC

@DawoudIO DawoudIO merged commit 50a6680 into develop Jan 9, 2017
@DawoudIO DawoudIO deleted the 2.5.0-external-verify branch January 9, 2017 06:36
@DawoudIO DawoudIO removed the In Review label Jan 9, 2017
DawoudIO added a commit that referenced this pull request Jan 9, 2017
* starting 2.5.0

* added upgrade.json hint

* New Wercker with PHP/Composer/Node

* reformat script

* v3

* back to simple build.

* break down into smaller scripts

* composer version echo

* Some gettext more

Some gettext more

* Changed PHP tag

Changed PHP tag

* Fix #1552 (#1559)

Fix #1552

* Delete wercker.yml

* Moving to a ChurchCRM Box that has all the system level changes

* Moved checkAllowedURL to SystemURLs

- Checking Once at LocalConfig Load
- Tested setting BlockURL to true and redirect

* move box to https

* start mailcatcher with vagrant (#1580)

* moved to bootstrap.sh

* moved ruby / gem install here

* gen files should not be checked in

* removed auto gen files

* added grunt sass to gen new files...

* part of the box setup now

* removed dbl imported code via new churchcrm.css / scss

* Apply fixes from StyleCI (#1610)

* Apply fixes from StyleCI (#1611)

* Style ci psr2 (#1615)

* added master file

* fixed echo issue

* Apply fixes from StyleCI (#1614)

* Update README.md

* Family External Information Verify (#1570)

* 1st commit for verify code

working views
- enter data
- view family

* add get people by Role

* fixed get photo

* using SystemURLs::getDocumentRoot()

* added getPeopleSorted

* sRootPath = SystemURLs::getRootPath()

* no longer passing sRootPath

* people are displayed in order

* added Tokens table

* removed invalid head Classification

* added missing SystemURLs use

* fixed ORM debug string

* verify by token is working

* added valid token check

* Renamed the class token not tokens

* final tokens table sql

* check to make sure we have the family in the db before rendering

* fixed renaming

* added more helper methdos and new isValid Logic

* added verify api to create the token for now

* php cleanup

* added getId

* moved FamilyVerify to API call

* Moved family verify to API call

* moved verifyDownloadPDF to button click and remove Email PDF

* there is no role 7

* Send Email with Verification Token

* Moved Confirm PDF email to Email Classes

* Moved ConfirmReport to Member Dashbaord

No need to hide it

* removed unsued buttons

* created BaseFamilyVerification

* added default index to getURL

* MVP no self request of the info

* moved JS to new JS file

* passing token to page

* new flooting buttons for verify/update/remove info

* now consume a use if a token has a max count

* Update Token Table

- renamed useCount to setRemainingUses
- updated verify to verifyFamily
- added verifyPerson

* renamed emails var to toAddresses

* updated route to /families/{id}/family

* default auth on smtp is off

* fixed naming issue

* Single verify button

* added gettext where missing

* added 404 page

* check group size

* select verification

* adding note when user submits info

* submit data and handle errors

* fixed getSendNewsletter

* fixed SMTP

* delete old token for the fmaily

* format cleanup

* Updated Confirm button with text also

* Apply fixes from StyleCI (#1619)

* develop mergeadded ruby

* fixed apt-get

* sudo apt-get install ruby-full

* sudo gem install sass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants