Survey 2.0 - "Cancel" button not working as expected (#9217)
added call to 'loadSurvey' after 'cancel' also added code in 'loadSurvey' to allow for a refresh without displaying an edit window.
This commit is contained in:
parent
eeef2fb330
commit
d0b8dd17bc
3 changed files with 11 additions and 3 deletions
|
|
@ -25,6 +25,7 @@
|
|||
- fixed #4196: update button doesn't work in IE
|
||||
|
||||
7.6.6
|
||||
- fixed #9217: Survey 2.0 - "Cancel" button not working as expected(David Delikat)
|
||||
- fixed #8792: Image Preview gives ERROR in Collateral Manager
|
||||
- fixed #8774: Forum Rich Edit no longer supports indent/outdent
|
||||
- fixed #4173: fieldnames in profilefields can contain spaces
|
||||
|
|
|
|||
|
|
@ -429,13 +429,19 @@ sub www_dragDrop {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_loadSurvey {
|
||||
my ( $self, $options ) = @_;
|
||||
my $editflag = 1;
|
||||
|
||||
$self->loadSurveyJSON();
|
||||
|
||||
my $address = defined $options->{address} ? $options->{address} : undef;
|
||||
if ( !defined $address ) {
|
||||
if ( my $inAddress = $self->session->form->process("data") ) {
|
||||
$address = [ split /-/, $inAddress ];
|
||||
if( $inAddress eq '-' ) {
|
||||
$editflag = 0;
|
||||
$address = [ 0 ];
|
||||
} else {
|
||||
$address = [ split /-/, $inAddress ];
|
||||
}
|
||||
}
|
||||
else {
|
||||
$address = [0];
|
||||
|
|
@ -509,7 +515,8 @@ sub www_loadSurvey {
|
|||
#ids is a list of all ids passed in which are draggable (for adding events)
|
||||
#type is the object type
|
||||
my $return = {
|
||||
"address", $address, "buttons", \%buttons, "edithtml", $editHtml,
|
||||
"address", $address, "buttons", \%buttons,
|
||||
"edithtml", $editflag ? $editHtml : '',
|
||||
"ddhtml", $html, "ids", \@ids, "type", $var->{type}
|
||||
};
|
||||
$self->session->http->setMimeType('application/json');
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Survey.ObjectTemplate = new function(){
|
|||
var butts = [
|
||||
{ text:"Submit", handler:function(){this.submit();}, isDefault:true },
|
||||
{ text:"Copy", handler:function(){document.getElementById('copy').value = 1; this.submit();}},
|
||||
{ text:"Cancel", handler:function(){this.cancel();}},
|
||||
{ text:"Cancel", handler:function(){this.cancel(); Survey.Comm.loadSurvey('-');}},
|
||||
{ text:"Delete", handler:function(){document.getElementById('delete').value = 1; this.submit();}}
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue