AIRAVATA-2316 Add ability to delete phone numbers Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/ab980d46 Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/ab980d46 Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/ab980d46 Branch: refs/heads/keycloak-integration Commit: ab980d4685a8c89fe0218dbd0f2639489652a4b7 Parents: 310ea4c Author: Marcus Christie Authored: Fri Feb 24 10:04:23 2017 -0500 Committer: Marcus Christie Committed: Fri Feb 24 10:04:23 2017 -0500 ---------------------------------------------------------------------- app/views/account/user-profile.blade.php | 13 +++++-------- .../partials/user-profile-phone-template.blade.php | 9 +++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ab980d46/app/views/account/user-profile.blade.php ---------------------------------------------------------------------- diff --git a/app/views/account/user-profile.blade.php b/app/views/account/user-profile.blade.php index e9ebeea..86690c4 100644 --- a/app/views/account/user-profile.blade.php +++ b/app/views/account/user-profile.blade.php @@ -47,13 +47,10 @@ value="{{{ $userProfile->country }}}"/> - {{-- TODO: need to add delete as well --}}
@foreach ($userProfile->phones as $phone) - + @include('partials/user-profile-phone-template', array('phone' => $phone)) @endforeach
@@ -64,8 +61,7 @@ @stop @@ -76,8 +72,9 @@ $('#add-phone-button').click(function(e){ $(this).before($('#new-phone-template').html()); - e.preventDefault(); - return false; + }); + $(document).on('click', '.delete-phone-button', function(e){ + $(this).closest('.input-group').remove(); }); @stop http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/ab980d46/app/views/partials/user-profile-phone-template.blade.php ---------------------------------------------------------------------- diff --git a/app/views/partials/user-profile-phone-template.blade.php b/app/views/partials/user-profile-phone-template.blade.php new file mode 100644 index 0000000..6843f57 --- /dev/null +++ b/app/views/partials/user-profile-phone-template.blade.php @@ -0,0 +1,9 @@ + +
+ + + + +