diff --git a/Oqtane.Client/Modules/Admin/ModuleDefinitions/Create.razor b/Oqtane.Client/Modules/Admin/ModuleDefinitions/Create.razor
index bcb78bc5..13e89847 100644
--- a/Oqtane.Client/Modules/Admin/ModuleDefinitions/Create.razor
+++ b/Oqtane.Client/Modules/Admin/ModuleDefinitions/Create.razor
@@ -42,29 +42,32 @@
-
-
-
-
-
-
- @if (!string.IsNullOrEmpty(_location))
+ @if (_type == "External")
{
-
+
-
+
+ @if (!string.IsNullOrEmpty(_location))
+ {
+
+ }
}
@@ -80,9 +83,10 @@
private string _description = string.Empty;
private List _templates;
private string _template = "-";
+ private string _minversion = "2.0.0";
+ private string _type = "External";
private string[] _versions;
private string _reference = "local";
- private string _minversion = "2.0.0";
private string _location = string.Empty;
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Host;
@@ -153,7 +157,7 @@
private bool IsValid(string name)
{
// must contain letters, underscores and digits and first character must be letter or underscore
- return !string.IsNullOrEmpty(name) && name.ToLower() != "module" && !name.ToLower().Contains("oqtane") && Regex.IsMatch(name, "^[A-Za-z_][A-Za-z0-9_]*$");
+ return !string.IsNullOrEmpty(name) && name.ToLower() != "module" && !name.ToLower().Contains("oqtane") && Regex.IsMatch(name, "^[A-Za-z_][A-Za-z0-9_.]*$");
}
private bool IsValidXML(string description)
@@ -165,11 +169,16 @@
private void TemplateChanged(ChangeEventArgs e)
{
_template = (string)e.Value;
- _minversion = "2.0.0";
if (_template != "-")
{
var template = _templates.FirstOrDefault(item => item.Name == _template);
_minversion = template.Version;
+ _type = template.Type;
+ }
+ else
+ {
+ _minversion = "2.0.0";
+ _type = "External";
}
GetLocation();
}
diff --git a/Oqtane.Client/Modules/Admin/Themes/Create.razor b/Oqtane.Client/Modules/Admin/Themes/Create.razor
index 127a0415..7c1025c7 100644
--- a/Oqtane.Client/Modules/Admin/Themes/Create.razor
+++ b/Oqtane.Client/Modules/Admin/Themes/Create.razor
@@ -36,30 +36,33 @@
-
-
-
-
-
-
- @if (!string.IsNullOrEmpty(_location))
- {
-
- }
+ @if (_type == "External")
+ {
+
+
+
+
+
+
+ @if (!string.IsNullOrEmpty(_location))
+ {
+
+ }
+ }
@@ -71,9 +74,10 @@
private string _theme = string.Empty;
private List _templates;
private string _template = "-";
+ private string _minversion = "2.0.0";
+ private string _type = "External";
private string[] _versions;
private string _reference = "local";
- private string _minversion = "2.0.0";
private string _location = string.Empty;
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Host;
@@ -125,17 +129,22 @@
private bool IsValid(string name)
{
// must contain letters, underscores and digits and first character must be letter or underscore
- return !string.IsNullOrEmpty(name) && name.ToLower() != "theme" && !name.ToLower().Contains("oqtane") && Regex.IsMatch(name, "^[A-Za-z_][A-Za-z0-9_]*$");
+ return !string.IsNullOrEmpty(name) && name.ToLower() != "theme" && !name.ToLower().Contains("oqtane") && Regex.IsMatch(name, "^[A-Za-z_][A-Za-z0-9_.]*$");
}
private void TemplateChanged(ChangeEventArgs e)
{
_template = (string)e.Value;
- _minversion = "2.0.0";
if (_template != "-")
{
var template = _templates.FirstOrDefault(item => item.Name == _template);
_minversion = template.Version;
+ _type = template.Type;
+ }
+ else
+ {
+ _minversion = "2.0.0";
+ _type = "External";
}
GetLocation();
}