Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Evolveum/midpoint
Browse files Browse the repository at this point in the history
Conflicts:
	gui/admin-gui/src/main/resources/localization/Midpoint.properties
  • Loading branch information
katkav committed Apr 12, 2016
2 parents c005e5e + 6149ac9 commit b544c7b
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 6 deletions.
Expand Up @@ -17,11 +17,12 @@
<wicket:panel xmlns:wicket="http://wicket.apache.org">

<div class="form-inline search-form">

<div class="row">
<div class="form-group col-md-12">
<label><wicket:message key="roleMemberPanel.type" /></label>
<select class="form-control input-sm" wicket:id="type" />
</div>
</div>
<div wicket:id="countContainer">
<div class="form-group col-md-3">
<label><wicket:message key="typedAssignablePanel.selectedResources" /></label>
Expand Down
Expand Up @@ -83,6 +83,7 @@ public class MultipleAssignmentSelectorPanel<F extends FocusType, H extends Focu
private List<OrgType> tenantEditorObject = new ArrayList<>();
private List<OrgType> orgEditorObject = new ArrayList<>();
private PrismObject<UserType> user;
private ObjectQuery dataProviderQuery;
private ObjectFilter authorizedRolesFilter = null;
private IModel<ObjectFilter> filterModel = null;
private static final Trace LOGGER = TraceManager.getTrace(MultipleAssignmentSelectorPanel.class);
Expand Down Expand Up @@ -223,22 +224,31 @@ private void deleteFromAssignmentsModel(AjaxRequestTarget target, MultipleAssign
}

public ObjectDataProvider getAvailableAssignmentsDataProvider() {
return new ObjectDataProvider<AssignmentEditorDto, F>(this, type) {
ObjectDataProvider<AssignmentEditorDto, F> provider = new ObjectDataProvider<AssignmentEditorDto, F>(this, type) {

@Override
public AssignmentEditorDto createDataObjectWrapper(PrismObject<F> obj) {
return AssignmentEditorDto.createDtoFromObject(obj.asObjectable(), UserDtoStatus.MODIFY, getPageBase());
}

@Override
public void setQuery(ObjectQuery query) {
super.setQuery(query);
dataProviderQuery = query;
}

@Override
public ObjectQuery getQuery() {
ObjectQuery query = new ObjectQuery();
if (dataProviderQuery == null){
dataProviderQuery = new ObjectQuery();
}
if (filterModel != null && filterModel.getObject() != null){
query.addFilter(filterModel.getObject());
dataProviderQuery.addFilter(filterModel.getObject());
}
return query;
return dataProviderQuery;
}
};
return provider;
}

private IModel<ObjectFilter> getFilterModel(){
Expand Down
Expand Up @@ -27,10 +27,12 @@
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType;
import org.apache.commons.lang.StringUtils;
import org.apache.wicket.AttributeModifier;
import org.apache.wicket.Component;
import org.apache.wicket.MarkupContainer;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.behavior.Behavior;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.DropDownChoice;
Expand Down Expand Up @@ -366,6 +368,14 @@ protected void onUpdate(AjaxRequestTarget target) {
//nothing to do, just update model data
}
});
input.add(new Behavior() {
@Override
public void bind(Component component) {
super.bind( component );

component.add( AttributeModifier.replace( "onkeydown", Model.of( "if(event.keyCode == 13) {event.preventDefault();}" ) ) );
}
});
input.setOutputMarkupId(true);
add(input);
}
Expand Down
Expand Up @@ -38,6 +38,7 @@
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink;
import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.behavior.Behavior;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.CheckBox;
Expand All @@ -48,6 +49,7 @@
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.util.time.Duration;

Expand Down Expand Up @@ -331,6 +333,15 @@ public boolean isVisible() {
propList.add(properties);

TextField addText = new TextField(ID_ADD_TEXT, new PropertyModel(moreDialogModel, MoreDialogDto.F_NAME_FILTER));
addText.add(new Behavior() {
@Override
public void bind(Component component) {
super.bind( component );

component.add( AttributeModifier.replace( "onkeydown", Model.of("if(event.keyCode == 13) {event.preventDefault();}") ) );
}
});

popover.add(addText);
addText.add(new AjaxFormComponentUpdatingBehavior("keyup") {

Expand Down
Expand Up @@ -3001,7 +3001,7 @@ ChangePasswordPanel.enabled=Enabled
ChangePasswordPanel.legendMessage.selected= - Password will be changed
ChangePasswordPanel.legendMessage.propagated= - Automatic password propagation (based on policies defined in resources definitions)
ChangePasswordPanel.legendMessage.deselected= - Password will not be changed
ChangePasswordPanel.helpInfo=<p>This portion of the credentials dialog controls how the password change will be propagated to each individual system. The first line defines whether the password will be changes in the midPoint itself. Following lines represent each system for which the password can be changed. The password propagation is controlled by the icons:</p><ul><li><span class="fa fa-check-square-o"/> Password will be changed. Password for this system will be changed to the value specified in the password dialog above.</li><li><span class="fa fa-sign-out"/> Automatic password propagation. The password might be changed. Whether the password is changed or not depends on the policies set up by identity administrator. This usually means that the password will be changed if it makes sense for the current situation and settings. This is the reasonable default choice.)</li><li><span class="fa fa-square-o"/> Password will not be changed for this system.</li></ul><p>You can adjust the password propagation settings by clicking on the icons and thus fine-tune how the password change is propagated to each individual system.</p>
ChangePasswordPanel.helpInfo=<p>This portion of the credentials dialog controls how the password change will be propagated to each individual system. The first line defines whether the password will be changes in the midPoint itself. Following lines represent each system for which the password can be changed. The password propagation is controlled by the icons:</p><ul><li><span class="fa fa-check-square-o"/> Password will be changed. Password for this system will be changed to the value specified in the password dialog above.</li><li><span class="fa fa-sign-out"/> Automatic password propagation. The password might be changed. Whether the password is changed or not depends on the policies set up by identity administrator. This usually means that the password will be changed if it makes sense for the current situation and settings. This is the reasonable default choice.</li><li><span class="fa fa-square-o"/> Password will not be changed for this system.</li></ul><p>You can adjust the password propagation settings by clicking on the icons and thus fine-tune how the password change is propagated to each individual system.</p>
ChangePasswordPanel.helpPopupTitle=Password propagation help
PageBase.button.tooltip.clearSearch=Clear
mainForm.uploadTooLarge = Upload must be less than ${maxSize}.
Expand Down Expand Up @@ -3133,3 +3133,5 @@ ReportCreateHandlerPanel.downloadCreatedReport=Download created report
ReportCreateHandlerPanel.reportParameters=Report parameters
OperationResultPanel.showTask=(show task)
PageResources.inlineMenuItem.test=Test
PageRequestRole.title=Request a role

0 comments on commit b544c7b

Please sign in to comment.