New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add warning for reset button #197
Comments
There a 3 solutions:
|
Here is small preview of what I have in our framework. Not saying you should do this but it kinda made sense to me. So I vote for 2 , |
Ok 2. |
👍 |
@danyj - Added to "To DO list" Thanks |
@sergiubagrin Already done. Will be available in the next version. |
v2.1.19 released |
Does not seem like this made it to 2.1.19 , my reset button is still saving the options. |
Option values are stored in the database in Maybe you can share a screencast for more details? How did you find that options are still saving on reset? |
Here , |
After reset the value is "No"=="Don't disable the admin bar". Everything is correct. |
Yes but it should not auto save it as we discussed previously. |
maybe we have terminology misunderstanding here This is my option output $styles = fw_get_db_settings_option('get_styles'); echos red in this video My understand is that reset button click will not affect frontend output unless I click on save button. |
For most developers it's very convenient that the default value is extracted from the settings options when no value is found in the database. That way you don't bother to specify
The only convenience I see (and I thought this is what you requested) is while you developing the theme settings and playing with options default
If I understand you correctly, you expect that echo fw_get_db_settings_option('get_styles/gadget', ''); It works like this:
If you don't specify default value (null), it will try to load it from the settings options array (code). |
Again misunderstanding. I dont expect $styles['gadget'] to be empty on reset , I expect it to be as is now but the frontend should not be changed at all unless I have saved the options and not when I hit reset. I displayed here what I expect reset button to do Imagine this You fill it out and hit clear, meaning , I want to clear the form not send it , but in your scenario clear sends the form out first and than clears it. |
I think it's simpler and more intuitive how it works now (with save), the user just hits the Reset button. Without save, we must show/teach the user that after Reset he needs to press the Save button. I understand that you are trying to create the same behavior as in Yjsg settings page and that you have many clients that are familiar with that behavior. But we also have clients that are familiar with the "reset+save" behavior. Now I don't know: To choose only one behavior (with or without save) or somehow to implement them both. |
Not sure bud honestly. The "not saving" , gives me the upper hand to see what the default was before it is saved. If you have any color option set to, let say #e2a140 Or check this Imagine 50 patterns and 50 images. User gets theme , changes the theme option and everything is ok. But if this is much for you and you think that WP users mind set is not going to welcome this, than don't brake your self, just add a warning that the options are about to be reset. Like avada did. |
We will do it like avada did http://screencast.com/t/33y5hCybXpr |
Added confirm alert in v2.1.20 |
There is no need to set the values in the database, the defaults are read from the settings options array if nothing is set in the database. Sorry, that is a bug in the
I will fix that soon (in the next version). |
yes I figured that one just now thus I deleted my post. the actual option is there but the array of options is empty. thnx for replying. |
if reset button in theme options is clicked the values are reset to default and automatically saved.
Can we have info for the user that the button will actually save the values on click,
or change the button text from
"Reset " to "Reset and save"
or just reset options values and let the admin save them again.
I catch my self forgetting for example what the default color value is , by hitting reset I dont expect it to save it automatically but rather just " show me " what defaults are.
The text was updated successfully, but these errors were encountered: