X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=therapies%2Fupdate_therapy.sh;h=70fdea2930a23b0391a1ec7b58df693f8e5e8b07;hb=b7e4444890a73c5f54da06c9f9b05df3d91be1d2;hp=bb3901fbe21f66d3cbf6ecafb87d39e9ff1afc68;hpb=4e07a73ed0ab92f276d1d8ce6942bd92651efc3d;p=lobster diff --git a/therapies/update_therapy.sh b/therapies/update_therapy.sh index bb3901f..70fdea2 100755 --- a/therapies/update_therapy.sh +++ b/therapies/update_therapy.sh @@ -28,7 +28,17 @@ if [ "$(POST tid)" != "$(transid "$tpyfile")" ]; then printf 'Status: 409 Conflict\r\nContent-Length: 0\r\n\r\n' exit 0 else - SET_COOKIE session message="TRANSACTION CONFLICT" + SET_COOKIE session message="TRANSACTION_CONFLICT" + REDIRECT "/therapies/${tpy%.*}/${tpy#*.}" + fi +fi + +if [ "$(POST formend)" != "formend" ]; then + if [ "$(POST autosubmit)" = "true" ]; then + printf 'Status: 409 Conflict\r\nContent-Length: 0\r\n\r\n' + exit 0 + else + SET_COOKIE session message="INCOMPLETE_SUBMIT" REDIRECT "/therapies/${tpy%.*}/${tpy#*.}" fi fi @@ -36,7 +46,7 @@ fi # serialize POST array into file for key in $(POST_KEYS); do case "$key" in - imagedata|tid) : ;; + imagedata|tid|formend) : ;; session*_date) value="$(POST "$key")" y=0 mon=0 dom=0