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

EP-2525 - Hide unnecessary fields #1120

Merged
merged 8 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/app/branded/step-1/branded-checkout-step-1.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
ng-if="!$ctrl.loadingProductConfig && !$ctrl.errorLoadingProductConfig"
use-v3="$ctrl.useV3"
>

</product-config-form>
<div ng-if="$ctrl.errorLoadingProductConfig" class="alert alert-danger" role="alert">
<p translate='LOADING_ERROR' translate-values="{loadData: '$ctrl.loadData()'}" translate-compile></p>
Expand All @@ -30,7 +29,10 @@ <h3 class="panel-name" translate>{{'YOUR_INFORMATION'}}</h3>
on-submit="$ctrl.onContactInfoSubmit(success)"
donor-details="$ctrl.donorDetails"
radio-station-api-url="$ctrl.radioStationApiUrl"
radio-station-radius="$ctrl.radioStationRadius">
radio-station-radius="$ctrl.radioStationRadius"
use-v3="$ctrl.useV3"
>
wrandall22 marked this conversation as resolved.
Show resolved Hide resolved

</contact-info>
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions src/app/designationEditor/designationEditor.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ <h2 class="mb0">
Page Options
</button>

<product-config product-code="{{$ctrl.designationNumber}}"
button-label="{{'Give a Gift' | translate}}"></product-config>
<product-config
product-code="{{$ctrl.designationNumber}}"
button-label="{{'Give a Gift' | translate}}"
>
</product-config>
wrandall22 marked this conversation as resolved.
Show resolved Hide resolved
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ <h4 class="panel-title border-bottom-small mt0 pt-" translate>
</div><!-- // panel -->
</div>
</div>
<div class="panel panel-default give-modal-panel">
<div ng-if="$ctrl.useV3 !== 'true'" class="panel panel-default give-modal-panel">
Copy link
Contributor

Choose a reason for hiding this comment

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

One concern I realize I have with this is our datadog tests. These rely on the special instructions in order to work. We'll need to make sure that our tests are pointing at a v2 branded checkout.

<h4 class="panel-title border-bottom-small mt" translate>
{{'OPTIONAL'}}
</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
default-frequency="$ctrl.defaultFrequency"
update-query-param="$ctrl.updateQueryParam(key, value)"
submitted="$ctrl.submitted"
on-state-change="$ctrl.onStateChange(state)">
on-state-change="$ctrl.onStateChange(state)"
>
wrandall22 marked this conversation as resolved.
Show resolved Hide resolved
</product-config-form>
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/common/components/addressForm/addressForm.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const componentName = 'addressForm'

class AddressFormController {
/* @ngInject */
constructor ($log, geographiesService) {
constructor ($scope, $log, geographiesService) {
this.$log = $log
this.geographiesService = geographiesService
}
Expand Down Expand Up @@ -69,6 +69,7 @@ export default angular
address: '=',
parentForm: '<',
onAddressChanged: '&',
addressDisabled: '<'
addressDisabled: '<',
wrandall22 marked this conversation as resolved.
Show resolved Hide resolved
useV3: '<?'
wrandall22 marked this conversation as resolved.
Show resolved Hide resolved
}
})
2 changes: 1 addition & 1 deletion src/common/components/addressForm/addressForm.tpl.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="row">
<div class="col-sm-12">
<div class="form-group is-required" ng-class="{'has-error': ($ctrl.parentForm.addressCountry | showErrors) || $ctrl.loadingCountriesError}">
<div ng-if="$ctrl.useV3 !== 'true'" class="form-group is-required" ng-class="{'has-error': ($ctrl.parentForm.addressCountry | showErrors) || $ctrl.loadingCountriesError}">
wrandall22 marked this conversation as resolved.
Show resolved Hide resolved
<label>
<span translate>{{'COUNTRY'}}</span>
<select class="form-control form-control-subtle"
Expand Down
3 changes: 2 additions & 1 deletion src/common/components/contactInfo/contactInfo.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export default angular
donorDetails: '=?',
onSubmit: '&',
radioStationApiUrl: '<',
radioStationRadius: '<'
radioStationRadius: '<',
useV3: '<?'
wrandall22 marked this conversation as resolved.
Show resolved Hide resolved
}
})
13 changes: 7 additions & 6 deletions src/common/components/contactInfo/contactInfo.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<p><button id="retryButton1" type="button" class="btn btn-primary" ng-click="$ctrl.loadDonorDetails()" translate>{{'RETRY'}}</button></p>
</div>

