2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/dbfcb1b57076/ Changeset: dbfcb1b57076 Branch: next-stable User: dan Date: 2014-04-08 23:03:19 Summary: When submiting bug reports disable submit buttons while form is being submitted. When submiting bug report to Biostar, have user confirm that they are posting to a public forum. Affected #: 1 file diff -r 6eb680d500b14753d7db2efd552613e531541495 -r dbfcb1b570763f3e1617ed493d9f1c44e108360e templates/webapps/galaxy/dataset/errors.mako --- a/templates/webapps/galaxy/dataset/errors.mako +++ b/templates/webapps/galaxy/dataset/errors.mako @@ -14,6 +14,36 @@ padding: 10px; } </style> + + <script type="text/javascript"> + function sendReport( button, form, target, doConfirm ) + { + var doIt = true; + if ( doConfirm==true ) + { + doIt = confirm( 'You are about to submit to a public forum, do you want to continue?' ); + } + if ( doIt==true ) + { + form.setAttribute( 'target', target ); + for( i=0; i<form.elements.length; i++ ) + { + if ( form.elements[i].type == 'submit' ) + { + form.elements[i].disabled = true; + } + + } + var hiddenInput = document.createElement('input'); + hiddenInput.type = 'hidden'; + hiddenInput.name = button.name; + hiddenInput.value = button.value; + form.appendChild( hiddenInput ); + return true; + } + return false; + } + </script></head><body> @@ -71,9 +101,9 @@ <textarea name="message" rows="10" cols="40"></textarea></div><div class="form-row"> - <input type="submit" name="submit_error_report" value="Report" onclick="form.setAttribute('target', '_self');"/> + <input type="submit" name="submit_error_report" value="Report" onclick="return sendReport( this, this.form, '_self' );"/> %if trans.app.config.biostar_url: - <input type="submit" name="submit_error_report" value="Post on Biostar" onclick="form.setAttribute('target', '_blank');"/> + <input type="submit" name="submit_error_report" value="Post on Biostar" onclick="return sendReport( this, this.form, '_blank', true );"/> %endif </div></form> https://bitbucket.org/galaxy/galaxy-central/commits/2a7447a1d3a2/ Changeset: 2a7447a1d3a2 User: dan Date: 2014-04-08 23:03:38 Summary: merge next-stable Affected #: 1 file diff -r d79eccd2d0beae713abe1f44b6d2584c8528b03e -r 2a7447a1d3a23571eb390a0c7cf8a035428ce42b templates/webapps/galaxy/dataset/errors.mako --- a/templates/webapps/galaxy/dataset/errors.mako +++ b/templates/webapps/galaxy/dataset/errors.mako @@ -14,6 +14,36 @@ padding: 10px; } </style> + + <script type="text/javascript"> + function sendReport( button, form, target, doConfirm ) + { + var doIt = true; + if ( doConfirm==true ) + { + doIt = confirm( 'You are about to submit to a public forum, do you want to continue?' ); + } + if ( doIt==true ) + { + form.setAttribute( 'target', target ); + for( i=0; i<form.elements.length; i++ ) + { + if ( form.elements[i].type == 'submit' ) + { + form.elements[i].disabled = true; + } + + } + var hiddenInput = document.createElement('input'); + hiddenInput.type = 'hidden'; + hiddenInput.name = button.name; + hiddenInput.value = button.value; + form.appendChild( hiddenInput ); + return true; + } + return false; + } + </script></head><body> @@ -71,9 +101,9 @@ <textarea name="message" rows="10" cols="40"></textarea></div><div class="form-row"> - <input type="submit" name="submit_error_report" value="Report" onclick="form.setAttribute('target', '_self');"/> + <input type="submit" name="submit_error_report" value="Report" onclick="return sendReport( this, this.form, '_self' );"/> %if trans.app.config.biostar_url: - <input type="submit" name="submit_error_report" value="Post on Biostar" onclick="form.setAttribute('target', '_blank');"/> + <input type="submit" name="submit_error_report" value="Post on Biostar" onclick="return sendReport( this, this.form, '_blank', true );"/> %endif </div></form> Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.