Created
October 16, 2012 20:15
-
-
Save mledom/3901694 to your computer and use it in GitHub Desktop.
URL ajax form
This file contains 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
<div class='hidden title'>New Link</div> | |
<form accept-charset="UTF-8" action="/urls" class="new_url" data-validate="true" id="new_url" method="post" novalidate="novalidate"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="E800evqLMvkkuaodl+uiE0xHGr9OFhVQfSK+S+dHwEo=" /></div> | |
<i class='external-link-icon hidden'></i> | |
<div class='section'> | |
<h3 class='section-title'> | |
<i class='details-icon icon-large'></i> | |
Details | |
</h3> | |
<div class='section-content'> | |
<div class='field'> | |
<input id="url_agency_id" name="url[agency_id]" type="hidden" value="2" /> | |
<input id="url_client_id" name="url[client_id]" type="hidden" value="2" /> | |
</div> | |
<div class='field'> | |
<label for="url_name">Name</label> | |
<div class='input'><input id="url_name" name="url[name]" size="30" type="text" /></div> | |
</div> | |
<div class='field'> | |
<label class="required" for="url_link_text">URL</label> | |
<div class='input'><input id="url_link_text" name="url[link_text]" size="30" type="text" /></div> | |
</div> | |
</div> | |
</div> | |
<input class="hidden" name="commit" type="submit" value="Create" /> | |
</form> | |
<script>//<![CDATA[ | |
if(window.ClientSideValidations==undefined)window.ClientSideValidations={};if(window.ClientSideValidations.forms==undefined)window.ClientSideValidations.forms={};window.ClientSideValidations.forms['new_url'] = {"type":"ActionView::Helpers::FormBuilder","input_tag":"<div class=\"field_with_errors\"><span id=\"input_tag\" /><label for=\"\" class=\"message\"></label></div>","label_tag":"<div class=\"field_with_errors\"><label id=\"label_tag\" /></div>","validators":{"url[link_text]":{"presence":[{"message":"Link text is required"}],"format":[{"message":"For security reasons urls must be valid https links","with":/^(https:\/\/)?[a-z0-9]+([-.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/i}]}}}; | |
//]]></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment