merging 6.5.6 bug fixes
This commit is contained in:
parent
8ea183be00
commit
0554039f51
8 changed files with 296 additions and 14 deletions
|
|
@ -381,6 +381,10 @@ sub definition {
|
|||
fieldType=>'hidden',
|
||||
defaultValue=>0
|
||||
},
|
||||
encryptPage=>{
|
||||
fieldType=>'yesNo',
|
||||
defaultValue=>0
|
||||
},
|
||||
isPackage=>{
|
||||
fieldType=>'yesNo',
|
||||
defaultValue=>0
|
||||
|
|
@ -416,7 +420,6 @@ The fieldId to be deleted.
|
|||
|
||||
sub deleteMetaDataField {
|
||||
my $fieldId = shift;
|
||||
return unless ($fieldId =~ /^\d+$/ || length($fieldId) == 22);
|
||||
WebGUI::SQL->beginTransaction;
|
||||
WebGUI::SQL->write("delete from metaData_properties where fieldId = ".quote($fieldId));
|
||||
WebGUI::SQL->write("delete from metaData_values where fieldId = ".quote($fieldId));
|
||||
|
|
@ -1910,7 +1913,7 @@ sub processPropertiesFromFormPost {
|
|||
}
|
||||
$self->update(\%data);
|
||||
foreach my $form (keys %{$session{form}}) {
|
||||
if ($form =~ /^metadata_(\d+)$/) {
|
||||
if ($form =~ /^metadata_(.*)$/) {
|
||||
my $fieldId = $1;
|
||||
my ($exists) = WebGUI::SQL->quickArray("select count(*) from metaData_values
|
||||
where assetId = ".quote($self->getId)."
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ A web executable method that redirects the user to the specified page, or displa
|
|||
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::noAccess() unless $self->canView;
|
||||
if ($session{var}{adminOn}) {
|
||||
return $self->getContainer->www_view;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,6 +356,7 @@ sub www_edit {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub _drawQueryBuilder {
|
||||
my $self = shift;
|
||||
# Initialize operators
|
||||
my @textFields = qw|text yesNo selectList radioList|;
|
||||
my %operator;
|
||||
|
|
@ -373,7 +374,7 @@ sub _drawQueryBuilder {
|
|||
};
|
||||
|
||||
# Get the fields and count them
|
||||
my $fields = WebGUI::Asset::getMetaDataFields();
|
||||
my $fields = $self->getMetaDataFields();
|
||||
my $fieldCount = scalar(keys %$fields);
|
||||
|
||||
unless ($fieldCount) { # No fields found....
|
||||
|
|
@ -428,12 +429,13 @@ sub _drawQueryBuilder {
|
|||
|;
|
||||
|
||||
# Here starts the field loop
|
||||
my $i = 1;
|
||||
foreach my $field (keys %$fields) {
|
||||
my $fieldLabel = $fields->{$field}{fieldName};
|
||||
my $fieldType = $fields->{$field}{fieldType} || "text";
|
||||
|
||||
# The operator select field
|
||||
my $opFieldName = "op_field".$fields->{$field}{fieldId};
|
||||
my $opFieldName = "op_field".$i;
|
||||
my $opField = WebGUI::Form::selectList({
|
||||
name=>$opFieldName,
|
||||
uiLevel=>5,
|
||||
|
|
@ -441,7 +443,7 @@ sub _drawQueryBuilder {
|
|||
extras=>'class="qbselect"'
|
||||
});
|
||||
# The value select field
|
||||
my $valFieldName = "val_field".$fields->{$field}{fieldId};
|
||||
my $valFieldName = "val_field".$i;
|
||||
my $valueField = WebGUI::Form::dynamicField($fieldType, {
|
||||
name=>$valFieldName,
|
||||
uiLevel=>5,
|
||||
|
|
@ -474,6 +476,7 @@ sub _drawQueryBuilder {
|
|||
<input class="qbButton" type=button value=Add onclick="addCriteria('$fieldLabel', this.form.$opFieldName, this.form.$valFieldName)"></td>
|
||||
</tr>
|
||||
|;
|
||||
$i++;
|
||||
}
|
||||
# Close the table
|
||||
$output .= "</table>";
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ sub cancelRecurringPayment {
|
|||
# print "FIRST PAGE SUCCESS!\n";
|
||||
# print "(".$response->base.")\n";
|
||||
} else {
|
||||
WebGUI::ErrorHandler::fatal(
|
||||
WebGUI::ErrorHandler::fatalError(
|
||||
'Connection Error while trying to cancel transaction '.$recurring->{transaction}->transactionId." \n".
|
||||
"Could not reach login page.\n".
|
||||
"(".$response->base.")\n".
|
||||
|
|
@ -83,7 +83,7 @@ sub cancelRecurringPayment {
|
|||
# print "CANCELATION PAGE SUCCESS!\n";
|
||||
# print "(".$response->base.")\n";
|
||||
} else {
|
||||
WebGUI::ErrorHandler::fatal(
|
||||
WebGUI::ErrorHandler::fatalError(
|
||||
'Connection Error while trying to cancel transaction '.$recurring->{transaction}->transactionId." \n".
|
||||
"(".$response->base.")\n".
|
||||
$response->status_line. "\n");
|
||||
|
|
@ -140,6 +140,264 @@ sub checkoutForm {
|
|||
-label => $i18n->get('zipcode'),
|
||||
-value => $session{form}{zipcode} || $u->profileField('homeZip')
|
||||
);
|
||||
my %countries;
|
||||
tie %countries, 'Tie::IxHash';
|
||||
%countries = (
|
||||
'Afghanistan' => 'Afghanistan',
|
||||
'Albania' => 'Albania',
|
||||
'Algeria' => 'Algeria',
|
||||
'American Samoa' => 'American Samoa',
|
||||
'Andorra' => 'Andorra',
|
||||
'Anguilla' => 'Anguilla',
|
||||
'Antarctica' => 'Antarctica',
|
||||
'Antigua And Barbuda' => 'Antigua And Barbuda',
|
||||
'Argentina' => 'Argentina',
|
||||
'Armenia' => 'Armenia',
|
||||
'Aruba' => 'Aruba',
|
||||
'Australia' => 'Australia',
|
||||
'Austria' => 'Austria',
|
||||
'Azerbaijan' => 'Azerbaijan',
|
||||
'Bahamas' => 'Bahamas',
|
||||
'Bahrain' => 'Bahrain',
|
||||
'Bangladesh' => 'Bangladesh',
|
||||
'Barbados' => 'Barbados',
|
||||
'Belarus' => 'Belarus',
|
||||
'Belgium' => 'Belgium',
|
||||
'Belize' => 'Belize',
|
||||
'Benin' => 'Benin',
|
||||
'Bermuda' => 'Bermuda',
|
||||
'Bhutan' => 'Bhutan',
|
||||
'Bolivia' => 'Bolivia',
|
||||
'Bosnia and Herzegovina' => 'Bosnia and Herzegovina',
|
||||
'Botswana' => 'Botswana',
|
||||
'Bouvet Island' => 'Bouvet Island',
|
||||
'Brazil' => 'Brazil',
|
||||
'British Indian Ocean Territory' => 'British Indian Ocean Territory',
|
||||
'Brunei Darussalam' => 'Brunei Darussalam',
|
||||
'Bulgaria' => 'Bulgaria',
|
||||
'Burkina Faso' => 'Burkina Faso',
|
||||
'Burundi' => 'Burundi',
|
||||
'Cambodia' => 'Cambodia',
|
||||
'Cameroon' => 'Cameroon',
|
||||
'Canada' => 'Canada',
|
||||
'Cape Verde' => 'Cape Verde',
|
||||
'Cayman Islands' => 'Cayman Islands',
|
||||
'Central African Republic' => 'Central African Republic',
|
||||
'Chad' => 'Chad',
|
||||
'Chile' => 'Chile',
|
||||
'China' => 'China',
|
||||
'Christmas Island' => 'Christmas Island',
|
||||
'Cocos (Keeling) Islands' => 'Cocos (Keeling) Islands',
|
||||
'Colombia' => 'Colombia',
|
||||
'Comoros' => 'Comoros',
|
||||
'Congo' => 'Congo',
|
||||
'Congo, the Democratic Republic of the' => 'Congo, the Democratic Republic of the',
|
||||
'Cook Islands' => 'Cook Islands',
|
||||
'Costa Rica' => 'Costa Rica',
|
||||
'Cote d\'Ivoire' => 'Cote d\'Ivoire',
|
||||
'Croatia' => 'Croatia',
|
||||
'Cyprus' => 'Cyprus',
|
||||
'Czech Republic' => 'Czech Republic',
|
||||
'Denmark' => 'Denmark',
|
||||
'Djibouti' => 'Djibouti',
|
||||
'Dominica' => 'Dominica',
|
||||
'Dominican Republic' => 'Dominican Republic',
|
||||
'East Timor' => 'East Timor',
|
||||
'Ecuador' => 'Ecuador',
|
||||
'Egypt' => 'Egypt',
|
||||
'El Salvador' => 'El Salvador',
|
||||
'England' => 'England',
|
||||
'Equatorial Guinea' => 'Equatorial Guinea',
|
||||
'Eritrea' => 'Eritrea',
|
||||
'Espana' => 'Espana',
|
||||
'Estonia' => 'Estonia',
|
||||
'Ethiopia' => 'Ethiopia',
|
||||
'Falkland Islands' => 'Falkland Islands',
|
||||
'Faroe Islands' => 'Faroe Islands',
|
||||
'Fiji' => 'Fiji',
|
||||
'Finland' => 'Finland',
|
||||
'France' => 'France',
|
||||
'French Guiana' => 'French Guiana',
|
||||
'French Polynesia' => 'French Polynesia',
|
||||
'French Southern Territories' => 'French Southern Territories',
|
||||
'Gabon' => 'Gabon',
|
||||
'Gambia' => 'Gambia',
|
||||
'Georgia' => 'Georgia',
|
||||
'Germany' => 'Germany',
|
||||
'Ghana' => 'Ghana',
|
||||
'Gibraltar' => 'Gibraltar',
|
||||
'Great Britain' => 'Great Britain',
|
||||
'Greece' => 'Greece',
|
||||
'Greenland' => 'Greenland',
|
||||
'Grenada' => 'Grenada',
|
||||
'Guadeloupe' => 'Guadeloupe',
|
||||
'Guam' => 'Guam',
|
||||
'Guatemala' => 'Guatemala',
|
||||
'Guinea' => 'Guinea',
|
||||
'Guinea-Bissau' => 'Guinea-Bissau',
|
||||
'Guyana' => 'Guyana',
|
||||
'Haiti' => 'Haiti',
|
||||
'Heard and Mc Donald Islands' => 'Heard and Mc Donald Islands',
|
||||
'Honduras' => 'Honduras',
|
||||
'Hong Kong' => 'Hong Kong',
|
||||
'Hungary' => 'Hungary',
|
||||
'Iceland' => 'Iceland',
|
||||
'India' => 'India',
|
||||
'Indonesia' => 'Indonesia',
|
||||
'Ireland' => 'Ireland',
|
||||
'Israel' => 'Israel',
|
||||
'Italy' => 'Italy',
|
||||
'Jamaica' => 'Jamaica',
|
||||
'Japan' => 'Japan',
|
||||
'Jordan' => 'Jordan',
|
||||
'Kazakhstan' => 'Kazakhstan',
|
||||
'Kenya' => 'Kenya',
|
||||
'Kiribati' => 'Kiribati',
|
||||
'Korea, Republic of' => 'Korea, Republic of',
|
||||
'Korea (South)' => 'Korea (South)',
|
||||
'Kuwait' => 'Kuwait',
|
||||
'Kyrgyzstan' => 'Kyrgyzstan',
|
||||
"Lao People's Democratic Republic" => "Lao People's Democratic Republic",
|
||||
'Latvia' => 'Latvia',
|
||||
'Lebanon' => 'Lebanon',
|
||||
'Lesotho' => 'Lesotho',
|
||||
'Liberia' => 'Liberia',
|
||||
'Libya' => 'Libya',
|
||||
'Liechtenstein' => 'Liechtenstein',
|
||||
'Lithuania' => 'Lithuania',
|
||||
'Luxembourg' => 'Luxembourg',
|
||||
'Macau' => 'Macau',
|
||||
'Macedonia' => 'Macedonia',
|
||||
'Madagascar' => 'Madagascar',
|
||||
'Malawi' => 'Malawi',
|
||||
'Malaysia' => 'Malaysia',
|
||||
'Maldives' => 'Maldives',
|
||||
'Mali' => 'Mali',
|
||||
'Malta' => 'Malta',
|
||||
'Marshall Islands' => 'Marshall Islands',
|
||||
'Martinique' => 'Martinique',
|
||||
'Mauritania' => 'Mauritania',
|
||||
'Mauritius' => 'Mauritius',
|
||||
'Mayotte' => 'Mayotte',
|
||||
'Mexico' => 'Mexico',
|
||||
'Micronesia, Federated States of' => 'Micronesia, Federated States of',
|
||||
'Moldova, Republic of' => 'Moldova, Republic of',
|
||||
'Monaco' => 'Monaco',
|
||||
'Mongolia' => 'Mongolia',
|
||||
'Montserrat' => 'Montserrat',
|
||||
'Morocco' => 'Morocco',
|
||||
'Mozambique' => 'Mozambique',
|
||||
'Myanmar' => 'Myanmar',
|
||||
'Namibia' => 'Namibia',
|
||||
'Nauru' => 'Nauru',
|
||||
'Nepal' => 'Nepal',
|
||||
'Netherlands' => 'Netherlands',
|
||||
'Netherlands Antilles' => 'Netherlands Antilles',
|
||||
'New Caledonia' => 'New Caledonia',
|
||||
'New Zealand' => 'New Zealand',
|
||||
'Nicaragua' => 'Nicaragua',
|
||||
'Niger' => 'Niger',
|
||||
'Nigeria' => 'Nigeria',
|
||||
'Niue' => 'Niue',
|
||||
'Norfolk Island' => 'Norfolk Island',
|
||||
'Northern Ireland' => 'Northern Ireland',
|
||||
'Northern Mariana Islands' => 'Northern Mariana Islands',
|
||||
'Norway' => 'Norway',
|
||||
'Oman' => 'Oman',
|
||||
'Pakistan' => 'Pakistan',
|
||||
'Palau' => 'Palau',
|
||||
'Panama' => 'Panama',
|
||||
'Papua New Guinea' => 'Papua New Guinea',
|
||||
'Paraguay' => 'Paraguay',
|
||||
'Peru' => 'Peru',
|
||||
'Philippines' => 'Philippines',
|
||||
'Pitcairn' => 'Pitcairn',
|
||||
'Poland' => 'Poland',
|
||||
'Portugal' => 'Portugal',
|
||||
'Puerto Rico' => 'Puerto Rico',
|
||||
'Qatar' => 'Qatar',
|
||||
'Reunion' => 'Reunion',
|
||||
'Romania' => 'Romania',
|
||||
'Russia' => 'Russia',
|
||||
'Russian Federation' => 'Russian Federation',
|
||||
'Rwanda' => 'Rwanda',
|
||||
'Saint Kitts and Nevis' => 'Saint Kitts and Nevis',
|
||||
'Saint Lucia' => 'Saint Lucia',
|
||||
'Saint Vincent and the Grenadines' => 'Saint Vincent and the Grenadines',
|
||||
'Samoa (Independent)' => 'Samoa (Independent)',
|
||||
'San Marino' => 'San Marino',
|
||||
'Sao Tome and Principe' => 'Sao Tome and Principe',
|
||||
'Saudi Arabia' => 'Saudi Arabia',
|
||||
'Scotland' => 'Scotland',
|
||||
'Senegal' => 'Senegal',
|
||||
'Serbia and Montenegro' => 'Serbia and Montenegro',
|
||||
'Seychelles' => 'Seychelles',
|
||||
'Sierra Leone' => 'Sierra Leone',
|
||||
'Singapore' => 'Singapore',
|
||||
'Slovakia' => 'Slovakia',
|
||||
'Slovenia' => 'Slovenia',
|
||||
'Solomon Islands' => 'Solomon Islands',
|
||||
'Somalia' => 'Somalia',
|
||||
'South Africa' => 'South Africa',
|
||||
'South Georgia and the South Sandwich Islands' => 'South Georgia and the South Sandwich Islands',
|
||||
'South Korea' => 'South Korea',
|
||||
'Spain' => 'Spain',
|
||||
'Sri Lanka' => 'Sri Lanka',
|
||||
'St. Helena' => 'St. Helena',
|
||||
'St. Pierre and Miquelon' => 'St. Pierre and Miquelon',
|
||||
'Suriname' => 'Suriname',
|
||||
'Svalbard and Jan Mayen Islands' => 'Svalbard and Jan Mayen Islands',
|
||||
'Swaziland' => 'Swaziland',
|
||||
'Sweden' => 'Sweden',
|
||||
'Switzerland' => 'Switzerland',
|
||||
'Taiwan' => 'Taiwan',
|
||||
'Tajikistan' => 'Tajikistan',
|
||||
'Tanzania' => 'Tanzania',
|
||||
'Thailand' => 'Thailand',
|
||||
'Togo' => 'Togo',
|
||||
'Tokelau' => 'Tokelau',
|
||||
'Tonga' => 'Tonga',
|
||||
'Trinidad' => 'Trinidad',
|
||||
'Trinidad and Tobago' => 'Trinidad and Tobago',
|
||||
'Tunisia' => 'Tunisia',
|
||||
'Turkey' => 'Turkey',
|
||||
'Turkmenistan' => 'Turkmenistan',
|
||||
'Turks and Caicos Islands' => 'Turks and Caicos Islands',
|
||||
'Tuvalu' => 'Tuvalu',
|
||||
'Uganda' => 'Uganda',
|
||||
'Ukraine' => 'Ukraine',
|
||||
'United Arab Emirates' => 'United Arab Emirates',
|
||||
'United Kingdom' => 'United Kingdom',
|
||||
'United States' => 'United States',
|
||||
'United States Minor Outlying Islands' => 'United States Minor Outlying Islands',
|
||||
'Uruguay' => 'Uruguay',
|
||||
'Uzbekistan' => 'Uzbekistan',
|
||||
'Vanuatu' => 'Vanuatu',
|
||||
'Vatican City State (Holy See)' => 'Vatican City State (Holy See)',
|
||||
'Venezuela' => 'Venezuela',
|
||||
'Viet Nam' => 'Viet Nam',
|
||||
'Virgin Islands (British)' => 'Virgin Islands (British)',
|
||||
'Virgin Islands (U.S.)' => 'Virgin Islands (U.S.)',
|
||||
'Wales' => 'Wales',
|
||||
'Wallis and Futuna Islands' => 'Wallis and Futuna Islands',
|
||||
'Western Sahara' => 'Western Sahara',
|
||||
'Yemen' => 'Yemen',
|
||||
'Zambia' => 'Zambia',
|
||||
'Zimbabwe' => 'Zimbabwe'
|
||||
);
|
||||
$f->selectList(
|
||||
-name=>"country",
|
||||
-label=>$i18n->get("country"),
|
||||
-value=>[$session{form}{country}],
|
||||
-defaultValue=>[$u->profileField("homeCountry")],
|
||||
-options=>\%countries
|
||||
);
|
||||
$f->phone(
|
||||
-name=>"phone",
|
||||
-label=>$i18n->get("phone"),
|
||||
-value=>$session{form}{phone},
|
||||
-defaultValue=>$u->profileField("homePhone")
|
||||
);
|
||||
$f->email(
|
||||
-name => 'email',
|
||||
-label => $i18n->get('email'),
|
||||
|
|
@ -398,8 +656,8 @@ my %transactionData = %{$self->{_transactionParams}};
|
|||
<City>$userData{CITY}</City>
|
||||
<State>$userData{STATE}</State>
|
||||
<Zip>$userData{ZIP}</Zip>
|
||||
<Country>USA</Country>
|
||||
<Phone>230-555-1212</Phone>
|
||||
<Country>$userData{COUNTRY}</Country>
|
||||
<Phone>$userData{PHONE}</Phone>
|
||||
</BillingAddress>
|
||||
<AccountInfo>
|
||||
<CardInfo>
|
||||
|
|
@ -555,6 +813,8 @@ sub validateFormData {
|
|||
LASTNAME => $session{form}{lastName},
|
||||
EMAIL => $session{form}{email},
|
||||
STATE => $session{form}{state},
|
||||
COUNTRY => $session{form}{country},
|
||||
PHONE => $session{form}{phone},
|
||||
};
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -2172,7 +2172,7 @@ sub template {
|
|||
$returnUrl = "&proceed=goBackToPage&returnUrl=".WebGUI::URL::escape($session{asset}->getUrl);
|
||||
}
|
||||
$buttons = editIcon("func=edit".$returnUrl,$template->get("url"));
|
||||
$buttons .= manageIcon("",$template->getParent->get("url"));
|
||||
$buttons .= manageIcon("func=manageAssets",$template->getParent->get("url"));
|
||||
}
|
||||
$output = WebGUI::Form::template({
|
||||
"name"=>$name,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,16 @@
|
|||
package WebGUI::i18n::English::CommercePaymentITransact;
|
||||
|
||||
our $I18N = {
|
||||
'phone' => {
|
||||
message => q|Telephone Number|,
|
||||
lastUpdated => 0,
|
||||
context => q|Form label in the checkout form of the iTransact module.|
|
||||
},
|
||||
'country' => {
|
||||
message => q|Country|,
|
||||
lastUpdated => 0,
|
||||
context => q|Form label in the checkout form of the iTransact module.|
|
||||
},
|
||||
'firstName' => {
|
||||
message => q|First name|,
|
||||
lastUpdated => 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue