173 @return flag indicating acceptance (boolean) |
173 @return flag indicating acceptance (boolean) |
174 """ |
174 """ |
175 # TODO: extend with more functionality |
175 # TODO: extend with more functionality |
176 self.__lastRequest = request |
176 self.__lastRequest = request |
177 self.__lastRequestType = type_ |
177 self.__lastRequestType = type_ |
|
178 |
|
179 if type_ == QWebPage.NavigationTypeFormResubmitted: |
|
180 res = E5MessageBox.yesNo(self.view(), |
|
181 self.trUtf8("Resending POST request"), |
|
182 self.trUtf8("""In order to display the site, the request along with""" |
|
183 """ all the data must be sent once again, which may lead""" |
|
184 """ to some unexpected behaviour of the site e.g. the""" |
|
185 """ same action might be performed once again. Do you want""" |
|
186 """ to continue anyway?"""), |
|
187 icon = E5MessageBox.Warning) |
|
188 if not res: |
|
189 return False |
178 |
190 |
179 return QWebPage.acceptNavigationRequest(self, frame, request, type_) |
191 return QWebPage.acceptNavigationRequest(self, frame, request, type_) |
180 |
192 |
181 def populateNetworkRequest(self, request): |
193 def populateNetworkRequest(self, request): |
182 """ |
194 """ |