Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from codebendercc/minor-wording-and-improvements
Minor wording and improvements
- Loading branch information
Showing
10 changed files
with
98 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
namespace AppBundle\Controller; | ||
|
||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
|
||
class UpdateTierController extends Controller | ||
{ | ||
/** | ||
* @Route("/update_tier/{owner}", name="update_tier") | ||
*/ | ||
public function updateAction(Request $request, $owner) | ||
{ | ||
$data = $request->request->all(); | ||
$entityManager = $this->getDoctrine()->getManager(); | ||
$user = $entityManager->getRepository('AppBundle:User')->find($owner); | ||
if ($data["tier"] !== null && $data["tier"] > 0) { | ||
$user->setTier($data["tier"]); | ||
} | ||
$entityManager->flush(); | ||
return new Response(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
Symfony/src/AppBundle/Resources/views/Dashboard/js.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script> | ||
function tierValueChanged() { | ||
$.ajax({ | ||
type: "POST", | ||
url: "{{ path('update_tier', {'owner': user.id }) }}", | ||
data: { | ||
'tier': $("#changeTier").val() | ||
} | ||
}).done(function () { | ||
$("#changeTier").val(0); | ||
location.reload(); | ||
}); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
Symfony/src/AppBundle/Resources/views/Register/js.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script> | ||
$(document).ready(function () { | ||
$("#registerButton").prop('disabled', true); | ||
$("#registration_password_second").keyup(checkPasswordMatch); | ||
}); | ||
function checkPasswordMatch() { | ||
var password = $("#registration_password_first").val(); | ||
var confirmPassword = $("#registration_password_second").val(); | ||
if (password == confirmPassword) { | ||
$("#differentPasswordAlert").fadeOut(500); | ||
$("#registerButton").prop('disabled', false); | ||
return; | ||
} | ||
$("#registerButton").prop('disabled', true); | ||
$("#differentPasswordAlert").show(); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters