Joomla-Bible-Study / Proclaim

Joomla Proclaim Component - Christian Web Ministries
https://www.christianwebministries.org/
GNU General Public License v3.0
11 stars 9 forks source link

Frontend adding study: Clear fields when a compulsory entry is missing #200

Closed st-anton closed 11 years ago

st-anton commented 11 years ago

Adding a new study in the frontend, but forget to fill in a compulsory field, e.g. the date When pressing save, it complains about forgotten date - fine. But all the other entries are dropped as well, so you can start again to fill in everything.

In the backend, you even cannot press 'save' as long as any compulsory field is missing.

st-anton commented 11 years ago

This is captured perfectly in the frontend edit media file: a popup appears saying something like invalid form

st-anton commented 11 years ago

I think the code components\com_biblestudy\views\mediafileform\tmpl\edit.php lines 85 to 192 can be copied (with some modifications)

tomfuller2 commented 11 years ago

The date picker also does not seem to work.

It only gives a message: "Please fill out ..." The code is exactly the same as the media files date, except the name of the field is different of course. Got me stumped.

bcordis commented 11 years ago

@tomfuller2 Could this be a JavaScript error?

tomfuller2 commented 11 years ago

I fixed this issue by placing some javascript code from the mediafileform into the messageform to send up an error but not delete the fields. I also copied some code from mediafileform to messageform to get the calendar to work. https://github.com/tomfuller2/Joomla-Bible-Study/commit/932bf7d040e3a9d12f703542be61ca023c129710