@@ -32,6 +32,12 @@ | |||
var type = newDiv.find('#item_type').val(); | |||
var url = newDiv.find('#item_url').val(); | |||
// Try to strip out the ID from the url | |||
var pattern = '(?:(?:.+)\\/)?([^\\?]+)(?:\\?(?:.*))?'; | |||
var reg = new RegExp(pattern); | |||
var match = reg.exec(url); | |||
url = match[1]; | |||
// First Validation | |||
if (title == null || title == '') { | |||
newDiv.find("#item_error").show(); |
@@ -61,8 +61,8 @@ | |||
</div> | |||
<div class="row"> | |||
<div class="form-group col-sm-12"> | |||
<label for="item_url"><h4>URL Id</h4></label> | |||
<input class="form-control" name="item_url" id="item_url" placeholder="XXXXX" title="enter the url id for the item" type="text" /> | |||
<label for="item_url"><h4>Url or Id</h4></label> | |||
<input class="form-control" name="item_url" id="item_url" placeholder="https://service.teknik.io/XXXXX or XXXXX" title="enter the url id for the item" type="text" /> | |||
</div> | |||
</div> | |||
</div> |
@@ -69,7 +69,7 @@ namespace Teknik | |||
catch (Exception ex) | |||
{ | |||
// Just log it | |||
Logging.Logger.WriteEntry(ex); | |||
Logging.Logger.WriteEntry(Logging.LogLevel.Warning, "Error in Application_EndRequest", ex); | |||
} | |||
} | |||