
{% extends BASE_TEMPLATE %}

{% load staticfiles %}
{% load materializecss %}

{% block head-title %}{{ title }}{% endblock %}

{% block main %}
<link rel="stylesheet" type="text/css" href="{% static 'bom/style.css' %}" />
{% endblock %}

{% block content %}
{% if profile.role == 'A' %}
<div class="row">
    <form action="{% url 'bom:user-meta-edit' user_meta_id=user_meta.id %}" method="post" class="col s12">
        {% csrf_token %}
        {{ user_meta_form.non_field_errors }}
		<div class="row">        
        {{ user_meta_form.role|materializecss:'s12 m6' }}
        </div>
        <div class="row">
        {{ user_meta_user_form.username|materializecss:'s12 m4' }}
        </div>        
		<div class="row">        
        {{ user_meta_user_form.first_name|materializecss:'s12 m4' }}
        {{ user_meta_user_form.last_name|materializecss:'s12 m4' }}
        {{ user_meta_user_form.email|materializecss:'s12 m4' }}
        </div>
		<div class="row">
	        <div class="col s6">
                <a href="{% url 'bom:settings' %}organization" class="waves-effect waves-light btn-flat grey-text lighten-1" style="margin-left: -16px;">Cancel</a>
            </div>
            <div class="col s6 right-align">
	        	<button class="waves-effect waves-light btn green lighten-1" type="submit" name="action">Save</button>
	    	</div>
    	</div>
    </form>
</div>
{% else %}
{% include 'bom/nothing-to-see.html' with required_privilege='Admin' %}
{% endif %}
{% endblock %}