Commit b41f43d6 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

novalidate

parent 110851ef
......@@ -420,11 +420,17 @@ var STWkit;
self.forcingmodel = forcingmodel;
var showforwardbackward = (options && options.hasOwnProperty('forwardbackward')) ? options.forwardbackward : true;
var form = L.DomUtil.create('form', 'uk-form uk-form-stacked', periodDiv);
form.setAttribute('novalidate', '');
form.onsubmit = function (e) {
e.preventDefault();
e.stopPropagation();
return false;
};
form.onkeypress = function (e) {
var key = e.charCode || e.keyCode || 0;
if (key == 13)
e.preventDefault();
};
self.datetimeFormat = 'YYYY-MM-DD HH:mm';
self.dateFormat = 'YYYY-MM-DD';
self.timeFormat = 'HH:mm';
......@@ -793,11 +799,17 @@ var STWkit;
}
self.startDiv = L.DomUtil.create('div', 'uk-width-medium-1-1 uk-container-center uk-margin-top', this.container);
var startform = L.DomUtil.create('form', 'uk-form uk-form-stacked', self.startDiv);
startform.setAttribute('novalidate', '');
startform.onsubmit = function (e) {
e.preventDefault();
e.stopPropagation();
return false;
};
startform.onkeypress = function (e) {
var key = e.charCode || e.keyCode || 0;
if (key == 13)
e.preventDefault();
};
var fieldset = L.DomUtil.create('fieldset', '', startform);
var calculationRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
addLabelDiv(calculationRowDiv, "Calculation mode", "See more information <a style='color:#faa732;' href='help/classic/#object-fo-calculationmode' target='_blank'>here</a>");
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -474,11 +474,16 @@ module STWkit {
var showforwardbackward = (options && options.hasOwnProperty('forwardbackward'))?options.forwardbackward:true;
var form = <HTMLFormElement>L.DomUtil.create('form', 'uk-form uk-form-stacked', periodDiv);
form.setAttribute('novalidate', '');
form.onsubmit = function (e) {
e.preventDefault();
e.stopPropagation();
return false;
};
form.onkeypress = function(e) {
var key = e.charCode || e.keyCode || 0;
if (key == 13) e.preventDefault();
};
self.datetimeFormat = 'YYYY-MM-DD HH:mm';
self.dateFormat = 'YYYY-MM-DD';
self.timeFormat = 'HH:mm';
......@@ -886,11 +891,16 @@ module STWkit {
}
self.startDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-width-medium-1-1 uk-container-center uk-margin-top', this.container);
var startform = <HTMLFormElement>L.DomUtil.create('form', 'uk-form uk-form-stacked', self.startDiv);
startform.setAttribute('novalidate', '');
startform.onsubmit = function(e){
e.preventDefault();
e.stopPropagation();
return false;
};
startform.onkeypress = function(e) {
var key = e.charCode || e.keyCode || 0;
if (key == 13) e.preventDefault();
};
var fieldset = <HTMLFieldSetElement>L.DomUtil.create('fieldset', '', startform);
var calculationRowDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-row', fieldset);
addLabelDiv(calculationRowDiv, "Calculation mode", "See more information <a style='color:#faa732;' href='help/classic/#object-fo-calculationmode' target='_blank'>here</a>");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment