Author Topic: Readonly state not affect on user fields  (Read 155 times)

d0ublezer0

  • Jr. Member
  • **
  • Posts: 177
Readonly state not affect on user fields
« on: December 03, 2018, 14:59:11 pm »
in VM backend we have "readonly" option for user fields
but this is not affect on anything in frontend

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8556
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Readonly state not affect on user fields
« Reply #1 on: December 03, 2018, 20:09:09 pm »
normal form etc?
I noticed this other day but only on using Frontend VM admin  ( readonly was not passed)
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

d0ublezer0

  • Jr. Member
  • **
  • Posts: 177
Re: Readonly state not affect on user fields
« Reply #2 on: December 04, 2018, 06:17:19 am »
User field, marked in backend as readonly should be also readonly in frontend on user edit page, i think

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8556
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Readonly state not affect on user fields
« Reply #3 on: December 04, 2018, 13:31:56 pm »
so do I but its not... 

Have discussed with Max before and I think in a forth coming release the readonly will be passed thru also to the fields

In the meantime you could change this in the userfields model

            $readonly = '';
            if(!$admin){
               if($_fld->readonly ){
                  $readonly = ' readonly="readonly" ';
               }
            }

if is detected as an admin view then the readonly isn't passed



GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

d0ublezer0

  • Jr. Member
  • **
  • Posts: 177
Re: Readonly state not affect on user fields
« Reply #4 on: December 05, 2018, 06:16:57 am »
yes, this is the problem: user fields not pass readonly state

Also, if i modify userfields model - on next update it will be lost

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1794
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Readonly state not affect on user fields
« Reply #5 on: December 05, 2018, 07:26:13 am »
Quote
Have discussed with Max before and I think in a forth coming release the readonly will be passed thru also to the fields

In the meantime you could change this in the userfields model

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)