-
Notifications
You must be signed in to change notification settings - Fork 443
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
Conversation
DawoudIO
commented
Sep 5, 2016
•
edited
Loading
edited
- Closes SundaySchool: Default Roles is Member #469
- Closes SundaySchool: Create requires lots of clicks #470
- Ensure it has the correct Roles
- Ensure it has the correct default role.
<script type="application/javascript"> | ||
$(document).ready(function () { | ||
|
||
$("#addNewCalssBtn").click(function (e) { |
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.
Class is spelled wrong.
- url encode name - return jason data - redirect to the new class
@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> |
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.
Methinks you didn't mean to have this as an HREF href="SelectList.php?mode=person"
@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; |
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.
that never worked for me...
{ | ||
$group->makeSundaySchool(); | ||
} | ||
$group->setName($groupSettings->groupName); | ||
$group->save(); | ||
echo $group->toJSON(); |
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.
What is the diff between echo vs $group->toJSON() // which I don't see in our auto complete
return $response->withJson($group->exportTo("JSON"));
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.
Not sure. I've used the echo ->toJSON() everywhere up to this point, and it seems to work