Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ad_form -name voidcancel -has_submit 0 -export {stage response_id report_id site_addr current_user_id} -form {
- {void:text(submit) {label "Void Locate"} {html {onclick "goto_confirm('void','$response_id')"}}}
- {cancel:text(submit) {label "Cancel Locate"} {html {onclick "goto_confirm('cancel','$response_id')"}} {after_html { *No changes can be made to Cancelled locates<br><br>}}}
- }
- if {($stage ne "0") && $response_id ne ""} {
- ad_form -extend -name voidcancel -form {
- {email:text(submit) {label "Email"}}
- {print:text(submit) {label "Print"} {html {onclick "window.location='ll-display?response_id=$response_id&flag=print';return false"}}}
- } -on_submit {
- if {$void ne ""} {
- db_dml do_update "UPDATE yy_linelocate SET status = 'false' WHERE response_id = :response_id"
- ad_returnredirect -message "Locate has been marked as void" "/mirs/vujax/forms/linelocate-report?response_id=$response_id"
- ad_script_abort
- }
- if {$email ne ""} {
- db_dml do_update "UPDATE yy_linelocate SET last_email_time = now(),last_email_user = $current_user_id WHERE response_id = :response_id"
- ad_returnredirect "/mirs/vujax/display_report?report_id=$report_id&$site=$site_addr&$response_param=$response_id&$flag_param=email"
- }
- }
- }
Add Comment
Please, Sign In to add comment