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

feat(template): implement optional honorifics/titles for Donor name #3011 #3228

Merged
merged 90 commits into from May 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
2584fc0
refactor(admin-settings): add name title prefix global settings
mehul0810 Apr 20, 2018
502c749
refactor(admin-settings): add default settings for name title prefix
mehul0810 Apr 20, 2018
296313e
refactor(donation): Merge latest release 2.1 changes
mehul0810 Apr 24, 2018
b6a2773
refactor(admin-form): add metabox field name title prefix
mehul0810 Apr 24, 2018
6326205
Merge branch 'release/2.2' of https://github.com/WordImpress/Give int…
mehul0810 Apr 25, 2018
91c5c9c
refactor(admin-form): add chosen metabox field
mehul0810 Apr 25, 2018
42415fe
fix(admin-form): add toggle support for per form settings
mehul0810 May 1, 2018
9c94979
fix(stripe): optimise js
mehul0810 May 1, 2018
739edb2
fix(stripe): add metabox settings for title prefixes
mehul0810 May 1, 2018
9eb78ad
Merge branch 'release/2.2' of https://github.com/WordImpress/Give int…
mehul0810 May 1, 2018
aed6fd1
fix(stripe): add title prefix text to support i18n
mehul0810 May 1, 2018
236c150
fix(stripe): add give settings for title prefixes
mehul0810 May 1, 2018
4204b8f
fix(stripe): add chosen support for give settings
mehul0810 May 1, 2018
6e7a47b
Merge branch 'release/2.2' of https://github.com/WordImpress/Give
mehul0810 May 4, 2018
4ce6f57
fix(admin-settings) increase title prefixes field width to 100%
mehul0810 May 4, 2018
ceb4344
fix(admin-settings) add toggle settings for title prefixes field
mehul0810 May 4, 2018
b409ca0
fix(donation) sanitize and escape inputs
mehul0810 May 4, 2018
1acf482
fix(donation) add new title field for donation form
mehul0810 May 4, 2018
af33860
fix(donation) fix phpcs errors for comments
mehul0810 May 4, 2018
d75fde5
fix(admin-settings): resolve chosen setting field saving issue
mehul0810 May 7, 2018
28138db
fix(admin-settings): resolve phpcs errors
mehul0810 May 7, 2018
fb6e945
fix(admin-settings): solve newly added input chosen value save error
mehul0810 May 7, 2018
0fff0a5
fix(admin-settings): remove print data display
mehul0810 May 7, 2018
c9c5331
fix(admin-settings): fix phpcs errors give_docs link
mehul0810 May 7, 2018
c6f0081
fix(admin-settings): add helper fn to fetch title prefixes
mehul0810 May 7, 2018
6063ae0
fix(admin-settings): improve logic saving title prefixes settings
mehul0810 May 7, 2018
eb83a38
fix(donation): improve logic for displaying title prefixes fn
mehul0810 May 7, 2018
9c4280e
fix(donation): display title prefixes in donation form field
mehul0810 May 7, 2018
e651f49
fix(donation): add title prefix and sanitize donation data properly
mehul0810 May 7, 2018
3d7fce2
fix(donation): save title prefix in payment meta
mehul0810 May 7, 2018
95108e3
fix(donation): set key and value as value for better processing
mehul0810 May 7, 2018
9a79e32
fix(donation): add title prefix to donation receipt
mehul0810 May 7, 2018
62c2d82
fix(donation): add comment to explain what title prefix code does
mehul0810 May 8, 2018
50a0d5e
fix(donation): improve conditional logic in displaying title prefix
mehul0810 May 8, 2018
0f78f0a
fix(donation): save title prefix to donor meta
mehul0810 May 8, 2018
3d0bd58
fix(donation): improve phpcs for comments
mehul0810 May 8, 2018
707f702
fix(donation): improve strict comparisons
mehul0810 May 8, 2018
31b3549
Merge branch 'release/2.2' of https://github.com/WordImpress/Give int…
mehul0810 May 8, 2018
3ce5470
fix(donation): save title prefix to donor meta
mehul0810 May 8, 2018
f05363c
fix(donation): sanitize gateway input var and solve phpcs
mehul0810 May 8, 2018
1983719
fix(donation): add title prefix support while processing donation
mehul0810 May 8, 2018
0cf44d2
fix(donation): fetch title prefix to user info of donor
mehul0810 May 8, 2018
5405be7
fix(donation): update donation receipt info with title prefix
mehul0810 May 8, 2018
d395fe5
fix(admin-donations): add title prefix to donor name and improve phpcs
mehul0810 May 8, 2018
79926b5
fix(admin-donations): improve fn logic with title prefix
mehul0810 May 8, 2018
619c7b6
fix(admin-donors): update donor name display with title prefixes
mehul0810 May 8, 2018
eaeafe5
fix(admin-donors): improve minor phpcs errors
mehul0810 May 8, 2018
d185877
fix(admin-donors): streamline code for title prefix
mehul0810 May 8, 2018
0057e31
fix(admin-donors): add select field for title prefix on edit screen
mehul0810 May 8, 2018
b26fac4
fix(admin-donors): update donor title prefix in meta
mehul0810 May 8, 2018
0568d49
fix(admin-donors): improve edit donor fn for security and functioning
mehul0810 May 8, 2018
263c93e
fix(admin-donors): change field name from customer to donor info
mehul0810 May 8, 2018
d38083b
fix(api): set title prefix for give api
mehul0810 May 8, 2018
e3668e0
fix(api): solve minor phpcs errors
mehul0810 May 8, 2018
08dc098
fix(admin-email): add title prefix to emails for name and fullname
mehul0810 May 9, 2018
73294b8
Merge branch 'release/2.2' of https://github.com/WordImpress/Give int…
mehul0810 May 9, 2018
2f322dd
fix(donation): add fn to get donor name with title prefix
mehul0810 May 9, 2018
5ce89be
fix(admin-donations): add support for title prefixes
mehul0810 May 9, 2018
6918a76
Merge branch 'release/2.2' of https://github.com/WordImpress/Give int…
mehul0810 May 15, 2018
f9aceab
fix(donation): align the title prefix, first name and last name fields
mehul0810 May 15, 2018
a7507b7
fix(donation): remove additional title option from dropdown
mehul0810 May 15, 2018
e8c993f
fix(admin-settings): minor solution of name title prefix toggle issue
mehul0810 May 15, 2018
52ec72c
fix(admin-settings): change name title prefix field width to 30%
mehul0810 May 15, 2018
6a8282c
fix(admin-settings): remove period appended from name title prefix field
mehul0810 May 15, 2018
72e9a93
fix(admin-donations): minor change in getting donor name with title
mehul0810 May 15, 2018
3701b33
fix(admin-donations): simplify code to get donor name with title
mehul0810 May 15, 2018
1323ddd
fix(admin-donations): minor phpcs code improvement
mehul0810 May 15, 2018
3375ae5
test(phpunit): fix undefined index title in unit test
mehul0810 May 16, 2018
4363578
test(phpunit): add support for title prefix in unit test
mehul0810 May 16, 2018
8e1fb71
test(phpunit): ensure non empty check for title prefix
mehul0810 May 16, 2018
58ab623
fix(donation): improve logic to save donor title prefix
mehul0810 May 16, 2018
ea309d4
fix(donation): minor data type issue due to strict comparison
mehul0810 May 16, 2018
d25c3d9
fix(admin-donation): minor title prefix mismatch issue on donations list
mehul0810 May 16, 2018
0a7e270
test(phpunit): revert title prefix changes while creating donations
mehul0810 May 16, 2018
83bd559
Merge branch 'release/2.2' of https://github.com/WordImpress/Give int…
mehul0810 May 18, 2018
94ffc18
fix(admin-setting): add required and option to title prefix settings
mehul0810 May 21, 2018
a5e6cd1
fix(admin-setting): limit width for chosen container to 30%
mehul0810 May 21, 2018
e663501
fix(admin-setting): improve toggle for name title prefix admin settings
mehul0810 May 21, 2018
835508b
fix(admin-setting): improve toggle for name title prefix metabox setting
mehul0810 May 21, 2018
b751df2
fix(donation): add validation check for name title prefix
mehul0810 May 21, 2018
2608664
fix(donation): display name title prefix if required or optional
mehul0810 May 21, 2018
bec3cc0
fix(donation): display field only if it is required or optional
mehul0810 May 21, 2018
133f4c2
fix(donation): add new fn and use it to get title prefixes
mehul0810 May 21, 2018
6403663
fix(donation): add support for title prefix to display the saved data
mehul0810 May 21, 2018
00b2d88
fix(donation): display selected title prefix value
mehul0810 May 21, 2018
58a36a2
fix(donation): make use of fn to check title prefix is enabled or not
mehul0810 May 21, 2018
ce1815a
fix(donation): update get_title_prefixes fn
mehul0810 May 21, 2018
9ac37cb
fix(donation): update give_is_title_prefix_enabled fn
mehul0810 May 21, 2018
bc8759f
fix(donation): add class when title prefix is enabled
mehul0810 May 21, 2018
3557331
fix(donation): update CSS to show 2 and 3 column based on fields
mehul0810 May 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 27 additions & 8 deletions assets/src/css/frontend/forms.scss
Expand Up @@ -143,7 +143,21 @@ form.give-form {
display: none;
}

