Esempio n. 1
0
 def delete(template):
     delete = gmGuiHelpers.gm_show_question(
         aTitle=_('Deleting form template.'),
         aMessage=_('Are you sure you want to delete\n'
                    'the following form template ?\n\n'
                    ' "%s (%s)"\n\n'
                    'You can only delete templates which\n'
                    'have not yet been used to generate\n'
                    'any forms from.') %
         (template['name_long'], template['external_version']))
     if delete:
         # FIXME: make this a priviledged operation ?
         gmForms.delete_form_template(template=template)
         return True
     return False
Esempio n. 2
0
	def delete(template):
		delete = gmGuiHelpers.gm_show_question (
			aTitle = _('Deleting form template.'),
			aMessage = _(
				'Are you sure you want to delete\n'
				'the following form template ?\n\n'
				' "%s (%s)"\n\n'
				'You can only delete templates which\n'
				'have not yet been used to generate\n'
				'any forms from.'
			) % (template['name_long'], template['external_version'])
		)
		if delete:
			# FIXME: make this a priviledged operation ?
			gmForms.delete_form_template(template = template)
			return True
		return False