Backup Wizard customization
I am needing to customize /backups/wizard-fullbackup.html.tt so it will disable the "Generate Full Backup" if one already exists.
I'm new to cPanel development, and am a little lost on what to change here.
I see the file variable set as [% hashref.file.uri() %] within this FOREACH statement:
[% FOREACH hashref IN backups_list_full_backups %]
I don't want it in a FOREACH statement, I need it to be standalone code that either displays the generate button or not. Would I use isset? If so, what would be the syntax?
Thanks
-
I figured it out - if anyone else needs this functionality, replace this code: [% locale.maketext("Generate a Full Backup") %]
[% INCLUDE "fullbackup-include.html.tt" %]
With this code (tailor to your liking):[% IF hashref.file.uri() %]You cannot generate a backup while one exists on the server. Please delete the file(s) above from the File Manager before creating a new backup.
[% ELSE %][% END %][% locale.maketext("Generate a Full Backup") %]
[% INCLUDE "fullbackup-include.html.tt" %]0 -
Hello @Amber Layton, Thank you for taking the time to post the solution here for other members to see. Let us know if you have any additional questions. Thanks! 0
Please sign in to leave a comment.
Comments
2 comments