forked from openlp/openlp
Removed input validation on "Edit All" Dialog, as per Raouls comment on my previous merge request
This commit is contained in:
parent
f51d270ba8
commit
6124de5a51
@ -187,24 +187,9 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
|
|||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
if self.hasSingleVerse:
|
if self.hasSingleVerse:
|
||||||
value = unicode(self.getVerse()[0])
|
if not self.getVerse()[0]:
|
||||||
else:
|
|
||||||
lines = unicode(self.getVerse()[0]).split(u'\n')
|
|
||||||
if len(lines) <= 1:
|
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
message=translate('SongsPlugin.EditSongForm',
|
message=translate('SongsPlugin.EditSongForm',
|
||||||
'Invalid entry, you need a verse splitter and some text.'))
|
'You need to type some text in to the verse.'))
|
||||||
return False
|
return False
|
||||||
value = lines[1]
|
|
||||||
if not value:
|
|
||||||
lines = unicode(self.getVerse()[0]).split(u'\n')
|
|
||||||
index = 2
|
|
||||||
while index < len(lines) and not value:
|
|
||||||
value = lines[index]
|
|
||||||
index += 1
|
|
||||||
if not value:
|
|
||||||
critical_error_message_box(
|
|
||||||
message=translate('SongsPlugin.EditSongForm',
|
|
||||||
'You need to type some text in to the verse.'))
|
|
||||||
return False
|
|
||||||
QtGui.QDialog.accept(self)
|
QtGui.QDialog.accept(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user