From 46808ce00a40538e8df45cbe17aeee517212220f 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Émily-Rose Francoeur --- .../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 3042418cc6..4126fb895a 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; }
  • -
  • +
  • -
  • +
  • -
  • +
  • @@ -644,19 +644,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.34.1