stc

a simple time card webapp
git clone _git@git.brennen.work:stc.git
Log | Files | Refs | README

widget.html (1241B)


      1 <section class="punchclock">
      2 	<h2 id="clock"></h2>
      3 	{% for error in clockoutform.errors or clockinform.errors %}
      4 	<span style="color:red;">[{{ error }}]</span>
      5 	{% endfor %}
      6 	{% if clocked_out %}
      7 	<form class="widget-form" action="" method="POST" novalidate>
      8 		<div>
      9 		{{  clockinform.hidden_tag() }}
     10 		<p>{{ clockinform.projectsSel.label }}<br>{{ clockinform.projectsSel() }}</p>
     11 		<p>{{ clockinform.clockin() }}</p>
     12 		</div>
     13 	</form>
     14 	{% elif not clocked_out %}
     15 	<form class="widget-form" action="" method="POST" novalidate>
     16 		<div>
     17 		{{ clockoutform.hidden_tag() }}
     18 		<p>{{ clockoutform.lunchBox() }} {{ clockoutform.lunchBox.label }}
     19 		{{ clockoutform.per_diemBox() }} {{ clockoutform.per_diemBox.label }}</p>
     20 		<p>{{ clockoutform.recapOrNote.label }} {{ clockoutform.recapOrNote() }}</p>
     21 		<p>{{ clockoutform.clockout() }}</p>
     22 		</div>
     23 	</form>
     24 	{% else %}
     25 		<p>Neither clocked in or out! Something is wrong!</p>
     26 	{% endif %}
     27 	<!-- Add iff satement for clocked_in==True
     28 		<p> form.projects(choices=projects,default=(if(project[0]==0){return project[0].label })</p>
     29 	-->
     30 	<a href="{{ url_for('hours',username=current_user.username) }}"><button>My Hours</button></a>
     31 	<h2>{{ current_user.fname }} {{ current_user.lname }}</h2>
     32 </section>