Higuys , when registering some required fields are not obligatoire ,
so how to edit required Fields to not required in opencart 1.5?
Try this:
Go to controller->account directory, then
open register.php, then
go to function validate, then
change validation according to your requirement.
Related
I am working on WFFM Sitecore.
I have one droplist "Title" with option of
Mr
Miss
other title
And one required text-box called Other.
The text-box is hidden on page load and it will be shown only when the user selects the other title option from droplist.
If we are selecting Mr or Miss then the Other text-box is hidden but it is still a Required field. When we submit the form it triggers the required field validation of the hidden Other text box .
How can I remove the required fields that are hidden on WFFM save action.
You will need to remove the "Required" flag from the field in the WFFM editor, and then add some custom JS validation that checks the Title field and if its set to Other Title, validate that the text box has been populated.
You can't do that in WFFM without custom JavaScript.
You would also want to make sure that your server code validates this again to protect against someone trying to bypass the JS validation.
We are developing a django-cms (django 1.8, cms 3.2) site including the ckeditor. Logging in with admin, no problems. But when I set a user to staff and give PagePermissions, I get the error "You do not have permission to edit this plugin", when opening the editor in cms. What am I missing?
please update the details:
Where i understood it might be because of this:
The problem is that after migrating to ckeditor, the relevant permissions in auth_permissions, as stated above, point to the wrong content type id. To fix this problem look up the id of the ckeditorplugin content type:
select * from django_content_type where app_label = 'djangocms_text_ckeditor';
and the original text plugin:
select * from django_content_type where app_label = 'text';
Now update the relevant permissions:
update auth_permission set content_type_id = <new ck text plugin id> where content_type_id = <old text plugin id>;
Non superusers must also be provided permission on individual plugins, for them to be able to add/edit/delete them.
Non superusers must also have "use structure mode" permission (starting 3.1+) to enter structure mode in the frontend editor.
The best way to give users permission on pages is by using the "Permissions" item in the toolbar on the page you want to give permission to: it's the best way to be sure to provide all the needed permissions on the correct page.
I created my own user class according to:
https://docs.djangoproject.com/en/1.7/topics/auth/customizing/
Having this user created I would like to change description of the creation form. For now it's "First, enter a username and password. Then, you'll be able to edit more user options.".
Here's a screenshot:
I checked all meta fields and found how to change label of field but still can't figure out how to accomplish change of form description.
That's not in the form at all, it's just in a template:
https://github.com/django/django/blob/master/django/contrib/admin/templates/admin/auth/user/add_form.html
Extension of Daniel answer:
The Django template engine has a defined order for loading templates. When it loads a template, it uses the first template that matches the name. You can override admin templates by using the same directory structure and file names.
You can add a custom admin template in the next steps:
Add template in the root of your project
Include the templates (settings.py)
Enjoy :)
Where did I miss to add a line of code if I try to echo php variable inside OPENCART product.tpl file and it doesn't show up on site?
Notes: there is a field in database. I am able to save to this field from admin panel ( i added a custom field there).
Did You edit also the product controller to load the variable and pass it to the template? I guess not... Edit catalog/controller/product/product.php and add $this->data['MYVARIABLE'] = $product_info['MYVARIABLE']; somewhere before $this->render() is called.
I have a couple of fields in my model that to which I wish to add a link that will allow the user to search for names/files (external from the application's database).
So what I would like is:
Field name: [text box] - LINK
Is there a straightforward django way of achieving this?
Cheers.
You need to change the widget that the form field uses to display the models information. You basically add some html after the input to link to where you want.
Here's some code I put together to create a widget that displays how many characters are left for a CharacterField so it's similar to what you are looking to do:
https://github.com/pastylegs/django-widget-charsleft/blob/master/widget_charsleft/widgets.py