Use the appropriate type for email and url widgets

issue9522
review327811002
This commit is contained in:
David Harper
2021-04-23 20:25:05 +02:00
parent bea86d9d50
commit f6e6a45138
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
* Use appropriate types for email and url widgets
* Add completion on xxx2Many and Dict
* Add attachment preview
* Support document widget
+5
View File
@@ -4229,6 +4229,7 @@ function eval_pyson(value){
class_: 'form-url',
init: function(view, attributes) {
Sao.View.Form.URL._super.init.call(this, view, attributes);
this.input.attr('type', 'url');
this.button = jQuery('<a/>', {
'class': 'btn btn-default',
'target': '_blank',
@@ -4284,6 +4285,10 @@ function eval_pyson(value){
Sao.View.Form.Email = Sao.class_(Sao.View.Form.URL, {
class_: 'form-email',
init: function(view, attributes) {
Sao.View.Form.Email._super.init.call(this, view, attributes);
this.input.attr('type', 'email');
},
set_url: function(value) {
Sao.View.Form.Email._super.set_url.call(this, 'mailto:' + value);
}