Creates project from URL when press ENTER (#2444)

* Creates project from URL when press ENTER

solves #2437

* Added submit action
This commit is contained in:
Ekta Mishra 2020-03-21 03:05:40 +05:30 committed by GitHub
parent f8adf29df6
commit bf8af23493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -3,6 +3,6 @@
<tr bind="urlRow"><td colspan="2"><input bind="urlInput" name="download" class="default-importing-web-url" /></td></tr>
<tr bind="buttons">
<td width="1"><button bind="addButton" class="button" type="button"></button></td>
<td><button bind="nextButton" class="button button-primary" type="button"></button></td>
<td><button type="submit" bind="nextButton" class="button button-primary" type="button"></button></td>
</tr>
</table></div></form>

View File

@ -89,7 +89,8 @@ UrlImportingSourceUI.prototype.attachUI = function(bodyDiv) {
this._elmts.addButton.html($.i18n('core-buttons/add-url'));
this._elmts.nextButton.html($.i18n('core-buttons/next'));
this._elmts.nextButton.click(function(evt) {
this._elmts.form.submit(function(evt){
evt.preventDefault();
if(!isUrlValid(self._elmts.urlInput[0].value)) {
window.alert($.i18n('core-index-import/warning-web-address'));
} else {