Skip to content

Commit

Permalink
MID-2239 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Suta committed Feb 27, 2015
1 parent bf56638 commit 44144b6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
Expand Up @@ -35,6 +35,7 @@ <h3 style="margin-left: 20px;">
<div class="form-group">
<label class="col-lg-4 control-label">
<wicket:message key="SystemConfigPanel.title.userTemplate"/>
<i wicket:id="userTemplateDeprecatedWarning" wicket:message="title:SystemConfigPanel.deprecated.objectPolicy"/>
</label>
<div wicket:id="userTemplateChooser" />
</div>
Expand Down
Expand Up @@ -54,6 +54,7 @@ public class SystemConfigPanel extends SimplePanel<SystemConfigurationDto> {
private static final String ID_CLEANUP_CLOSED_TASKS = "closedTasksCleanup";
private static final String ID_CLEANUP_AUDIT_RECORDS_TOOLTIP = "auditRecordsCleanupTooltip";
private static final String ID_CLEANUP_CLOSED_TASKS_TOOLTIP = "closedTasksCleanupTooltip";
private static final String ID_OBJECT_POLICY_DEPRECATED_WARNING = "userTemplateDeprecatedWarning";

private static final String ID_DEFAULT_FROM = "defaultFrom";
private static final String ID_DEBUG = "debugCheckbox";
Expand Down Expand Up @@ -99,6 +100,16 @@ protected void initLayout(){
form.add(passPolicyChoosePanel);
form.add(userTemplateChoosePanel);

Label objectPolicyDeprecationWarningTooltip = new Label(ID_OBJECT_POLICY_DEPRECATED_WARNING);
objectPolicyDeprecationWarningTooltip.add(new InfoTooltipBehavior(){

@Override
public String getCssClass() {
return "fa fa-fw fa-exclamation-triangle text-danger";
}
});
form.add(objectPolicyDeprecationWarningTooltip);

ObjectPolicyConfigurationEditor objectPolicyEditor = new ObjectPolicyConfigurationEditor(ID_OBJECT_POLICY_EDITOR,
new PropertyModel<List<ObjectPolicyConfigurationTypeDto>>(getModel(), SystemConfigurationDto.F_OBJECT_POLICY_LIST));
form.add(objectPolicyEditor);
Expand Down
Expand Up @@ -41,4 +41,5 @@ SystemConfigPanel.mail.transportSecurity=Transport security
SystemConfigPanel.notification.redirectToFile=Redirect to file
SystemConfigPanel.notification.redirectToFile.placeholder=Filename
SystemConfigPanel.tooltip.duration=Format: P[n][p], n-number, p-period (d - days, m - months, ...), P3M - cleanup every 3 months
SystemConfigPanel.deprecated.objectPolicy=This part of configuration is deprecated. It is kept here for compatibility purposes. Please, use the component below to define object policies.
mainForm.mailServer.nullValid=Choose One
Expand Up @@ -51,11 +51,18 @@ public String getModalContainer(Component component) {
public void onConfigure(Component component) {
super.onConfigure(component);

component.add(AttributeModifier.replace("class", "fa fa-fw fa-info-circle text-info"));
component.add(AttributeModifier.replace("class", getCssClass()));
}

@Override
public boolean isInsideModal() {
return isContainerModal;
}

/**
* Override to provide custom css class (image, icon) for the tooltip
* */
public String getCssClass(){
return "fa fa-fw fa-info-circle text-info";
}
}

0 comments on commit 44144b6

Please sign in to comment.