Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form class="form" role="form" action="" method="post">
- {% csrf_token %}
- <div class="form-group label-floating">
- <label class="control-label" for="{{ form.company.id_for_label}}">Company</label>
- <select class="form-control" name="{{ form.company.name }}" id="{{ form.company.id_for_label}}">
- <option value=""></option>
- {% for id, name in form.company.field.choices %}
- <option value="{{ id }}" class="option">{{ name }}</option>
- {% endfor %}
- </select>
- </div>
- <div class="form-group label-floating">
- <label class="control-label" for="{{ form.name.id_for_label}}">Job Title</label>
- <input type="text" id="{{ form.name.id_for_label }}" name="{{ form.name.name }}" class="form-control">
- </div>
- <div class="row">
- <div class="col-md-6">
- <div class="form-group label-floating">
- <label class="control-label" for="{{ form.description.id_for_label}}">{{ form.description.label }}</label>
- <div class="markdownx">
- {{ form.description|add_css:'form-control' }}
- </div>
- </div>
- </div>
- </div>
- <div class="form-group label-floating">
- <label class="control-label" for="{{ form.category.id_for_label}}">{{ form.category.label }}</label>
- <select class="form-control" name="{{ form.category.name }}" id="{{ form.category.id_for_label}}">
- <option value=""></option>
- {% for id, name in form.category.field.choices %}
- <option value="{{ id }}">{{ name }}</option>
- {% endfor %}
- </select>
- </div>
- <div class="form-group label-floating">
- <label class="control-label" for="{{ form.city.id_for_label}}">{{ form.city.label }}</label>
- <input type="text" id="{{ form.city.id_for_label }}" name="{{ form.city.name }}" class="form-control">
- </div>
- <div class="form-group label-floating">
- <label class="control-label" for="{{ form.address.id_for_label}}">{{ form.address.label }}</label>
- <input type="text" id="{{ form.address.id_for_label }}" name="{{ form.address.name }}" class="form-control">
- </div>
- </form>
- {% load add_css %}
- <div class="row">
- <div class="col-lg-12">
- <div class="text-center m-t-lg">
- <form class="form-horizontal" role="form" action="" method="post" enctype='multipart/form-data'>
- {% csrf_token %}
- {% for field in form %}
- {% if field.errors %}
- <div class="form-group has-error">
- <label class="col-sm-2 control-label" for="id_{{ field.name }}">{{ field.label }}</label>
- <div class="col-sm-10">
- {{ field|add_css:'form-control' }}
- <span class="help-block">
- {% for error in field.errors %}{{ error }}{% endfor %}
- </span>
- </div>
- </div>
- {% else %}
- <div class="form-group">
- <label class="col-sm-2 control-label" for="id_{{ field.name }}">{{ field.label }}</label>
- <div class="col-sm-10">
- {{ field|add_css:'form-control' }}
- {% if field.help_text %}
- <p class="help-block"><small>{{ field.help_text }}</small></p>
- {% endif %}
- </div>
- </div>
- {% endif %}
- {% endfor %}
- <div class="form-group">
- <div class="col-sm-offset-2 col-sm-10">
- <button type="submit" class="btn btn-primary">Submit</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement