-
Notifications
You must be signed in to change notification settings - Fork 13
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 #683 from eerison/bug/Remove_data
Bug/Remove data in user profile
- Loading branch information
Showing
18 changed files
with
108 additions
and
66 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
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
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 |
---|---|---|
@@ -1,54 +1,6 @@ | ||
{% trans_default_domain 'MyProfile' %} | ||
|
||
<div class="modal" id="model_remove_item"> | ||
<div class="modal-background"></div> | ||
<div class="modal-card"> | ||
<header class="modal-card-head"> | ||
<p class="modal-card-title">{{'form.modal.delete_item.title'|trans}}</p> | ||
</header> | ||
<section class="modal-card-body"> | ||
{{'form.modal.delete_item.message'|trans}} | ||
</section> | ||
<footer class="modal-card-foot"> | ||
<form method="post" action="" id="form_remove_item"> | ||
<input type="hidden" name="_method" value="DELETE"> | ||
<input type="hidden" name="_token" id="input_token_remove_item" value=""> | ||
<button class="button is-primary" type="submit"> | ||
<span class="icon"> | ||
<i class="fa fa-check"></i> | ||
</span> | ||
<span>{{'form.modal.delete_item.button.yes'|trans}}</span> | ||
</button> | ||
|
||
<div class="button is-danger is-spacing" onclick="closeModalRemoveItem()"> | ||
<span class="icon"> | ||
<i class="fa fa-close"></i> | ||
</span> | ||
<span>{{'form.modal.delete_item.button.no'|trans}}</span> | ||
</div> | ||
</form> | ||
</footer> | ||
</div> | ||
</div> | ||
|
||
<a href="#" class="button is-text has-text-danger delete-button" onclick="openModalRemoveItem('{{ path(router, {'id': id}) }}', '{{ csrf_token('delete' ~ id) }}')"> | ||
<a href="#" class="button is-text has-text-danger delete-button" onclick="openModalRemoveItem('{{ path(router, {'id': id}) }}', '{{ csrf_token('delete_' ~ id) }}')"> | ||
<span class="icon is-small"> | ||
<i class="fa fa-trash"></i> | ||
</span> | ||
<span class="csrf_token is-hidden">{{ csrf_token('delete_' ~ id) }}</span> | ||
</a> | ||
|
||
<script> | ||
function openModalRemoveItem(path, csrf_token) { | ||
$modal = document.getElementById("model_remove_item"); | ||
$form = document.getElementById("form_remove_item"); | ||
$formToken = document.getElementById('input_token_remove_item'); | ||
$modal.classList.add("is-active"); | ||
$form.action = path; | ||
$formToken.value = csrf_token; | ||
} | ||
function closeModalRemoveItem() { | ||
document.getElementById("model_remove_item").classList.remove("is-active"); | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{% trans_default_domain 'MyProfile' %} | ||
|
||
<script> | ||
function openModalRemoveItem(path, csrf_token) { | ||
$modal = document.getElementById("model_remove_item"); | ||
$form = document.getElementById("form_remove_item"); | ||
$formToken = document.getElementById('input_token_remove_item'); | ||
$modal.classList.add("is-active"); | ||
$form.action = path; | ||
$formToken.value = csrf_token; | ||
} | ||
function closeModalRemoveItem() { | ||
document.getElementById("model_remove_item").classList.remove("is-active"); | ||
} | ||
</script> | ||
|
||
<div class="modal" id="model_remove_item"> | ||
<div class="modal-background"></div> | ||
<div class="modal-card"> | ||
<header class="modal-card-head"> | ||
<p class="modal-card-title">{{'form.modal.delete_item.title'|trans}}</p> | ||
</header> | ||
<section class="modal-card-body"> | ||
{{'form.modal.delete_item.message'|trans}} | ||
</section> | ||
<footer class="modal-card-foot"> | ||
<form method="post" action="" id="form_remove_item"> | ||
<input type="hidden" name="_token" id="input_token_remove_item" value=""> | ||
<button class="button is-primary" type="submit" id="confirm-delete"> | ||
<span class="icon"> | ||
<i class="fa fa-check"></i> | ||
</span> | ||
<span>{{'form.modal.delete_item.button.yes'|trans}}</span> | ||
</button> | ||
|
||
<div class="button is-danger is-spacing" onclick="closeModalRemoveItem()"> | ||
<span class="icon"> | ||
<i class="fa fa-close"></i> | ||
</span> | ||
<span>{{'form.modal.delete_item.button.no'|trans}}</span> | ||
</div> | ||
</form> | ||
</footer> | ||
</div> | ||
</div> |
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
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 |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
$this->assertResponseIsSuccessful(); | ||
|
||
if ($field) { | ||
$this->assertEquals($value, $crawler->filter('form')->form()->get($field)->getValue()); | ||
$this->assertEquals($value, $crawler->filter('#content-page form')->form()->get($field)->getValue()); | ||
} | ||
})->with(function () { | ||
#main | ||
|
@@ -77,7 +77,7 @@ | |
$container = $this->getContainer(); | ||
|
||
$userRepository = $container->get(UserRepository::class); | ||
$user1 = $userRepository->findOneBy(['email' => '[email protected]']); | ||
$user1 = $userRepository->findOneBy(['email' => 'test-profile@myprofile.pro']); | ||
$user2 = $userRepository->findOneBy(['email' => '[email protected]']); | ||
|
||
$client->loginUser($user1); | ||
|
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