Fixed html5 input type attribute for phone, it's tel (not phone).

This commit is contained in:
Martin Edenhofer 2016-05-29 20:03:00 +02:00
parent d3ec647189
commit 9e52358d57
4 changed files with 113 additions and 7 deletions

View file

@ -64,7 +64,7 @@ class Items extends App.ControllerContent
itemsToChange = [] itemsToChange = []
for item in App.ObjectManagerAttribute.search(sortBy: 'object') for item in App.ObjectManagerAttribute.search(sortBy: 'object')
if item.to_create is true || item.to_delete is true if item.to_create is true || item.to_delete is true || item.to_migrate is true || item.to_config is true
itemsToChange.push item itemsToChange.push item
@html App.view('object_manager/index')( @html App.view('object_manager/index')(

View file

@ -216,7 +216,7 @@ class ObjectManagerUpdateUser < ActiveRecord::Migration
display: 'Phone', display: 'Phone',
data_type: 'input', data_type: 'input',
data_option: { data_option: {
type: 'phone', type: 'tel',
maxlength: 100, maxlength: 100,
null: true, null: true,
item_class: 'formGroup--halfSize', item_class: 'formGroup--halfSize',
@ -251,7 +251,7 @@ class ObjectManagerUpdateUser < ActiveRecord::Migration
display: 'Mobile', display: 'Mobile',
data_type: 'input', data_type: 'input',
data_option: { data_option: {
type: 'phone', type: 'tel',
maxlength: 100, maxlength: 100,
null: true, null: true,
item_class: 'formGroup--halfSize', item_class: 'formGroup--halfSize',
@ -286,7 +286,7 @@ class ObjectManagerUpdateUser < ActiveRecord::Migration
display: 'Fax', display: 'Fax',
data_type: 'input', data_type: 'input',
data_option: { data_option: {
type: 'phone', type: 'tel',
maxlength: 100, maxlength: 100,
null: true, null: true,
item_class: 'formGroup--halfSize', item_class: 'formGroup--halfSize',

View file

@ -6,5 +6,111 @@ class UpdateObjectManager2 < ActiveRecord::Migration
add_column :object_manager_attributes, :to_config, :boolean, null: false, default: false add_column :object_manager_attributes, :to_config, :boolean, null: false, default: false
add_column :object_manager_attributes, :data_option_new, :string, limit: 8000, null: true, default: false add_column :object_manager_attributes, :data_option_new, :string, limit: 8000, null: true, default: false
UserInfo.current_user_id = 1
ObjectManager::Attribute.add(
force: true,
object: 'User',
name: 'phone',
display: 'Phone',
data_type: 'input',
data_option: {
type: 'tel',
maxlength: 100,
null: true,
item_class: 'formGroup--halfSize',
},
editable: false,
active: true,
screens: {
signup: {},
invite_agent: {},
invite_customer: {},
edit: {
'-all-' => {
null: true,
},
},
view: {
'-all-' => {
shown: true,
},
},
},
to_create: false,
to_migrate: false,
to_delete: false,
position: 600,
)
ObjectManager::Attribute.add(
force: true,
object: 'User',
name: 'mobile',
display: 'Mobile',
data_type: 'input',
data_option: {
type: 'tel',
maxlength: 100,
null: true,
item_class: 'formGroup--halfSize',
},
editable: false,
active: true,
screens: {
signup: {},
invite_agent: {},
invite_customer: {},
edit: {
'-all-' => {
null: true,
},
},
view: {
'-all-' => {
shown: true,
},
},
},
to_create: false,
to_migrate: false,
to_delete: false,
position: 700,
)
ObjectManager::Attribute.add(
force: true,
object: 'User',
name: 'fax',
display: 'Fax',
data_type: 'input',
data_option: {
type: 'tel',
maxlength: 100,
null: true,
item_class: 'formGroup--halfSize',
},
editable: false,
active: true,
screens: {
signup: {},
invite_agent: {},
invite_customer: {},
edit: {
'-all-' => {
null: true,
},
},
view: {
'-all-' => {
shown: true,
},
},
},
to_create: false,
to_migrate: false,
to_delete: false,
position: 800,
)
end end
end end

View file

@ -3194,7 +3194,7 @@ ObjectManager::Attribute.add(
display: 'Phone', display: 'Phone',
data_type: 'input', data_type: 'input',
data_option: { data_option: {
type: 'phone', type: 'tel',
maxlength: 100, maxlength: 100,
null: true, null: true,
item_class: 'formGroup--halfSize', item_class: 'formGroup--halfSize',
@ -3229,7 +3229,7 @@ ObjectManager::Attribute.add(
display: 'Mobile', display: 'Mobile',
data_type: 'input', data_type: 'input',
data_option: { data_option: {
type: 'phone', type: 'tel',
maxlength: 100, maxlength: 100,
null: true, null: true,
item_class: 'formGroup--halfSize', item_class: 'formGroup--halfSize',
@ -3264,7 +3264,7 @@ ObjectManager::Attribute.add(
display: 'Fax', display: 'Fax',
data_type: 'input', data_type: 'input',
data_option: { data_option: {
type: 'phone', type: 'tel',
maxlength: 100, maxlength: 100,
null: true, null: true,
item_class: 'formGroup--halfSize', item_class: 'formGroup--halfSize',