Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/dev/1.10' into 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrebenchuk committed Mar 20, 2017
2 parents 010c538 + b8d7c25 commit 1ae4f0f
Show file tree
Hide file tree
Showing 35 changed files with 77 additions and 63 deletions.
2 changes: 1 addition & 1 deletion UPGRADE-1.10.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ UPGRADE FROM 1.9 to 1.10
- Oro\Bundle\TestFrameworkBundle\Test\Client::startTransaction method was removed, use one from Oro\Bundle\TestFrameworkBundle\Test\WebTestCase class.
- Oro\Bundle\TestFrameworkBundle\Test\Client::rollbackTransaction method was removed, use one from Oro\Bundle\TestFrameworkBundle\Test\WebTestCase class.
- `\Oro\Bundle\TestFrameworkBundle\Fixtures\LoadUserData` is deprecated, use `\Oro\Bundle\TestFrameworkBundle\Migrations\Data\ORM\LoadUserData` instead
- No need to load fixtures after test environment setup using `doctrine:fixture:load`
- No need to load fixtures after test environment setup using `doctrine:fixtures:load`

####EntityBundle
- The implementation of `Oro\Bundle\EntityBundle\ORM\EntityAliasResolver` was changed. Now the loaded entity aliases is saved into a cache that gives significant performance gain. Also, from now, you can implement `Oro\Bundle\EntityBundle\Provider\EntityClassProviderInterface` to create aliases for any entities not only for ORM entities.
Expand Down
2 changes: 1 addition & 1 deletion src/Oro/Bundle/ActivityBundle/Manager/ActivityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function setActivityTargets(ActivityInterface $activityEntity, array $tar
$oldTargetEntities = $activityEntity->getActivityTargetEntities();

foreach ($oldTargetEntities as $oldTargetEntity) {
if (!in_array($oldTargetEntity, $targetEntities)) {
if (!in_array($oldTargetEntity, $targetEntities, true)) {
$this->removeActivityTarget($activityEntity, $oldTargetEntity);
$hasChanges = true;
}
Expand Down
10 changes: 5 additions & 5 deletions src/Oro/Bundle/CalendarBundle/Resources/config/datagrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ datagrid:
data_identifier: event.id
handler: oro_calendar.datagrid.mass_action.handler.delete
options:
entityHint: calendar_events
entityHint: calendar events
entity_pagination: true

widget-base-calendar-event-grid:
Expand Down Expand Up @@ -213,7 +213,7 @@ datagrid:
properties:
id: ~
options:
entityHint: calendar_events
entityHint: calendar events

activity-calendar-event-grid:
extends: widget-base-calendar-event-grid
Expand All @@ -232,7 +232,7 @@ datagrid:
users-calendar-select-grid-exclude-owner:
acl_resource: oro_user_user_view
options:
entityHint: calendar
entityHint: calendars
source:
type: orm
query:
Expand Down Expand Up @@ -391,7 +391,7 @@ datagrid:
icon: trash
link: delete_link
options:
entityHint: calendar_events
entityHint: calendar events
entity_pagination: true

system-calendar-event-grid:
Expand Down Expand Up @@ -491,7 +491,7 @@ datagrid:
extended_entity_name: %oro_calendar.calendar_event.entity.class%
acl_resource: oro_calendar_event_view
options:
entityHint: calendar_events
entityHint: calendar events
entity_pagination: true
toolbarOptions:
pageSize:
Expand Down
3 changes: 1 addition & 2 deletions src/Oro/Bundle/ConfigBundle/Form/Type/FormFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ function (FormEvent $event) {
FormEvents::POST_SUBMIT,
function (FormEvent $event) {
$form = $event->getForm()->getParent();
$data = $event->getForm()->getData();
$disabled = isset($data['use_parent_scope_value']) ? $data['use_parent_scope_value'] : false;
$disabled = $event->getForm()->getData();
FormUtils::replaceField($form, 'value', ['disabled' => $disabled]);
}
);
Expand Down
4 changes: 2 additions & 2 deletions src/Oro/Bundle/CronBundle/Resources/config/datagrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ datagrid:
acl_resource: oro_jobs
rowAction: true
options:
entityHint: job
entityHint: jobs

oro-cron-schedules-grid:
acl_resource: oro_cron_schedule_view
options:
entityHint: schedule
entityHint: schedules
source:
type: orm
query:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ datagrid:
audit-grid:
acl_resource: oro_dataaudit_history
options:
entityHint: audit
entityHint: audits
source:
type: orm
query:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ define([
this.allowOk = false;
} else if (data.deletable <= data.max_limit) {
if (data.deletable >= data.selected) {
this.confirmMessage = __(this.confirmMessages.selected_message, {selected: data.selected});
var placeholders = {selected: data.selected};
this.confirmMessage = __(this.confirmMessages.selected_message, placeholders, data.selected);
} else {
this.confirmMessage = __(this.confirmMessages.restricted_access_message, {
deletable: data.deletable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ define([
'<span class="multiselect-value-wrapper"><span class="value-item">' +
value
.map(function(item) {return choices[item];})
.filter(function(item) {return item;})
.join('</span><span class="value-item">') +
'</span></span>'
) : '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"Please select view": "Please select view"
"oro.datagrid.entityHint": "Entity"
"oro.datagrid.no.entities": "No records found"
"oro.datagrid.no.results": "No {{ entityHint }} was found to match your search. Try modifying your search criteria..."
"oro.datagrid.no.results": "No {{ entityHint }} were found to match your search. Try modifying your search criteria..."
"oro.datagrid.no.columns": "No columns configured for this grid"
"oro.datagrid.pagination.label": "Page"
"oro.datagrid.pagination.totalPages": "of {{ totalPages }}"
Expand Down Expand Up @@ -106,9 +106,7 @@ oro:
mass_action:
title: Mass Actions
delete:
selected_message: >
You have selected {{ selected }} records.<br/>
Are you sure you want to delete them?
selected_message: You have selected {{ selected }} record.<br/> Are you sure you want to delete it?|You have selected {{ selected }} records.<br/> Are you sure you want to delete them?
max_limit_message: >
The maximum number of records that can be deleted at once is {{ max_limit }}.<br/>
Are you sure you want to delete first {{ max_limit }} records in the selection?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"Item deleted": "Item deleted"
oro_datagrid:
no_data_hint %entityHint%: "No %entityHint% exists."
not_found_hint %entityHint%: "No %entityHint% was found to match your search. Try modifying your search criteria ..."
not_found_hint %entityHint%: "No %entityHint% were found to match your search. Try modifying your search criteria ..."
label_add_filter: Manage filters
label_loading_mask: "Loading . . ."
oro:
Expand Down
2 changes: 1 addition & 1 deletion src/Oro/Bundle/EmailBundle/Mailer/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function processSend($message, $emailOrigin)
}
$messageId = $message->getId();
if (!$this->mailer->send($message)) {
throw new \Swift_SwiftException('An email was not delivered.');
throw new \Swift_SwiftException('The email was not delivered.');
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/Oro/Bundle/EmailBundle/Resources/config/datagrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ datagrid:
mailbox: { data_name: eu.origin }
default: { receivedAt: %oro_datagrid.extension.orm_sorter.class%::DIRECTION_DESC }
options:
entityHint: email
entityHint: emails

simplified-email-grid:
extends: base-email-grid
Expand Down Expand Up @@ -346,7 +346,7 @@ datagrid:
className: 'email-row-is-readed'
callable: "@oro_email.helper.datagrid.emails->getReadedRowClosure"
options:
entityHint: email
entityHint: emails
toolbarOptions:
hide: true
pagination:
Expand Down Expand Up @@ -553,7 +553,7 @@ datagrid:
entity_pagination: true
action_configuration: "@oro_email.emailtemplate.datagrid_helper->getActionConfigurationClosure"
views_list : "@oro_email.emailtemplate.datagrid_view_list"
options: { entityHint: email template }
options: { entityHint: email templates }

base-mailboxes-grid:
source:
Expand Down Expand Up @@ -621,7 +621,7 @@ datagrid:
email-for-context-grid:
extends: email-grid
options:
entityHint: email
entityHint: emails
entity_pagination: true
toolbarOptions:
pageSize:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function invalidModelDataProvider()

/**
* @expectedException \Swift_SwiftException
* @expectedExceptionMessage An email was not delivered.
* @expectedExceptionMessage The email was not delivered.
*/
public function testProcessSendFailException()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ datagrid:
icon: trash
link: delete_link
options:
entityHint: embedded form
entityHint: embedded forms
entity_pagination: true
4 changes: 2 additions & 2 deletions src/Oro/Bundle/EntityBundle/Resources/config/datagrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ datagrid:
acl_resource: ~
options:
base_datagrid_class: Oro\Bundle\EntityBundle\Grid\CustomEntityDatagrid
entityHint: entity
entityHint: entities
export: true
entity_pagination: true
source:
Expand Down Expand Up @@ -63,7 +63,7 @@ datagrid:
entity-relation-grid:
acl_resource: ~
options:
entityHint: entity
entityHint: entities
routerEnabled: false
rowSelection:
dataField: id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ datagrid:
# Entity config entities grid
entityconfig-grid:
options:
entityHint: entity
entityHint: entities
toolbarOptions:
pageSize:
default_per_page: 100
Expand Down Expand Up @@ -130,7 +130,7 @@ datagrid:
# Audit entity log grid
entity-audit-grid:
options:
entityHint: history
entityHint: histories
acl_resource: oro_entityconfig_manage
source:
type: orm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Oro\Bundle\EntityConfigBundle\Entity\EntityConfigModel:
className:
- NotBlank: ~
- Regex:
pattern: "/^[a-z]+[a-z0-9]*$/i"
pattern: "/^([0-9]+[a-zA-Z]+|[a-zA-Z]+)[0-9a-zA-Z]*$/i"
message: "This value should contain only alphabetic symbols and numbers."
- oro_entity_extend:NotSqlKeyword: {groups: Sql}
- oro_entity_extend:NotPhpKeyword: {groups: Php}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ define([
var selectedChoiceLabel = '';
if (!_.isEmpty(this.choices)) {
var foundChoice = _.find(this.choices, function(choice) {
return (choice.value === value.type);
return String(choice.value) === String(value.type);
});
selectedChoiceLabel = foundChoice.label;
foundChoice = foundChoice || _.first(this.choices);
selectedChoiceLabel = _.result(foundChoice, 'label') || '';
}
var $filter = $(this.template({
name: this.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)

$resolver->setDefaults([
'encode' => true,
'attr' => [
'autocomplete' => 'new-password'
]
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ define(function(require) {

makeItemTemplate: function(propName, forSelection) {
var labelTpl = '_.escape(' + propName + ')';
var newLabel = __('oro.form.add_new');
if (forSelection) {
labelTpl = 'highlight(' + labelTpl + ')';
newLabel = __('oro.form.new');
}
return '<%= ' + labelTpl + ' %><% if (id === null) { %>' +
'<span class="select2__result-entry-info"> (' + __('oro.form.add_new') + ') </span><% } %>';
'<span class="select2__result-entry-info"> (' + newLabel + ') </span><% } %>';
}
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%= _.escape(fullName) %><% if (id === null) { %>
<span class="select2__result-entry-info">
(<%= _.__('oro.form.add_new') %>)
(<%= _.__('oro.form.new') %>)
</span>
<% } %>
8 changes: 6 additions & 2 deletions src/Oro/Bundle/ImapBundle/Form/Type/ConfigurationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,12 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'tooltip' => 'oro.imap.configuration.tooltip',
])
->add('password', 'password', [
'label' => 'oro.imap.configuration.password.label', 'required' => true,
'attr' => ['class' => 'check-connection']
'label' => 'oro.imap.configuration.password.label',
'required' => true,
'attr' => [
'class' => 'check-connection',
'autocomplete' => 'new-password'
]
]);
if ($options['add_check_button']) {
$builder->add('check_connection', 'oro_imap_configuration_check', [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ datagrid:
success: oro.integration.delete_sync_integration_window.success
action_configuration: Oro\Bundle\IntegrationBundle\Datagrid\ActionConfiguration::getIsSyncAvailableCondition()
options:
entityHint: channel
entityHint: channels
entity_pagination: true
mass_actions:
delete:
Expand Down
2 changes: 1 addition & 1 deletion src/Oro/Bundle/LocaleBundle/Resources/config/datagrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ datagrid:
base-oro-locale-localizations-grid:
acl_resource: oro_locale_localization_view
options:
entityHint: localization
entityHint: localizations
source:
type: orm
query:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ datagrid:

email-notification-grid:
options:
entityHint: transactional email
entityHint: transactional emails
entity_pagination: true
acl_resource: oro_notification_emailnotification_view
source:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ oro:

form:
choose_event: Choose an event...
recipient_list:
empty: At least one Recipient must be specified.

datagrid:
action:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
'subblocks': [{
'title': '',
'data': [
UI.renderHtmlProperty('', '* ' ~ 'oro.notification.form.recipient_list.empty'|trans),
form_widget(form.children.recipientList),
]
}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ datagrid:
business-unit-grid:
extended_entity_name: %oro_organization.business_unit.entity.class%
options:
entityHint: business unit
entityHint: business units
entity_pagination: true
source:
type: orm
Expand Down Expand Up @@ -184,7 +184,7 @@ datagrid:
lastName: %oro_datagrid.extension.orm_sorter.class%::DIRECTION_ASC

options:
entityHint: user
entityHint: users
rowSelection:
dataField: id
columnName: hasCurrentBusinessUnit
Expand All @@ -195,7 +195,7 @@ datagrid:
bu-view-users-grid:
extends: user-relation-grid
options:
entityHint: user
entityHint: users
acl_resource: oro_business_unit_view
source:
query:
Expand Down
2 changes: 1 addition & 1 deletion src/Oro/Bundle/ReportBundle/Resources/config/datagrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ datagrid:
launcherOptions:
className: 'no-hash mobile-hide'
options:
entityHint: report
entityHint: reports
2 changes: 1 addition & 1 deletion src/Oro/Bundle/SegmentBundle/Resources/config/datagrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ datagrid:
launcherOptions:
className: 'no-hash mobile-hide'
options:
entityHint: segment
entityHint: segments
Loading

0 comments on commit 1ae4f0f

Please sign in to comment.