| lombardof | fb37bca | 2018-05-03 16:20:04 +0200 | [diff] [blame] | 1 | {% extends "base.html" %} |
| 2 | |
| 3 | {% load staticfiles %} |
| 4 | |
| 5 | {% block head_block %} |
| 6 | {{ block.super }} |
| 7 | <link rel="stylesheet" href="{% static "bower_components/admin-lte/plugins/select2/select2.css" %}"> |
| 8 | |
| 9 | <style type="text/css"> |
| 10 | |
| 11 | input:required:invalid, input:focus:invalid { |
| 12 | |
| 13 | background-position: right top; |
| 14 | background-repeat: no-repeat; |
| 15 | } |
| 16 | input:required:valid { |
| 17 | |
| 18 | background-position: right top; |
| 19 | background-repeat: no-repeat; |
| 20 | } |
| 21 | |
| 22 | </style> |
| 23 | {% endblock %} |
| 24 | |
| 25 | {% block left_sidebar %} |
| 26 | {% include 'left_sidebar_base.html' %} |
| 27 | {% endblock %} |
| 28 | |
| 29 | {% block breadcrumb_body %} |
| 30 | {{ block.super }} |
| 31 | <li><a href='{% url "projects:new_project" %}'>New Project</a></li> |
| 32 | {% endblock %} |
| 33 | |
| 34 | {% block content_body %} |
| 35 | {{ block.super }} |
| 36 | <div class="row"> |
| 37 | <div class="col-md-12"> |
| 38 | <!-- general form elements --> |
| 39 | <div class="box box-primary"> |
| 40 | <div class="box-header with-border"> |
| 41 | <h3 class="box-title">New Project</h3> |
| 42 | </div> |
| 43 | <!-- /.box-header --> |
| 44 | <!-- form start --> |
| 45 | <form role="form" method="post" enctype="multipart/form-data"> |
| 46 | {% csrf_token %} |
| 47 | <div class="box-body"> |
| 48 | <div class="row"> |
| 49 | <div class="form-group col-xs-3"> |
| 50 | <p for="typeButtonsSelect">Project Type</p> |
| 51 | <input type="hidden" class="form-control input-sm" name="type" id="projectType" |
| 52 | required> |
| 53 | <select id="select_type" class="js-example-basic-single form-control" style="width: 75%"> |
| 54 | |
| 55 | </select> |
| 56 | |
| 57 | </div> |
| 58 | <div class="form-group col-xs-4"> |
| 59 | <p for="projectName">Project Name</p> |
| 60 | <input type="text" class="form-control input-sm" name="name" id="projectName" |
| 61 | placeholder="Enter Project name" required> |
| 62 | </div> |
| 63 | <div class="form-group col-xs-4"> |
| 64 | <p for="projectInfo">Info</p> |
| 65 | <input type="text" class="form-control input-sm" name="info" id="projectInfo" |
| 66 | placeholder="Short Description"> |
| 67 | </div> |
| 68 | |
| 69 | |
| 70 | </div> |
| 71 | <div class="row"> |
| 72 | <div id="startGroup" class="form-group col-xs-5" style="display: none;"> |
| 73 | |
| 74 | |
| 75 | <div id="startButtonsSelect" class="btn-group" data-toggle="buttons"> |
| 76 | <label id="s-scratch" class="btn btn-primary active"> |
| 77 | <input id="scratch" type="radio" name="startfrom" autocomplete="off" value="scratch"> |
| 78 | Empty project |
| 79 | </label> |
| 80 | <label id="s-example" class="btn btn-primary"> |
| 81 | <input type="radio" name="startfrom" autocomplete="off" value="example"> |
| 82 | Example project |
| 83 | </label> |
| 84 | <label id="s-files" class="btn btn-primary"> |
| 85 | <input type="radio" name="startfrom" autocomplete="off" value="files"> |
| 86 | Load files |
| 87 | </label> |
| 88 | |
| 89 | |
| 90 | </div> |
| 91 | </div> |
| 92 | </div> |
| 93 | <div id="typeStartContainer" class="row"> |
| 94 | <div class="form-group col-xs-8"> |
| 95 | {% autoescape off %}{{ type_container_template }}{% endautoescape %} |
| 96 | </div> |
| 97 | </div> |
| 98 | |
| 99 | <!-- /.box-body --> |
| 100 | </div> |
| 101 | <div class="box-footer"> |
| 102 | <button id="createButton" type="submit" class="btn btn-primary" disabled>Create</button> |
| 103 | </div> |
| 104 | </form> |
| 105 | </div> |
| 106 | <!-- /.box --> |
| 107 | |
| 108 | </div> |
| 109 | </div> |
| 110 | {% endblock %} |
| 111 | |
| 112 | {% block resource_block %} |
| 113 | {{ block.super }} |
| 114 | <!-- Select2 --> |
| 115 | <script src="{% static "bower_components/admin-lte/plugins/select2/select2.full.min.js" %}"></script> |
| 116 | |
| 117 | <script src="{% static "src/projecthandler/new_project.js" %}"></script> |
| 118 | <script> |
| 119 | {% if data_type_selector %} |
| 120 | var data_type_selector ={{ data_type_selector |safe }}; |
| 121 | {% endif %} |
| 122 | |
| 123 | {% if type_example_files %} |
| 124 | var type_example_files = {{type_example_files | safe}}; |
| 125 | {% endif %} |
| 126 | |
| 127 | </script> |
| 128 | {% endblock %} |
| 129 | |