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:
parent
f8adf29df6
commit
bf8af23493
@ -3,6 +3,6 @@
|
|||||||
<tr bind="urlRow"><td colspan="2"><input bind="urlInput" name="download" class="default-importing-web-url" /></td></tr>
|
<tr bind="urlRow"><td colspan="2"><input bind="urlInput" name="download" class="default-importing-web-url" /></td></tr>
|
||||||
<tr bind="buttons">
|
<tr bind="buttons">
|
||||||
<td width="1"><button bind="addButton" class="button" type="button"></button></td>
|
<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>
|
</tr>
|
||||||
</table></div></form>
|
</table></div></form>
|
@ -88,8 +88,9 @@ UrlImportingSourceUI.prototype.attachUI = function(bodyDiv) {
|
|||||||
$('#or-import-enterurl').text($.i18n('core-index-import/enter-url'));
|
$('#or-import-enterurl').text($.i18n('core-index-import/enter-url'));
|
||||||
this._elmts.addButton.html($.i18n('core-buttons/add-url'));
|
this._elmts.addButton.html($.i18n('core-buttons/add-url'));
|
||||||
this._elmts.nextButton.html($.i18n('core-buttons/next'));
|
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)) {
|
if(!isUrlValid(self._elmts.urlInput[0].value)) {
|
||||||
window.alert($.i18n('core-index-import/warning-web-address'));
|
window.alert($.i18n('core-index-import/warning-web-address'));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user