Merge branch 'migrate-to-catalogue-util-library_#19764' of https://code-repo.d4science.org/gCubeSystem/ckan-metadata-publisher-widget.git into migrate-to-catalogue-util-library_#19764
This commit is contained in:
commit
2c69842452
|
@ -11,6 +11,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
[#19764] Porting ckan-metadata-publisher-widget to catalogue-util-library
|
||||
[#20680] Ported to SHUB
|
||||
[#19568] Unify and extend the tags allowed values
|
||||
[#20828] Revisited title size and format
|
||||
|
||||
|
||||
## [v1.6.2] - 2021-02-08
|
||||
|
|
|
@ -167,7 +167,7 @@ public class CreateDatasetForm extends Composite{
|
|||
// Create a remote service proxy to talk to the server-side ckan service.
|
||||
private final CKanPublisherServiceAsync ckanServices = GWT.create(CKanPublisherService.class);
|
||||
|
||||
private static final String REGEX_TITLE_PRODUCT_SUBWORD = "[^a-zA-Z0-9_.-]";
|
||||
//private static final String REGEX_TITLE_PRODUCT_SUBWORD = "[^a-zA-Z0-9_.-]";
|
||||
private static final String REGEX_MAIL = "\\b[\\w.%-]+@[-.\\w]+\\.[A-Za-z]{2,4}\\b";
|
||||
private static final String NONE_PROFILE = "none";
|
||||
|
||||
|
@ -1381,17 +1381,23 @@ public class CreateDatasetForm extends Composite{
|
|||
productTitleGroup.setType(ControlGroupType.ERROR);
|
||||
return "Missing title";
|
||||
}
|
||||
|
||||
if(title.length()<2) {
|
||||
productTitleGroup.setType(ControlGroupType.ERROR);
|
||||
return "The field title is too short";
|
||||
}
|
||||
|
||||
// better check for the title
|
||||
String[] splittedTitle = title.split(" ");
|
||||
//String[] splittedTitle = title.split(" ");
|
||||
|
||||
/* No check, see #20828
|
||||
for (String word : splittedTitle) {
|
||||
String replaced = word.replaceAll(REGEX_TITLE_PRODUCT_SUBWORD, "");
|
||||
if(!replaced.equals(word)){
|
||||
productTitleGroup.setType(ControlGroupType.ERROR);
|
||||
return "Please note not all characters are allowed for the title";
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// email reg expression
|
||||
String maintainerMail = maintainerEmailTextbox.getText();
|
||||
|
|
|
@ -48,7 +48,7 @@ public class TagsPanel extends Composite{
|
|||
@UiField ListBox tagsEnterListBox;
|
||||
|
||||
// regular expression for tags
|
||||
private static final String REGEX_TAG = "^[a-zA-Z0-9]*$";
|
||||
private static final String REGEX_TAG = "^[a-zA-Z0-9._-]*$";
|
||||
|
||||
// tags list
|
||||
private List<String> tagsList = new ArrayList<String>();
|
||||
|
|
|
@ -26,7 +26,7 @@ public class InfoIconsLabels {
|
|||
public static final String TAGS_INFO_ID_POPUP = "tags-popup-panel-info";
|
||||
public static final String TAGS_INFO_CAPTION = "Tags";
|
||||
public static final String TAGS_INFO_TEXT = "Tags are meaningful information that can be associated to the "
|
||||
+ "item and by means of them it can be retrieved. A tag can contain only alphanumeric characters. "
|
||||
+ "item and by means of them it can be retrieved. A tag can contain only alphanumeric characters or symbols . (dot) - (hyphen minus) _ (underscore)."
|
||||
+ "If the tag is composed by a single word it must have a size of at least two characters."
|
||||
+ "Examples of good tags: \"This is a sample tag\", \"tagY\". Example of bad tag: \"c\"."
|
||||
+ " You must push ENTER for attaching a tag, or use the provided list of predefined tags. In the latter case"
|
||||
|
@ -80,7 +80,7 @@ public class InfoIconsLabels {
|
|||
|
||||
// TITLE
|
||||
public static final String TITLE_INFO_ID_POPUP = "title-popup-panel-info";
|
||||
public static final String TITLE_INFO_TEXT = "Item Title must contain only alphanumer characters, dots, underscore or hyphen minus. No others symbols are allowed. Please note that this field will be always visible, despite the item's visibility.";
|
||||
public static final String TITLE_INFO_TEXT = "The title of the item. Please note that this field will be always visible, despite the item's visibility.";
|
||||
public static final String TITLE_INFO_CAPTION = "Item Title";
|
||||
|
||||
// DESCRIPTION
|
||||
|
|
Loading…
Reference in New Issue