include ../mixins

form.form-horizontal.subroot#form_pentry(role="form", method="POST", action="")
	.new_flex_zero
		.container-fluid(style="margin-bottom: 20px;")
			button.btn.btn-success.btn-sm(type="submit") 
				span.glyphicon.glyphicon-ok(aria-hidden="true")
				span 
				span Übernehmen
			
			+messageview(messages.other)
	
	.new_flex_one
		.container-fluid
		
			.form-group
				label(for='edit_kontext', class="col-sm-2 control-label") Kontext
				.col-sm-10
					.input-group
						input(id="edit_kontext_dn", type="hidden", name="punit_dn", value="#{away.punit.dn}")
						input(id="edit_kontext", type="text", name="punit_name", class="form-control", value="#{away.punit.name}", readonly)
						span(class="input-group-btn")
							button(class="btn btn-default", type="button", onclick="pcal_pentry_edit_manager.save_and_goto('select_pastoralunit', {})") Ändern

			.form-group
				label(for='edit_name', class="col-sm-2 control-label") Abwesende Person
				.col-sm-10
					.input-group
						input(id="edit_involveddb_id", type="hidden", name="involveddb_id", value="#{away.involveddb_id}")
						input(id="edit_name", type="text", name="edit_name", class="form-control noDirectInput", value="#{away.name}", required)
						span(class="input-group-btn")
							button(class="btn btn-default", type="button", onclick="pcal_pentry_edit_manager.save_and_goto('add_actor', {role: ''})") Ändern
					.help-block.with-errors
			#messageview_involved_primary
				if messages.involved.primary.length > 0
					+messageview(messages.involved.primary)

			.form-group
				label(for='edit_reason', class="col-sm-2 control-label") Grund
				.col-sm-10
					input(id='edit_reason', type="text", class="form-control noEnterSubmit", name="edit_reason", value="#{away.reason}", required)
					.help-block.with-errors
	
