From e95b04d8785a51ce8f3e620f84944a855cbea355 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 19 Sep 2023 12:10:48 +0000 Subject: [PATCH] Bug 34831: Add input types "tel", "email" and "url" to vendor edit form This patch updates the vendor edit form so that phone, email, and url fields have an input type corresponding to the field's content. To test, apply the patch and go to Acquisitions. - Create or edit a vendor. - In the form, check that each field looks correct: - Company details -> - Phone - Fax - Website - Contact details - Phone - Alternative phone - Fax - Email - Interfaces - URI - Account email In a desktop browser the inputs won't display any differently, but if you test the patch in a sandbox you can try it in a mobile device browser to confirm that the onscreen keyboard changes based on the type of input. --- .../prog/en/modules/acqui/supplier.tt | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt index 6aff9ea0ad..b96debbe94 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt @@ -12,13 +12,13 @@
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • @@ -221,11 +221,11 @@ div.rows { padding: 1rem; }
  • -
  • +
  • -
  • +
  • -
  • +
  • @@ -642,19 +642,19 @@ div.rows { padding: 1rem; } n.append(``); let ol = $('
      '); let attributes = [ - { label: _("Name:"), name: 'name', node: 'input' }, - { label: _("Type:"), name: 'type', node: 'av_select', av_cat: 'VENDOR_INTERFACE_TYPE' }, - { label: _("URI:"), name: 'uri', node: 'input' }, - { label: _("Login:"), name: 'login', node: 'input' }, - { label: _("Password:"), name: 'password', node: 'input' }, - { label: _("Account email:"), name: 'account_email', node: 'input' }, - { label: _("Notes:"), name: 'notes', node: 'textarea' } + { label: _("Name:"), name: 'name', type: 'text', node: 'input' }, + { label: _("Type:"), name: 'type', type: 'select', node: 'av_select', av_cat: 'VENDOR_INTERFACE_TYPE' }, + { label: _("URI:"), name: 'uri', type: 'url', node: 'input' }, + { label: _("Login:"), name: 'login', type: 'text', node: 'input' }, + { label: _("Password:"), name: 'password', type: 'text', node: 'input' }, + { label: _("Account email:"), name: 'account_email', type: 'email', node: 'input' }, + { label: _("Notes:"), name: 'notes', type: 'textarea', node: 'textarea' } ]; attributes.forEach((attribute, ii) => { let li = $('
    1. '); li.append(``); if( attribute.node == 'input' ) { - li.append(``); + li.append(``); } else if ( attribute.node == 'textarea' ) { li.append(``); } else if ( attribute.node == 'av_select' ) { -- 2.30.2