update_user.html (1617B)
1 {% extends 'base.html' %} 2 3 {% block title %}Update Employee{% endblock %} 4 5 {% block content %} 6 <section class="new-user-grid"> 7 <h3>Update {{user.fname}}'s {{update_t}}</h3> 8 <form action="" method="POST" novalidate> 9 {{ form.hidden_tag() }} 10 {% for error in form.errors %} 11 <span style="color:red;">[{{ error }}]</span> 12 {% endfor %} 13 {% for ferror in form.form_errors %} 14 <span style="color:yellow;">[{{ ferror }}]</span> 15 {% endfor %} 16 {% if update_t == "fname" %}{{ form.fname.label }}{{ form.fname() }}{% endif %} 17 {% if update_t == "mname" %}{{ form.mname.label }}{{ form.mname(size=1) }}{% endif %} 18 {% if update_t == "lname" %}{{ form.lname.label }}{{ form.lname() }}{% endif %} 19 {% if update_t == "birthday" %}{{ form.birthday.label }}{{ form.birthday() }}{% endif %} 20 {% if update_t == "role" %}{{ form.role.label }}{{ form.role() }}{% endif %} 21 {% if update_t == "address" %}{{ form.address.label }}{{ form.address() }}{% endif %} 22 {% if update_t == "branch" %}{{ form.branch.label }}{{ form.branch() }}{% endif %} 23 {% if update_t == "phonenumber" %}{{ form.phonenumber.label }}{{ form.phonenumber() }}{% endif %} 24 {% if update_t == "email" %}{{ form.email.label }}{{ form.email() }}{% endif %} 25 {% if update_t == "payPeriod" %}{{ form.payPeriod.label }}{{ form.payPeriod() }}{% endif %} 26 {% if update_t == "payValue" %}{{ form.payValue.label }}{{ form.payValue() }}{% endif %} 27 {{ form.modUser() }} 28 </form> 29 {% with messages = get_flashed_messages() %} 30 {% if messages %} 31 {% for message in messages %} 32 <p>{{ message }}</p> 33 {% endfor %} 34 {% endif %} 35 {% endwith %} 36 </section> 37 {% endblock %}