Skip to content

Commit

Permalink
Dev 2 mater 2 11 17 (#1887)
Browse files Browse the repository at this point in the history
* use bootbox for group membership remove confirmation

* use bootbox for deposits and API Errors

* more modals converted

* underp merge

* Apply fixes from StyleCI

* underp merge

* udpate develop to 2.6.0

* underp upgrade.json

* update to latest versions

* Move config definitions out of DB into code  (#1817)

* Proof of concept. Probably still has bugs

* fix order and value setting

* more cleanup and upgrade script

* closes #1670

* Apply fixes from StyleCI

* fix sql style

* gettext for config descriptions

* more gettext

* fix annoying second refresh settings bug

* Apply fixes from StyleCI

* better null checking, and cleanup old code

* Remove special handling of country and timezone settings.  They are simple "choice" settings.

* Apply fixes from StyleCI

* move another country

* Fix issue with choices containing a space

* closes #1834 and #1831 (#1848)

* replaced $sRootPath with SystemURLs::getRootPath() (#1840)

* replaced $sRootPath with SystemURLs::getRootPath()

* Apply fixes from StyleCI (#1841)

* fixed if check

* format cleanup and global cleanup

* Apply fixes from StyleCI (#1847)

* :(

* using SystemURLs::getRootPath()

* more sRoothPath

* SystemURLs::getRootPath() cleanup

* fixed imports

* root path

* closes #1597 (#1851)

* closes #1597

* Apply fixes from StyleCI

* Address George Comments

* 2.6.0 Small fixes (#1859)

* closes #1726 gettext ending in period

* moving AdminLTE to the end

* fixed dispaly Software Registration Country

* removed unused headers opt

* enable self registration in the demo sql

* renamed grunt compress:demp-date to compress:demo

* moved ShowAge.js to footer.php

* bootstrap-datepicker.js is loaded in the footer.php

* pace.min.js cleanup

* moved IssueReporter.js to footer

* moved in skin JS files for common location

* renamed BuildConfig.json to BuildConfig.json.example and added BuildConfig.json to .gitignore

* cp BuildConfig.json.example BuildConfig.json  for build systems

* 2.6.0 master dev (#1884)

* using fam_datedeactivated fix-#1833 (#1835)

*  fix-#1833

Activate/Deactivate Families

* StyleCI fixes

StyleCI fixes

* Using fam_datedeactivated fix-#1833

Update to FamilyView to handle the Activate/Deactivate Butoon and form.
Update to CalendarService to filter out the deactivated families
Update to DashboardService to filter out the deactivated
families/members
Update to MembersDashboard to filter out the deactivated
families/members
Update to Geoipage to filter out the deactivated families/members and
to use responsive form and better table.
Update SundayschoolService to filter out deactivated families.
update MapUsingGoogle  to filter deactivated families from groupid -1
(all fmilies)
Updates to Family Route to create api functions. (not used)

* Updates based on comments on pull/1835

* Dashboard service
getFamilyCount() and getPersonCount() uses Propel query now

*FamilyView.php
uses deactivate() and activate() functions

*churchcrm.scss
added bscallout styles

* Moving the inherited info  alert box

* moving the inherited info alert box from top to the left pane near the
actual text.

* Changes based on Pull comments.

* changed the API Call to
$this->post('/{familyId:[0-9]+}/activate/{status}
* Changed to use API/AJAX call using bootbox
* Removed bscallout scss

* updates based on pull comments

*  Changed JSON econcode to $response->withJson(['success'=> true]);
*  added check to see if the status changed before updating
datedeactivated.
*  also added a note to show the action deactivated/activated on the
timeline.

* StyleCI fixes

StyleCI fixes

* StyleCI fixes

StyleCI fixes

* styleCI changes

styleCI changes

* fixing popupMessage

* Deactivate doc #1874 (#1878)

* Add documentation for Family Deactivate/Activate feature

* Added  Section "How do I deactivate a Family? "
* Added  Section "How do I Activate a Deactivated Family?"

* Update API docs

Update API docs for Families Route to include
/api/families/:familyId/activate/:status

* Fix #1869 (#1870)

* Fix #1869

Needs add paper roles "Unknown", "Head of Household", "Spouse", "Child"
and "Other" to POEditor.com because they are hardcoded in
DashboardService.php

* Update DashboardService.php

* Apply fixes from StyleCI (#1883)

* QueryList QueryView ui fixes (#1747)

* QueryView ui fixes

form, table, query info fixes #1411

* QueryList.php ui fixes

#1411

* coding style fixes

* StyleCI fixes

* StyleCI fixes
  • Loading branch information
DawoudIO authored Feb 11, 2017
1 parent 49ff7f9 commit f34aec4
Show file tree
Hide file tree
Showing 64 changed files with 1,302 additions and 1,262 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ vendor
composer.lock
node_modules
npm-debug.log*
BuildConfig.json

# Uploaded Images
src/Images/Family/thumbnails
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ before_install:
- sudo gem install sass
- chmod +x ./travis-ci/*.sh
- chmod +x ./scripts/*.sh
- cp BuildConfig.json.example BuildConfig.json

# prepare travis ci for the build process
install:
Expand All @@ -51,4 +52,4 @@ deploy:
script: npm run demosite
on:
all_branches: true
condition: "$TRAVIS_BRANCH == 'master' || $TRAVIS_BRANCH = 'develop'"
condition: "$TRAVIS_BRANCH == 'master' || $TRAVIS_BRANCH = 'develop'"
File renamed without changes.
9 changes: 8 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ module.exports = function (grunt) {
flatten: true,
src: ['node_modules/moment/min/*'],
dest: 'src/skin/moment/'
},
{
expand: true,
filter: 'isFile',
flatten: true,
src: ['node_modules/bootbox/bootbox.min.js'],
dest: 'src/skin/bootbox/'
}
]
}
Expand Down Expand Up @@ -265,7 +272,7 @@ module.exports = function (grunt) {
}
]
},
'demo-data': {
'demo': {
options: {
archive: 'target/Demo-ChurchCRM-<%= package.version %>.tar.gz',
mode: "tar",
Expand Down
2 changes: 1 addition & 1 deletion demo/ChurchCRM-Database.sql

Large diffs are not rendered by default.

15 changes: 1 addition & 14 deletions locale/extract-db-locale-terms.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
$stringFiles = [];

$db = new PDO('mysql:host=localhost;dbname='.$db_name.';charset=utf8mb4', $db_username, $db_password);
$query = 'select DISTINCT cfg_tooltip as term, "" as translation, "config_cfg" as cntx from config_cfg
union all
select DISTINCT ucfg_tooltip as term, "" as translation, "userconfig_ucfg" as cntx from userconfig_ucfg
$query = 'select DISTINCT ucfg_tooltip as term, "" as translation, "userconfig_ucfg" as cntx from userconfig_ucfg
union all
select DISTINCT qry_Name as term, "" as translation, "query_qry" as cntx from query_qry
union all
Expand Down Expand Up @@ -40,17 +38,6 @@
file_put_contents($stringFile, "\r\n?>", FILE_APPEND);
}

$stringFile = $stringsDir.'/settings-choices.php';
file_put_contents($stringFile, "<?php\r\n", FILE_APPEND);
$query = 'select cfg_data as choices, "" as translation, "config_cfg" as cntx from config_cfg
WHERE cfg_type = "choice";';
foreach ($db->query($query) as $row) {
foreach (json_decode($row['choices'])->Choices as $choice) {
file_put_contents($stringFile, 'gettext("'.addslashes($choice)."\");\r\n", FILE_APPEND);
}
}
file_put_contents($stringFile, "\r\n?>", FILE_APPEND);

$stringFile = $stringsDir.'/settings-countries.php';
require '../src/ChurchCRM/data/Countries.php';
file_put_contents($stringFile, "<?php\r\n", FILE_APPEND);
Expand Down
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ChurchCRM",
"version": "2.5.2",
"version": "2.6.0",
"description": "Free Church CRM Software",
"repository": {
"type": "git",
Expand All @@ -18,19 +18,20 @@
},
"homepage": "http://www.churchcrm.io",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-curl": "~2.2.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-compress": "^1.0.3",
"grunt-contrib-sass": "^1.0.0",
"grunt-contrib-rename": "^0.0.3",
"grunt": "1.0.1",
"grunt-curl": "2.2.0",
"grunt-contrib-concat": "1.0.1",
"grunt-contrib-clean": "1.0.0",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-compress": "1.4.1",
"grunt-contrib-sass": "1.0.0",
"grunt-contrib-rename": "0.0.3",
"node-sha1": "1.0.1",
"grunt-poeditor-ab": "^0.1.9"
"grunt-poeditor-ab": "0.1.9"
},
"dependencies": {
"admin-lte": "2.3.7",
"bootbox": "^4.4.0",
"ionicons": "2.0.1",
"font-awesome": "4.7.0",
"fullcalendar": "3.0.1"
Expand Down
8 changes: 0 additions & 8 deletions propel/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,6 @@
<column name="cfg_id" phpName="Id" type="INTEGER" primaryKey="true" required="true" defaultValue="0"/>
<column name="cfg_name" phpName="Name" type="VARCHAR" size="50" required="true" defaultValue=""/>
<column name="cfg_value" phpName="Value" type="LONGVARCHAR"/>
<column name="cfg_type" phpName="Type" type="CHAR" sqlType="enum('text','number','date','boolean','textarea')"
required="true" defaultValue="text"/>
<column name="cfg_default" phpName="Default" type="LONGVARCHAR" required="true"/>
<column name="cfg_tooltip" phpName="Tooltip" type="LONGVARCHAR" required="true"/>
<column name="cfg_section" phpName="Section" type="VARCHAR" size="50" required="true" defaultValue=""/>
<column name="cfg_category" phpName="Category" type="VARCHAR" size="20"/>
<column name="cfg_order" phpName="Order" type="INTEGER"/>
<column name="cfg_data" phpName="Data" type="LONGVARCHAR"/>
<index name="cfg_id">
<index-column name="cfg_id"/>
</index>
Expand Down
4 changes: 3 additions & 1 deletion src/CartToFamily.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
require 'Include/Config.php';
require 'Include/Functions.php';

use ChurchCRM\dto\SystemURLs;

// Security: User must have add records permission
if (!$_SESSION['bAddRecords']) {
Redirect('Menu.php');
Expand Down Expand Up @@ -164,7 +166,7 @@

echo '<tr class="'.$sRowClass.'">';
echo '<td align="center">'.$count++.'</td>';
echo "<td><img src='".$sRootPath.'/api/persons/'.$per_ID."/photo' class='direct-chat-img'> &nbsp <a href=\"PersonView.php?PersonID=".$per_ID.'">'.FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 1).'</a></td>';
echo "<td><img src='".SystemURLs::getRootPath().'/api/persons/'.$per_ID."/photo' class='direct-chat-img'> &nbsp <a href=\"PersonView.php?PersonID=".$per_ID.'">'.FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 1).'</a></td>';

echo '<td align="center">';
if ($per_fam_ID == 0) {
Expand Down
96 changes: 52 additions & 44 deletions src/CartView.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
require 'Include/Functions.php';
require 'Include/LabelFunctions.php';

use ChurchCRM\dto\SystemURLs;

use ChurchCRM\dto\SystemConfig;

if (isset($_POST['rmEmail'])) {
Expand All @@ -46,7 +48,8 @@
if (!array_key_exists('Message', $_GET)) {
?>
<p class="text-center callout callout-warning"><?= gettext('You have no items in your cart.') ?> </p>
<?php
<?php

} else {
switch ($_GET['Message']) {
case 'aMessage': ?>
Expand Down Expand Up @@ -91,38 +94,42 @@
<input type="submit" class="btn" name="gotolabels"
value="<?= gettext('Go To Labels') ?>">
</form>
<?php
<?php

} ?>

<!-- BEGIN CART FUNCTIONS -->


<?php
<?php
if (count($_SESSION['aPeopleCart']) > 0) {
?>
?>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">Cart Functions</h3>
</div>
<div class="box-body">
<a href="CartView.php?Action=EmptyCart" class="btn btn-app"><i class="fa fa-trash"></i><?= gettext('Empty Cart') ?></a>
<?php if ($_SESSION['bManageGroups']) {
?>
?>
<a href="CartToGroup.php" class="btn btn-app"><i class="fa fa-object-ungroup"></i><?= gettext('Empty Cart to Group') ?></a>
<?php
} ?>
<?php

} ?>
<?php if ($_SESSION['bAddRecords']) {
?>
?>
<a href="CartToFamily.php" class="btn btn-app"><i class="fa fa-users"></i><?= gettext('Empty Cart to Family') ?></a>
<?php
} ?>
<?php

} ?>
<a href="CartToEvent.php" class="btn btn-app"><i class="fa fa-ticket"></i><?= gettext('Empty Cart to Event') ?></a>

<?php if ($bExportCSV) {
?>
?>
<a href="CSVExport.php?Source=cart" class="btn btn-app"><i class="fa fa-file-excel-o"></i><?= gettext('CSV Export') ?></a>
<?php
} ?>
<?php

} ?>
<a href="MapUsingGoogle.php?GroupID=0" class="btn btn-app"><i class="fa fa-map-marker"></i><?= gettext('Map Cart') ?></a>
<a href="Reports/NameTags.php?labeltype=74536&labelfont=times&labelfontsize=36" class="btn btn-app"><i class="fa fa-file-pdf-o"></i><?= gettext('Name Tags') ?></a>
<?php
Expand Down Expand Up @@ -211,7 +218,8 @@ function codename()
<!-- /.box-body -->
</div>
<!-- /.box -->
<?php
<?php

} ?>
<!-- Default box -->
<div class="box">
Expand All @@ -224,36 +232,36 @@ function codename()
<?php
LabelGroupSelect('groupbymode');

echo ' <tr><td>'.gettext('Bulk Mail Presort').'</td>';
echo ' <td>';
echo ' <input name="bulkmailpresort" type="checkbox" onclick="codename()"';
echo ' id="BulkMailPresort" value="1" ';
if (array_key_exists('buildmailpresort', $_COOKIE) && $_COOKIE['bulkmailpresort']) {
echo 'checked';
}
echo ' ><br></td></tr>';

echo ' <tr><td>'.gettext('Quiet Presort').'</td>';
echo ' <td>';
echo ' <input ';
if (array_key_exists('buildmailpresort', $_COOKIE) && !$_COOKIE['bulkmailpresort']) {
echo 'disabled ';
} // This would be better with $_SESSION variable
echo ' <tr><td>'.gettext('Bulk Mail Presort').'</td>';
echo ' <td>';
echo ' <input name="bulkmailpresort" type="checkbox" onclick="codename()"';
echo ' id="BulkMailPresort" value="1" ';
if (array_key_exists('buildmailpresort', $_COOKIE) && $_COOKIE['bulkmailpresort']) {
echo 'checked';
}
echo ' ><br></td></tr>';

echo ' <tr><td>'.gettext('Quiet Presort').'</td>';
echo ' <td>';
echo ' <input ';
if (array_key_exists('buildmailpresort', $_COOKIE) && !$_COOKIE['bulkmailpresort']) {
echo 'disabled ';
} // This would be better with $_SESSION variable
// instead of cookie ... (save $_SESSION in MySQL)
echo 'name="bulkmailquiet" type="checkbox" onclick="codename()"';
echo ' id="QuietBulkMail" value="1" ';
if (array_key_exists('bulkmailquiet', $_COOKIE) && $_COOKIE['bulkmailquiet'] && array_key_exists('buildmailpresort', $_COOKIE) && $_COOKIE['bulkmailpresort']) {
echo 'checked';
}
echo ' ><br></td></tr>';
echo ' id="QuietBulkMail" value="1" ';
if (array_key_exists('bulkmailquiet', $_COOKIE) && $_COOKIE['bulkmailquiet'] && array_key_exists('buildmailpresort', $_COOKIE) && $_COOKIE['bulkmailpresort']) {
echo 'checked';
}
echo ' ><br></td></tr>';

ToParentsOfCheckBox('toparents');
LabelSelect('labeltype');
FontSelect('labelfont');
FontSizeSelect('labelfontsize');
StartRowStartColumn();
IgnoreIncompleteAddresses();
LabelFileType(); ?>
ToParentsOfCheckBox('toparents');
LabelSelect('labeltype');
FontSelect('labelfont');
FontSizeSelect('labelfontsize');
StartRowStartColumn();
IgnoreIncompleteAddresses();
LabelFileType(); ?>

<tr>
<td></td>
Expand All @@ -267,14 +275,14 @@ function codename()

<?php

} ?>
} ?>

<!-- END CART FUNCTIONS -->

<!-- BEGIN CART LISTING -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title"><?= gettext('Your cart contains').' '.$iNumPersons.' '.gettext('persons from').' '.$iNumFamilies.' '.gettext('families.') ?></h3>
<h3 class="box-title"><?= gettext('Your cart contains').' '.$iNumPersons.' '.gettext('persons from').' '.$iNumFamilies.' '.gettext('families') ?>.</h3>
</div>
<div class="box-body">
<table class="table table-hover">
Expand Down Expand Up @@ -329,7 +337,7 @@ function codename()
}

echo '<tr class="'.$sRowClass.'">';
echo '<td><img src="'.$sRootPath.'/api/persons/'.$per_ID.'/photo" class="direct-chat-img"> &nbsp <a href="PersonView.php?PersonID='.$per_ID.'">'.FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 1).'</a></td>';
echo '<td><img src="'.SystemURLs::getRootPath().'/api/persons/'.$per_ID.'/photo" class="direct-chat-img"> &nbsp <a href="PersonView.php?PersonID='.$per_ID.'">'.FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 1).'</a></td>';

echo '<td align="center">'.$sValidAddy.'</td>';
echo '<td align="center">'.$sValidEmail.'</td>';
Expand Down
2 changes: 1 addition & 1 deletion src/ChurchCRM/Reports/PDF_Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function Footer()
if ($bDirUseTitlePage) {
$iPageNumber--;
}
$this->Cell(0, 10, gettext('Page').' '.$iPageNumber.' '.date(SystemConfig::getValue("sDateFormatShort").' g:i a', time()), 0, 0, 'C'); // in 2.6.0, create a new config for time formatting also
$this->Cell(0, 10, gettext('Page').' '.$iPageNumber.' '.date(SystemConfig::getValue("sDateTimeFormat"), time()), 0, 0, 'C'); // in 2.6.0, create a new config for time formatting also
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/ChurchCRM/Service/SystemService.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public function restoreDatabaseFromBackup($file)
FileSystemUtils::recursiveRemoveDirectory($restoreResult->backupRoot);
$restoreResult->UpgradeStatus = $this->upgradeDatabaseVersion();
SQLUtils::sqlImport(SystemURLs::getDocumentRoot() . '/mysql/upgrade/rebuild_nav_menus.sql', $connection);
SQLUtils::sqlImport(SystemURLs::getDocumentRoot() . '/mysql/upgrade/update_config.sql', $connection);
//When restoring a database, do NOT let the database continue to create remote backups.
//This can be very troublesome for users in a testing environment.
SystemConfig::setValue('sEnableExternalBackupTarget', '0');
Expand Down Expand Up @@ -320,7 +319,6 @@ public function upgradeDatabaseVersion()
}
// always rebuild the menu
SQLUtils::sqlImport(SystemURLs::getDocumentRoot() . '/mysql/upgrade/rebuild_nav_menus.sql', $connection);
SQLUtils::sqlImport(SystemURLs::getDocumentRoot() . '/mysql/upgrade/update_config.sql', $connection);

return 'success';
}
Expand Down
Loading

1 comment on commit f34aec4

@apmuthu
Copy link

Choose a reason for hiding this comment

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

In files:
src/skin/js/FindDepositSlip.js - Line 26
src/skin/js/GroupView.js - Line 240

      "url": window.CRM.root + "/skin/locale/dataTables/" + window.CRM.locale + ".json"

should be

      "url": window.CRM.root + "/skin/locale/datatables/" + window.CRM.locale + ".json"

The difference is that dataTables should be datatables

Please sign in to comment.