[FIX] web, google_drive: fixed display of field link
Before this commit, a field handled with a widget url was given its value (href) as its text, fully displaying the url. Moreover, the display was odd and did not match that of buttons After this commit, if the field contains a text attribute, we use is as the text of the link. The link also correctly displays and looks like a button (in a form view) Of course, a test for this new field widget feature is implemented closes #19587
This commit is contained in:
@@ -1049,7 +1049,7 @@ var UrlWidget = InputField.extend({
|
||||
* @private
|
||||
*/
|
||||
_renderReadonly: function () {
|
||||
this.$el.text(this.value)
|
||||
this.$el.text(this.attrs.text || this.value)
|
||||
.addClass('o_form_uri o_text_overflow')
|
||||
.attr('href', this.value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user