Skip to content

Commit 4c4982f

Browse files
committed
minimal fixes for the 8.9.1
1 parent dc669b4 commit 4c4982f

34 files changed

+56
-6
lines changed

logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/validators/SimpleTextValidator.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
import com.smartgwt.client.widgets.form.validator.RegExpValidator;
55

66
/**
7-
* Tipical validator for codes, you can use only alfanumeric chars plus the
8-
* underscore
7+
* Tipical validator for codes, you can use only alfanumeric chars plus the -
98
*
109
* @author Marco Meschieri - LogicalDOC
1110
* @since 6.0
@@ -14,6 +13,6 @@ public class SimpleTextValidator extends RegExpValidator {
1413
public SimpleTextValidator() {
1514
super();
1615
setErrorMessage(I18N.message("simpetextinvalid"));
17-
setExpression("^([a-zA-Z0-9]+)$");
16+
setExpression("^([a-zA-Z0-9 \\-]+)$");
1817
}
1918
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.logicaldoc.gui.common.client.validators;
2+
3+
import com.logicaldoc.gui.common.client.i18n.I18N;
4+
import com.smartgwt.client.widgets.form.validator.RegExpValidator;
5+
6+
/**
7+
* Tipical validator for tempalte names
8+
*
9+
* @author Marco Meschieri - LogicalDOC
10+
* @since 8.9.1
11+
*/
12+
public class TemplateNameTextValidator extends RegExpValidator {
13+
public TemplateNameTextValidator() {
14+
super();
15+
setErrorMessage(I18N.message("tempaltenameinvalid"));
16+
setExpression("^([a-zA-Z0-9]+)$");
17+
}
18+
}

logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/metadata/template/TemplatePropertiesPanel.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.logicaldoc.gui.common.client.util.ItemFactory;
1616
import com.logicaldoc.gui.common.client.util.LD;
1717
import com.logicaldoc.gui.common.client.util.Util;
18+
import com.logicaldoc.gui.common.client.validators.TemplateNameTextValidator;
1819
import com.logicaldoc.gui.frontend.client.services.AttributeSetService;
1920
import com.logicaldoc.gui.frontend.client.services.TemplateService;
2021
import com.smartgwt.client.types.PickerIconName;
@@ -694,6 +695,7 @@ private void prepareTemplateForm() {
694695

695696
TextItem name = ItemFactory.newSimpleTextItem("name", template.getName());
696697
name.setRequired(true);
698+
name.setValidators(new TemplateNameTextValidator());
697699
name.setDisabled(template.isReadonly() || !template.isWrite());
698700
if (!template.isReadonly() && template.isWrite())
699701
name.addChangedHandler(changedHandler);

logicaldoc-i18n/src/main/resources/i18n/messages.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3074,4 +3074,5 @@ department = Department
30743074
sloenabled = Single Log Out enabled
30753075
logoutrequestsigned = Log out requests sent by this SP will be encrypted
30763076
logoutresponsesigned = Log out responses sent by this SP will be encrypted
3077-
candidates = Candidates
3077+
candidates = Candidates
3078+
tempaltenameinvalid = Use alphanumeric chars only

logicaldoc-i18n/src/main/resources/i18n/messages_ar.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3075,3 +3075,4 @@ sloenabled = Single Log Out enabled
30753075
logoutrequestsigned = Log out requests sent by this SP will be encrypted
30763076
logoutresponsesigned = Log out responses sent by this SP will be encrypted
30773077
candidates = Candidates
3078+
tempaltenameinvalid = Use alphanumeric chars only

logicaldoc-i18n/src/main/resources/i18n/messages_bg.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3075,3 +3075,4 @@ sloenabled = Single Log Out enabled
30753075
logoutrequestsigned = Log out requests sent by this SP will be encrypted
30763076
logoutresponsesigned = Log out responses sent by this SP will be encrypted
30773077
candidates = Candidates
3078+
tempaltenameinvalid = Use alphanumeric chars only

logicaldoc-i18n/src/main/resources/i18n/messages_cs.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3075,3 +3075,4 @@ sloenabled = Single Log Out enabled
30753075
logoutrequestsigned = Log out requests sent by this SP will be encrypted
30763076
logoutresponsesigned = Log out responses sent by this SP will be encrypted
30773077
candidates = Candidates
3078+
tempaltenameinvalid = Use alphanumeric chars only

logicaldoc-i18n/src/main/resources/i18n/messages_da.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3075,3 +3075,4 @@ sloenabled = Single Log Out enabled
30753075
logoutrequestsigned = Log out requests sent by this SP will be encrypted
30763076
logoutresponsesigned = Log out responses sent by this SP will be encrypted
30773077
candidates = Candidates
3078+
tempaltenameinvalid = Use alphanumeric chars only

logicaldoc-i18n/src/main/resources/i18n/messages_de.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3075,3 +3075,4 @@ sloenabled = Single Log Out enabled
30753075
logoutrequestsigned = Log out requests sent by this SP will be encrypted
30763076
logoutresponsesigned = Log out responses sent by this SP will be encrypted
30773077
candidates = Candidates
3078+
tempaltenameinvalid = Use alphanumeric chars only

logicaldoc-i18n/src/main/resources/i18n/messages_el.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3075,3 +3075,4 @@ sloenabled = Single Log Out enabled
30753075
logoutrequestsigned = Log out requests sent by this SP will be encrypted
30763076
logoutresponsesigned = Log out responses sent by this SP will be encrypted
30773077
candidates = Candidates
3078+
tempaltenameinvalid = Use alphanumeric chars only

0 commit comments

Comments
 (0)