예제 #1
0
파일: index.py 프로젝트: olymk2/stomatopod
def new_milestone_form():
    data = get_default_values()
    web.container.create('<div>')
    web.form.create('/new-milestone', node_id='csvimport', node_class='form-horizontal')
    web.form.append(get_projects_select({'project_id': 1, 'user_id': data.get('user_id')}))
    web.form.append('<label for="title">Milestone Name</label><input type="text" name="title" value="'+data.get('title','')+'">')
    web.form.append('<input type="submit" value="Create Milestone" />')
    web.container.append(web.form.render())
    web.container.append('</div>')
    return make_response(web.container.render())
예제 #2
0
파일: index.py 프로젝트: olymk2/stomatopod
def new_ticket_form():
    data = get_default_values()
    #TODO check user has permission to project
    web.container.create('<div>')
    
    web.container.append(web.title.create('Form Title' + web.div.create('').set_classes('close-button icon-content-white icon-content-white-ic_add_white_24dp').render()).render())
    #~ web.image.create('close.png').render()
    #~ <div class="form-popout-title">Title - close button here</div><div class="form-popout-content">
    
    web.form.create('/new-ticket', node_id='csvimport', node_class='form-horizontal')
    
    web.form.append(get_projects_select({'project_id': 1, 'user_id': data.get('user_id')}))
    web.form.append(get_milestones_select({'project_id': 1}))

    web.form.append('<label for="title">Job Code</label><input type="text" name="job_code" value="'+data.get('job_code','')+'">')
    web.form.append('<label for="title">Subject</label><input type="text" name="title" value="'+data.get('title','')+'">')
    web.form.append('<label for="csvdata">Notes</label><textarea style="width:100%;height:100px;" name="note">'+data.get('note','')+'</textarea>')
    web.form.append('<input type="submit" value="Create Ticket" />')

    #web.container.append('')
    web.container.append(web.form.render())
    web.container.append('</div>')

    return make_response(web.container.render())
예제 #3
0
파일: index.py 프로젝트: olymk2/stomatopod
def dict_to_list(data, keys):
    return [data.get(k) for k in keys]