Created
May 21, 2013 22:17
-
-
Save anonymous/5623731 to your computer and use it in GitHub Desktop.
A demo of crates form helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns app.ui.views | |
(:require | |
[crate.core :as crate] | |
[crate.form :as form]) | |
(:use-macros | |
[crate.def-macros :only [defpartial]])) | |
(defpartial share-modal [content] | |
[:form#create-form.modal-body.form-horizontal | |
[:div.control-group | |
(form/label {:class "control-label"} "link" "download link") | |
[:div.controls | |
(form/text-field {:class "input-xlarge"} "link" (content :url))]]]) | |
=> <form class="modal-body form-horizontal" id="create-form"> | |
<div class="control-group"> | |
<label class="control-label" for="link">download link</label> | |
<div class="controls"> | |
<input class="input-xlarge" name="link" type="text" id="link" value="http://google.com"> | |
</div> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment