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

Create Sunday School Class Group #966

Merged
merged 18 commits into from
Oct 4, 2016
Merged

Create Sunday School Class Group #966

merged 18 commits into from
Oct 4, 2016

Conversation

DawoudIO
Copy link
Contributor

@DawoudIO DawoudIO commented Sep 5, 2016

image

image

@DawoudIO DawoudIO added this to the 2.2.0 milestone Sep 5, 2016
<script type="application/javascript">
$(document).ready(function () {

$("#addNewCalssBtn").click(function (e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Class is spelled wrong.

@DawoudIO
Copy link
Contributor Author

DawoudIO commented Oct 2, 2016

@crossan007 this is ready

</div>
<div class="box-body">
<?php if ($_SESSION['bManageGroups']) { ?>
<a href="SelectList.php?mode=person" class="btn btn-app" href="#" data-toggle="modal" data-target="#add-class"><i class="fa fa-plus-square"></i><?= gettext("Add New Class") ?></a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Methinks you didn't mean to have this as an HREF href="SelectList.php?mode=person"

@crossan007
Copy link
Contributor

@DawoudIO If you're happy with my changes to this, then go ahead and merge it.

}).done(function (data) { //yippie, we got something good back from the server
ssClass = JSON.parse(data);
window.location.href = window.CRM.root + "/sundayschool/SundaySchoolClassView.php?groupId="+ ssClass["Id"];
window.location.href = window.CRM.root + "/sundayschool/SundaySchoolClassView.php?groupId="+ data.Id;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

that never worked for me...

{
$group->makeSundaySchool();
}
$group->setName($groupSettings->groupName);
$group->save();
echo $group->toJSON();
Copy link
Contributor Author

@DawoudIO DawoudIO Oct 4, 2016

Choose a reason for hiding this comment

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

What is the diff between echo vs $group->toJSON() // which I don't see in our auto complete
return $response->withJson($group->exportTo("JSON"));

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure. I've used the echo ->toJSON() everywhere up to this point, and it seems to work

@crossan007 crossan007 merged commit 8a0ade0 into develop Oct 4, 2016
@crossan007 crossan007 deleted the SundaySchool-Create branch October 4, 2016 01:21
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.

2 participants