diag_backup.php: Allow more space to display name of config file being restored with Chrome browser
The selected config file name for restore is shown to the right of the "Choose File" button. A typical saved config file name is:
For some reason the field is quite short and so you see something like:
Even when the webGUI window is made quite skinny there is plenty of available space.
It would be nice to have this field wider so it can at least show a decent bit of the router name and the date-time string at the end:
#2 Updated by Phillip Davis over 3 years ago
While you are messing with that code, I noticed that the user can click the "Restore Configuration" button before "Choose File" has been done. If that happens, the code goes through the motions of trying to upload a file named "". Of course that fails and there is an error message displayed after a few seconds.
But maybe that sillyness could be short-circuited - disable the "Restore Configuration" and only enable it when "Choose File" has been done?
#4 Updated by Steve Beaver over 3 years ago
- File longfile.jpg longfile.jpg added
- Status changed from Assigned to Feedback
- Assignee changed from Steve Beaver to Phillip Davis
Perhaps someone got to this before me, but the field seems to accept a very long filename without too much fuss:
I have implemented your suggestion to disable hte button until a file is selected.
#6 Updated by Phillip Davis over 3 years ago
The Restore Configuration button being disabled is working - good.
The file name thing is different on different browsers:
Firefox - shows the full file name
Chrome - shortened elided file name only
Hmmm - what is going on?
Can you try on Chrome and see what happens?
#7 Updated by Steve Beaver over 3 years ago
- Subject changed from diag_backup.php: Allow more space to display name of config file being restored to diag_backup.php: Allow more space to display name of config file being restored with Chrome browser
I see the issue when using Chrome. Unfortunately, so do a million other people and Googling for "chrome width of file input" is not at all encouraging.
The only "solutions" I see are horrible hacks that hide the file name area by setting its opacity to zero, and then overly a plain text box on top of it. - Yuck.
I will keep a look out for other solutions, but don't see any so far.