#227 Misc fixes
Merged 8 years ago by . Opened 8 years ago by pingou.

file modified
+2 -3
@@ -40,7 +40,7 @@ 

      Accepts POST queries only.

  

      :arg title: The title of the issue/ticket to create

-     :arg content: The content of the issue to create (ie the description of

+     :arg issue_content: The content of the issue to create (ie the description of

          the problem)

      :arg private: A boolean specifying whether this issue is private or not

  
@@ -66,8 +66,7 @@ 

      if repo != flask.g.token.project:

          raise pagure.exceptions.APIError(401, error_code=APIERROR.EINVALIDTOK)

  

-     status = pagure.lib.get_issue_statuses(SESSION)

-     form = pagure.forms.IssueForm(status=status, csrf_enabled=False)

+     form = pagure.forms.IssueFormSimplied(csrf_enabled=False)

      if form.validate_on_submit():

          title = form.title.data

          content = form.issue_content.data

file modified
+3 -1
@@ -144,7 +144,9 @@ 

  APPLICATION_ROOT = '/'

  

  # List of blacklisted project names

- BLACKLISTED_PROJECTS = ['static', 'pv', 'releases']

+ BLACKLISTED_PROJECTS = [

+     'static', 'pv', 'releases', 'new', 'api', 'settings',

+     'logout', 'login', 'users', 'groups']

  

  ACLS = {

      'issue_create': 'Create a new ticket against this project',

file modified
+17 -1
@@ -25,7 +25,23 @@ 

      )

  

  

- class IssueForm(wtf.Form):

+ class IssueFormSimplied(wtf.Form):

+     ''' Form to create or edit an issue. '''

+     title = wtforms.TextField(

+         'Title<span class="error">*</span>',

+         [wtforms.validators.Required()]

+     )

+     issue_content = wtforms.TextAreaField(

+         'Content<span class="error">*</span>',

+         [wtforms.validators.Required()]

+     )

+     private = wtforms.BooleanField(

+         'Private',

+         [wtforms.validators.optional()],

+     )

+ 

+ 

+ class IssueForm(IssueFormSimplied):

      ''' Form to create or edit an issue. '''

      title = wtforms.TextField(

          'Title<span class="error">*</span>',

file modified
+1 -1
@@ -13,7 +13,7 @@ 

      font-size: 100%;

  }

  

- pre {

+ pre, code {

      white-space: pre-wrap;

      white-space: -moz-pre-wrap;

      white-space: -pre-wrap;

@@ -112,7 +112,6 @@ 

          data = {

              'title': 'test issue',

              'issue_content': 'This issue needs attention',

-             'status': 'Open',

          }

  

          # Valid request