class EventForm(DateForm): name = StringField(_('name'), [InputRequired()], render_kw={'autofocus': True}) event = TableField(_('sub event of')) place = TableField(_('location')) place_from = TableField(_('from')) place_to = TableField(_('to')) object = TableMultiField() person = TableMultiField() event_id = HiddenField() description = TextAreaField(_('description')) save = SubmitField(_('insert')) insert_and_continue = SubmitField(_('insert and continue')) continue_ = HiddenField() opened = HiddenField() given_place = TableMultiField(_('given place')) def validate(self) -> bool: """ Check if selected super event is allowed.""" # Todo: also check if super is not a sub event of itself (recursively) valid = DateForm.validate(self) if self.event.data: if str(self.event.data) == str(self.event_id.data): self.event.errors.append(_('error node self as super')) valid = False return valid
class ActorForm(DateForm): name = StringField(_('name'), [DataRequired()]) alias = FieldList(StringField(''), description=_('tooltip alias')) residence = TableField(_('residence')) appears_first = TableField(_('appears first')) appears_last = TableField(_('appears last')) description = TextAreaField(_('description')) save = SubmitField(_('insert')) insert_and_continue = SubmitField(_('insert and continue')) continue_ = HiddenField() opened = HiddenField()
class ActorForm(DateForm): name = StringField(_('name'), [InputRequired()], render_kw={'autofocus': True}) alias = FieldList(StringField(''), description=_('tooltip alias')) residence = TableField(_('residence')) begins_in = TableField() ends_in = TableField() description = TextAreaField(_('description')) save = SubmitField(_('insert')) insert_and_continue = SubmitField(_('insert and continue')) continue_ = HiddenField() opened = HiddenField()
class EventForm(DateForm): name = StringField(_('name'), [DataRequired()]) event = TableField(_('sub event of')) place = TableField(_('location')) event_id = HiddenField() description = TextAreaField(_('description')) save = SubmitField(_('insert')) insert_and_continue = SubmitField(_('insert and continue')) continue_ = HiddenField() opened = HiddenField() given_place = TableMultiField(_('given place')) def validate(self, extra_validators=None): """ Check if selected super event is allowed""" # Todo: also check if super is not a sub event of itself (recursively) valid = DateForm.validate(self) if self.event.data: if str(self.event.data) == str(self.event_id.data): self.event.errors.append(_('error node self as super')) valid = False return valid
class LogoForm(Form): file = TableField(_('file'), [InputRequired()]) save = SubmitField(uc_first(_('change logo')))
class AddFileForm(Form): file = TableField(_('file'), [InputRequired()]) page = StringField(_('page')) save = SubmitField(_('insert'))
class AddPlaceForm(Form): place = TableField(_('place'), [InputRequired()]) page = StringField(_('page')) save = SubmitField(_('insert'))
class AddActorForm(Form): actor = TableField(_('actor'), [InputRequired()]) page = StringField(_('page')) save = SubmitField(_('insert'))
class AddEventForm(Form): event = TableField(_('event'), [InputRequired()]) page = StringField(_('page')) save = SubmitField(_('insert'))
class AddReferenceForm(Form): reference = TableField(_('reference'), [InputRequired()]) page = StringField(_('page')) save = SubmitField(_('insert'))
class AddFileForm(Form): file = TableField(_('file')) page = StringField(_('page')) save = SubmitField(_('insert'))
class AddPlaceForm(Form): place = TableField(_('place')) page = StringField(_('page')) save = SubmitField(_('insert'))
class AddActorForm(Form): actor = TableField(_('actor')) page = StringField(_('page')) save = SubmitField(_('insert'))
class AddEventForm(Form): event = TableField(_('event')) page = StringField(_('page')) save = SubmitField(_('insert'))
class AddSourceForm(Form): source = TableField(_('source')) page = StringField(_('page')) save = SubmitField(_('insert'))
class AddReferenceForm(Form): reference = TableField(_('reference')) page = StringField(_('page')) save = SubmitField(_('insert'))