-
-
Save justinfrench/630503 to your computer and use it in GitHub Desktop.
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
= semantic_form_for @user_profile, :url => user_user_profile_path(@user), :html => {:multipart => true} do |form| | |
%p.large Personal information | |
%hr.profile | |
%p.smlTitle Phone Number | |
= form.inputs do | |
= form.semantic_fields_for :profile_phones do |phone| | |
= render 'profile_phone_fields', :form => phone | |
= link_to_add_fields "Add Phone", form, :profile_phones, "addPhone" | |
= form.buttons |
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
= form.input :id, :as => :hidden | |
= form.input :number, :label => false | |
= form.input :phone_type, :label => false, :as => :select, :collection => User.phone_type | |
= form.input :_destroy, :label => "Remove", :as => :boolean |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'> | |
<head> | |
<title>Edit Profile</title> | |
<meta content='text/html; charset=utf-8' http-equiv='Content-type' /> | |
<meta name="csrf-param" content="authenticity_token"/> | |
<meta name="csrf-token" content="OHjH2Q+/b/kkV267KVSEf4VLyoQ8x16uw+AxCBvfGgo="/> | |
</head> | |
<body> | |
<div id='content'> | |
<form accept-charset="UTF-8" action="/users/15/profile" class="formtastic user_profile" enctype="multipart/form-data" id="edit_user_profile_8" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="_method" type="hidden" value="put" /><input name="authenticity_token" type="hidden" value="OHjH2Q+/b/kkV267KVSEf4VLyoQ8x16uw+AxCBvfGgo=" /></div> | |
<p class='large'>Personal information</p> | |
<hr class='profile' /> | |
<p class='smlTitle'>Phone Number</p> | |
<fieldset class="inputs"><ol> <li class="string optional" id="user_profile_profile_phones_attributes_0_number_input"><input id="user_profile_profile_phones_attributes_0_number" maxlength="255" name="user_profile[profile_phones_attributes][0][number]" size="50" type="text" value="sadf" /></li> | |
<li class="boolean optional" id="user_profile_profile_phones_attributes_0__destroy_input"><label for="user_profile_profile_phones_attributes_0__destroy"><input name="user_profile[profile_phones_attributes][0][_destroy]" type="hidden" value="0" /><input id="user_profile_profile_phones_attributes_0__destroy" name="user_profile[profile_phones_attributes][0][_destroy]" type="checkbox" value="1" />Remove Phone</label></li> | |
<input id="user_profile_profile_phones_attributes_0_id" name="user_profile[profile_phones_attributes][0][id]" type="hidden" value="2" /> <li class="string optional" id="user_profile_profile_phones_attributes_1_number_input"><input id="user_profile_profile_phones_attributes_1_number" maxlength="255" name="user_profile[profile_phones_attributes][1][number]" size="50" type="text" value="asdfas" /></li> | |
<li class="boolean optional" id="user_profile_profile_phones_attributes_1__destroy_input"><label for="user_profile_profile_phones_attributes_1__destroy"><input name="user_profile[profile_phones_attributes][1][_destroy]" type="hidden" value="0" /><input id="user_profile_profile_phones_attributes_1__destroy" name="user_profile[profile_phones_attributes][1][_destroy]" type="checkbox" value="1" />Remove Phone</label></li> | |
<input id="user_profile_profile_phones_attributes_1_id" name="user_profile[profile_phones_attributes][1][id]" type="hidden" value="3" /> | |
</ol></fieldset> | |
<a href="#" id="addPhone" onclick="add_fields(this.id, "profile_phones", "<li class=\"string optional\" id=\"user_profile_profile_phones_attributes_new_profile_phones_number_input\"><input id=\"user_profile_profile_phones_attributes_new_profile_phones_number\" maxlength=\"255\" name=\"user_profile[profile_phones_attributes][new_profile_phones][number]\" size=\"50\" type=\"text\" /><\/li>\n<li class=\"boolean optional\" id=\"user_profile_profile_phones_attributes_new_profile_phones__destroy_input\"><label for=\"user_profile_profile_phones_attributes_new_profile_phones__destroy\"><input name=\"user_profile[profile_phones_attributes][new_profile_phones][_destroy]\" type=\"hidden\" value=\"0\" /><input id=\"user_profile_profile_phones_attributes_new_profile_phones__destroy\" name=\"user_profile[profile_phones_attributes][new_profile_phones][_destroy]\" type=\"checkbox\" value=\"1\" />Remove Phone<\/label><\/li>\n"); return false;">Add Phone</a> | |
<fieldset class="buttons"><ol><li class="commit"><input class="update" id="user_profile_submit" name="commit" type="submit" value="Update User profile" /></li></ol></fieldset> | |
</form> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment