def helper(self): helper = FormHelper() action_url = reverse('assign_article', args=(self.article.doi,)) helper.set_form_action(action_url) helper.layout = Layout( Field('username'), Field('article_pk'), Submit('submit', 'Assign') ) return helper
def errorsetlist_form_helper(errorset): helper = FormHelper() action_url = reverse('errorsetlist', args=(errorset.pk,)) helper.set_form_action(action_url) helper.form_class = 'form-inline error-filter-form' helper.form_method = 'GET' helper.form_id = 'errorset-filter-form-%s' % errorset.pk helper.layout = Layout( 'level', Submit('filter', 'Filter') ) return helper
def helper(self): helper = FormHelper() helper.form_class = 'form upload-form' #print "Helper: doi: %s" % reverse('detail_transition', args=(self.article.doi,)) helper.set_form_action(self.action_url) helper.layout = Layout( Field('article_pk'), Field('requested_transition_pk'), Field('file'), Submit('submit', 'Upload', css_class='btn-primary'), ) return helper