<div class="mb_x" ng-if="!$ctrl.nameFieldsDisabled">
<div class="mb_x" ng-if="!$ctrl.nameFieldsDisabled && $ctrl.useV3 !== 'true'">
<div class="row">
<div class="col-md-6">
<a id="householdTypeLink" href="" class="tab-btn btn btn-default btn-block" ng-click="$ctrl.donorDetails['donor-type'] = 'Household'" ng-class="{'on': $ctrl.donorDetails['donor-type'] === 'Household'}" translate>{{'GIVE_AS_INDIVIDUAL'}}</a>
Expand All @@ -45,7 +45,7 @@

<form novalidate ng-keyup="$event.key === 'Enter' && $ctrl.submitDetails()" name="$ctrl.detailsForm">
<div class="mb">
<h4 class="panel-title border-bottom-small visible" translate>{{'YOUR_INFORMATION'}}</h4>
<h4 ng-if="$ctrl.useV3 !== 'true'" class="panel-title border-bottom-small visible" translate>{{'YOUR_INFORMATION'}}</h4>
wrandall22 marked this conversation as resolved.
Show resolved Hide resolved
<div class="row">
<div class="col-sm-4">
<div class="form-group is-required" ng-class="{'has-error': ($ctrl.detailsForm.nameGivenName | showErrors)}">
Expand All @@ -65,7 +65,7 @@ <h4 class="panel-title border-bottom-small visible" translate>{{'YOUR_INFORMAT
</div>
</div>
</div>
<div class="col-sm-2">
<div ng-if="$ctrl.useV3 !== 'true'" class="col-sm-2">
<div class="form-group" ng-class="{'has-error': ($ctrl.detailsForm.nameMiddleInitial | showErrors)}">
<label>
<span translate>{{'MIDDLE_ABBREV'}}</span>
Expand Down Expand Up @@ -99,7 +99,7 @@ <h4 class="panel-title border-bottom-small visible" translate>{{'YOUR_INFORMAT
</div>
</div>
</div>
<div class="col-sm-2">
<div ng-if="$ctrl.useV3 !== 'true'" class="col-sm-2">
<div class="form-group">
<label>
<span translate>{{'SUFFIX'}}</span>
Expand All @@ -121,7 +121,7 @@ <h4 class="panel-title border-bottom-small visible" translate>{{'YOUR_INFORMAT

</div>

<div class="row" ng-if="$ctrl.donorDetails['donor-type'] === 'Household'">
<div class="row" ng-if="$ctrl.donorDetails['donor-type'] === 'Household' && $ctrl.useV3 !== 'true'">
wrandall22 marked this conversation as resolved.
Show resolved Hide resolved
<div class="col-sm-4">
<div class="form-group" ng-class="{'has-error': ($ctrl.detailsForm.spouseGivenName | showErrors)}">
<label>
Expand Down Expand Up @@ -219,6 +219,7 @@ <h4 class="panel-title border-bottom-small visible" translate>{{'MAILING_ADDRE
parent-form="$ctrl.detailsForm"
on-address-changed="$ctrl.loadRadioStations()"
address-disabled="$ctrl.donorDetails.staff"
use-v3="$ctrl.useV3"
>
</address-form>
</div>
Expand All @@ -239,7 +240,7 @@ <h4 class="panel-title border-bottom-small visible" translate>{{'CONTACT_INFO'
</div>
</div>
</div>
<div class="col-sm-6">
<div ng-if="$ctrl.useV3 !== 'true'" class="col-sm-6">
<div class="form-group" ng-class="{'has-error': ($ctrl.detailsForm.phoneNumber | showErrors)}">
<label>
<span translate>{{'PHONE'}}</span>
Expand Down