Redbeard / templates / new_set.html

{% extends "layout.html" %}
{% block leftblock %}
		<h1>Add New Set</h1>
	{% from "_partials.html" import render_field %}
	<form action="{{ url_for('new_set') }}" method="post" id="new_key_form">
		{{ form.csrf }}
		{{ render_field(form.key_name) }}
		{{ render_field(form.member) }}
		{{ render_field(form.key_ttl, type="number", class="optional") }}
		<a href="{{ url_for('index') }}" id="cancel">cancel</a>
		<input type="submit" value="Submit">

{% endblock %}

{% block extra_scripts %}
	var add_link = $('<a class="add_member">+</a>'),
		$member = $("#member").parent('fieldset');
	$(function() {
		$(".add_member").live('click', function() {
			var $new_member = $member.clone(),
				count = $("[id^=member]").length,
				new_id = $new_member.find('input').attr('id') + '_' + count,
				$insert_point = $("#key_ttl").parent('fieldset');
			$("input", $new_member).attr({'id': new_id, 'name': new_id, 'value': ''});
			$("label", $new_member).attr('for', new_id);
{% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.