-
Notifications
You must be signed in to change notification settings - Fork 461
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
Conversation
working views - enter data - view family
How do i test this? |
I don't have the token create working yet so let me do that 1st |
Ok with the changes from today here is how to test it...
|
There was a problem hiding this 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> |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<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/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy / paste error?
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
@DawoudIO still not quite working for me. Also there are conflicts to resolve. |
This is personal opinion: starting a second verification should expire any existing verification tokens. |
now it deletes all old tokens when creating a new one.. |
|
Is this ok to merge now |
* 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
Closes #1571