.give-tooltip {
.give-title-prefix-wrap{

.form-row-first,
.form-row-last {
float: left;
width: 40%;
}

.form-row-title {
float: left;
width: 15%;
}
}

.give-tooltip {
margin: 0 3px;
padding: 0;
font-size: 14px;
Expand Down Expand Up @@ -219,15 +233,20 @@ form.give-form {

}

.form-row-first,
.form-row-last {
float: left;
width: 48.5%;
.form-row-title,
.form-row-first {
margin-right: 2.5%;
}

.form-row-last {
float: right;
}
.form-row-first,
.form-row-last {
float: left;
width: 48.5%;
}

.form-row-last {
float: right;
}

.form-row-wide {
@include clearfix();
Expand Down
16 changes: 16 additions & 0 deletions assets/src/js/admin/admin-forms.js
Expand Up @@ -203,6 +203,22 @@ jQuery.noConflict();
$( '#email_notification_options .give-field-wrap:not(._give_email_options_field)' ).hide();
}
} ).change();

// Title Prefixes.
var defaultNameTitlePrefixChecked = $( 'input[name="_give_name_title_prefix"]:checked').val();
if ( 'required' === defaultNameTitlePrefixChecked || 'optional' === defaultNameTitlePrefixChecked ) {
$( '.give-title-prefixes-wrap' ).show();
}

$( 'input[name="_give_name_title_prefix"]').on( 'change', function() {
var titlePrefixChecked = $( 'input[name="_give_name_title_prefix"]:checked').val();

if ( 'required' === titlePrefixChecked || 'optional' === titlePrefixChecked ) {
$( '.give-title-prefixes-wrap' ).show();
} else {
$( '.give-title-prefixes-wrap' ).hide();
}
});
};

//Handle Repeatable Row ID
Expand Down