Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
namespace: description and team cleared when form is displayed
Browse files Browse the repository at this point in the history
Signed-off-by: Vítor Avelino <[email protected]>
  • Loading branch information
vitoravelino committed Feb 24, 2017
1 parent 87162cd commit c891792
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/assets/javascripts/namespaces.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ $(document).ready ->
set_typeahead('/teams/typeahead/%QUERY')

$('#add_namespace_btn').unbind('click').on 'click', (event) ->
$('#namespace_namespace').val('')

# When we are creating this on the namespaces page.
if $('#namespace_team') && $('#namespace_team').is(':visible')
$('#namespace_team').val('')
# clear only when creating a new namespace
if $('#new-namespace-form').length
$('#namespace_team.typeahead').val('')
$('#namespace_description').val('')
$('#namespace_namespace').val('')

$('#add_namespace_form').toggle 400, "swing", ->
if $('#add_namespace_form').is(':visible')
Expand Down

0 comments on commit c891792

Please sign in to comment.