       @h2 desc.createModuleTitle, class: 'box-subtitle'
       @div class: 'box-form', =>
         @div class: 'form-row clearfix', =>
-          @label desc.moduleInApp, class: 'row-title pull-left'
+          @div class: 'row-title pull-left selectPath', =>
+            @input type: 'radio', name: 'modulePaths', outlet: 'selectAppPath', id: 'selectAppPath'
+            @label desc.moduleInApp, for: 'selectAppPath'
           @div class: 'row-content pull-left', =>
             @select class: 'form-control', outlet: 'selectProject'
         @div class: 'form-row clearfix', =>
-          @label desc.modulePath, class: 'row-title pull-left'
+          @div class: 'row-title pull-left selectPath', =>
+            @input type: 'radio', name: 'modulePaths', outlet: 'selectModulePath', id: 'selectModulePath'
+            @label desc.modulePath,for: 'selectModulePath'
           @div class: 'row-content pull-left', =>
             @div class: 'textEditStyle', outlet: 'modulePath'
-            @span class: 'inline-block status-added icon icon-file-directory openFolder', click: 'openFolder'
+            @span class: 'inline-block status-added icon icon-file-directory openFolder', click: 'openFolder', outlet:'openBtn'
         @div class: 'form-row clearfix', =>
           @label desc.moduleId, class: 'row-title pull-left'
           @div class: 'row-content pull-left', =>

    @parentView.disableNext()
    @parentView.hidePrevBtn()

    projects = @findProject()
    projectNum = projects.length
    if projectNum isnt 0
      @selectProject.empty()
      @setSelectItem path for path in projects
      @modulePath.parents('.form-row').addClass 'hide'
      @selectProject.parents('.form-row').removeClass 'hide'
      @modulePath.html pathM.join @selectProject.val(),'modules'
    else
      @selectProject.parents('.form-row').addClass 'hide'
      @modulePath.parents('.form-row').removeClass 'hide'
    # console.log @
    @checkPath()

  # destroy: ->
  #   @element.remove()
  setSelectItem:(path) ->
    filePath = pathM.join path,desc.ProjectConfigFileName
    obj = Util.readJsonSync filePath
    projectName = if obj? then obj.name else pathM.basename path
    optionStr = "<option value='#{path}'>#{projectName}  -  #{path}</option>"
    @selectProject.append optionStr

  getElement: ->
    @element

  serialize: ->



  openFolder: (e) ->
    console.log 'openFolder'
    el = e.currentTarget
    if el.classList.contains(disabled) is true
      return
    atom.pickFolder (paths) =>
      if paths?
        path = paths[0]
        selectEl = @selectProject[0]
        console.log "select path:#{path}"
        if el is selectEl
          if @checkProjectPath(path)
            for opt in selectEl.options
              console.log opt,opt.value,path,opt.value is path
              if opt.value is path
                opt.selected = true
                console.log '...'
                return
            @selectProject.find('option[value=""]').remove()
            @setSelectItem path,null,null,true,true
            console.log '!!!'
            # optionExists = false
            # @projects.forEach (projectPath,i) =>
            #   if projectPath is
            # if optionExists is no
            # @selectProject.find("option[value='#{path}]'").prop 'selected',true
          else
            alert desc.selectProjectPath
        else
          @modulePath.html path

  onSelectChange: (e) ->
    el = e.currentTarget
    console.log el.value
    if el.value is 'other'
      @openFolder(e)
    # @modulePath.html el.value
    @checkPath()

  checkProjectPath: (path) ->
    result = null
    configPath = pathM.join path,desc.ProjectConfigFileName
    return Util.isFileExist configPath,'sync'

  checkPath: ->
    path = @moduleId.getText().trim()
