VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: d0ublezer0 on December 03, 2018, 14:59:11 PM

Title: Readonly state not affect on user fields
Post by: d0ublezer0 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
Title: Re: Readonly state not affect on user fields
Post by: GJC Web Design 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)
Title: Re: Readonly state not affect on user fields
Post by: d0ublezer0 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
Title: Re: Readonly state not affect on user fields
Post by: GJC Web Design 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



Title: Re: Readonly state not affect on user fields
Post by: d0ublezer0 on December 05, 2018, 06:16:57 AM
yes, this is the problem: user fields not pass readonly state
(https://image.prntscr.com/image/egGeWri9R1WNfsVUyDX-QQ.png)
Also, if i modify userfields model - on next update it will be lost
Title: Re: Readonly state not affect on user fields
Post by: Jörgen on December 05, 2018, 07:26:13 AM
QuoteHave 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