Support Forums - Classified Ads Script Osclass
Osclass theme support => Veronika Osclass Responsive Theme => Topic started by: Anonymous on January 14, 2018, 05:49:19 PM
-
hi,
strange things occured!!!
i removed whole line- <div class="row">
<label for="user_type"><?php _e('User type', 'veronika'); ?></label>
<div class="input-box"><i class="fa fa-industry"></i><?php UserForm::is_company_select(osc_user()); ?></div>
</div>
from user-profile, so that user cant able to choose user type,
issue occured- when i applied user as company , and that user updates his/her profile information, then automatically user type convert to user,
means to say- user as company; after updating his profile info , it becomes user, user type- user instead of company,
how to solve this strange issue, :-[
-
Remove user type on database
-
you mean t_user_type
will it affect other users,
i just want that;
user does not able to change their type from his/her profile
-
theres b_company
in t_user database,
this line assigns 1 & 0, true or false,
if i delete user type then, i loose all user type, :-[
please suggest me any alternate option, remedy :D
so that user wont get any option to select their type,
-
@Anonymous
Not sure if I understand. You want to disable user types option, but you want to keep user type options... :o
-
i wants to disable user type drop down from user-profile.php, :)
only admin could having rights to change user type from admin dashboard. :D
i dont want to delete user type from db, cause it will affect rest of users,
just wants to Hide user type from user-profile.php :)
any div or element hidding method , could you suggest, for hidding this drop down option from user profile
-
Ok, removes it in user-profile.php
-
i removed whole line- <div class="row">
<label for="user_type"><?php _e('User type', 'veronika'); ?></label>
<div class="input-box"><i class="fa fa-industry"></i><?php UserForm::is_company_select(osc_user()); ?></div>
</div>
i already did that, & issue occured,
user type (company) when updates his profile information then automatically, it becomes user,
company becomes user,
i hope you are getting what am trying to say,
every times when user updates his profile information then automatically his database becomes user as type,
assigns data automatically in b_company after deleting line
<div class="row">
<label for="user_type"><?php _e('User type', 'veronika'); ?></label>
<div class="input-box"><i class="fa fa-industry"></i><?php UserForm::is_company_select(osc_user()); ?></div>
</div>
-
@Anonymous
Put the field as invisible or readonly.
-
Pls suggest me how to do that..
I followed - https://stackoverflow.com/questions/27921391/make-a-field-invisible-or-readonly-dynamically-in-odoo-websites-not-in-form-v (https://stackoverflow.com/questions/27921391/make-a-field-invisible-or-readonly-dynamically-in-odoo-websites-not-in-form-v)
&
https://www.odoo.com/forum/help-1/question/how-to-make-a-field-invisible-only-on-create-88936 (https://www.odoo.com/forum/help-1/question/how-to-make-a-field-invisible-only-on-create-88936)
Seems hard to coded.
I will be grateful if you
Could provide code..
-
$('#element').prop('readonly', true);
or remove osclass function and replace it with HTML that is generated by it
-
not working.
also removed from osclass core file, nothings seems to work
please take a look, same issue persist
-
It's not issue, but your requirement. Contact plugin owner.
-
@Anonymous
Why don't you just create a js like this in user profile page (NOT on registration):
<script type="text/javascript">
$(document).ready(function(){
$("#b_company").attr('disabled', true);
});
</script>
Function still exists, user profile shows the type, but user can't change it (user type only can be changed by admin).