Commit ff7fb09e authored by Phil Hughes's avatar Phil Hughes

Updated issue form to use new GLForm

parent 5dd01f57
......@@ -35,7 +35,7 @@ class Dispatcher
new Diff()
when 'projects:issues:new','projects:issues:edit'
shortcut_handler = new ShortcutsNavigation()
new DropzoneInput($('.issue-form'))
new GLForm($('.issue-form'))
new IssuableForm($('.issue-form'))
when 'projects:merge_requests:new', 'projects:merge_requests:edit'
new Diff()
......
class @GLForm
constructor: (@form) ->
@textarea = @form.find('.js-note-text')
@textarea = @form.find('textarea.js-gfm-input')
# Before we start, we should clean up any previous data for this form
@destroy()
# Setup the form
@setupForm()
@form.data 'gl-form', @
......@@ -9,8 +13,10 @@ class @GLForm
destroy: ->
# Destroy actions
actions = @form.data 'form-actions'
actions.clearEventListeners()
@form.data 'form-actions', null
if actions?
actions.clearEventListeners()
@form.data 'form-actions', null
# Clean form listeners
@clearEventListeners()
......
= form_for [@project.namespace.becomes(Namespace), @project, @issue], html: { class: 'form-horizontal issue-form gfm-form js-quick-submit js-requires-input' } do |f|
= form_for [@project.namespace.becomes(Namespace), @project, @issue], html: { class: 'form-horizontal issue-form common-note-form js-quick-submit js-requires-input' } do |f|
= render 'shared/issuable/form', f: f, issuable: @issue
:javascript
......
......@@ -29,7 +29,7 @@
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do
= render 'projects/zen', f: f, attr: :description,
classes: 'description form-control'
classes: 'note-textarea'
= render 'projects/notes/hints'
.clearfix
.error-alert
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment