Revert "[FIX] web: remove ­ when saving phone number"
This reverts commit b8b0f947bf.
This commit is contained in:
@@ -998,21 +998,6 @@ var FieldPhone = FieldEmail.extend({
|
||||
// important right now.
|
||||
this.$el.removeClass('o_text_overflow');
|
||||
},
|
||||
* Remove possibly present ­ characters when saving number
|
||||
*
|
||||
* @override
|
||||
* @private
|
||||
*/
|
||||
_setValue: function (value, options) {
|
||||
// NOT NEEDED AS OF SAAS-11.3
|
||||
if (value) {
|
||||
// remove possibly pasted ­ characters
|
||||
value = value.replace(/\u00AD/g, '');
|
||||
}
|
||||
return this._super(value, options);
|
||||
},
|
||||
|
||||
/**
|
||||
});
|
||||
|
||||
var UrlWidget = InputField.extend({
|
||||
|
||||
@@ -3145,7 +3145,7 @@ QUnit.module('basic_fields', {
|
||||
QUnit.module('PhoneWidget');
|
||||
|
||||
QUnit.test('phone field in form view on extra small screens', function (assert) {
|
||||
assert.expect(8);
|
||||
assert.expect(7);
|
||||
|
||||
var form = createView({
|
||||
View: FormView,
|
||||
@@ -3192,15 +3192,6 @@ QUnit.module('basic_fields', {
|
||||
assert.strictEqual($phoneLink.attr('href'), 'tel:new',
|
||||
"should still have proper tel prefix");
|
||||
|
||||
// NOT NEEDED AS OF SAAS-11.3
|
||||
// save phone with ­ and verify it is removed
|
||||
form.$buttons.find('.o_form_button_edit').click();
|
||||
form.$('input[type="text"].o_field_widget').val('h\u00ADi').trigger('input');
|
||||
form.$buttons.find('.o_form_button_save').click();
|
||||
$phoneLink = form.$('a.o_form_uri.o_field_widget');
|
||||
assert.strictEqual($phoneLink.attr('href'), 'tel:hi',
|
||||
"U+00AD should have been removed");
|
||||
|
||||
form.destroy();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user