2015-08-11 03:11:14 +00:00
|
|
|
<form enctype="multipart/form-data" method="post" action="{{ sakura.currentpage }}" id="editProfileForm">
|
2015-08-10 20:04:22 +00:00
|
|
|
<input type="hidden" name="sessid" value="{{ php.sessionid }}" />
|
|
|
|
<input type="hidden" name="timestamp" value="{{ php.time }}" />
|
|
|
|
<input type="hidden" name="mode" value="profile" />
|
|
|
|
{% for field in profile.fields %}
|
|
|
|
<div class="profile-field">
|
|
|
|
<div>
|
|
|
|
<h2>{{ field.name }}</h2>
|
2015-06-19 16:12:44 +00:00
|
|
|
</div>
|
2015-08-10 20:04:22 +00:00
|
|
|
<div>
|
|
|
|
<input type="{{ field.formtype }}" name="profile_{{ field.ident }}" class="inputStyling" placeholder="{{ field.description }}"{% if profile.user[field.ident].value %} value="{{ profile.user[field.ident].value }}"{% endif %} />
|
2015-06-19 16:12:44 +00:00
|
|
|
</div>
|
2015-08-10 20:04:22 +00:00
|
|
|
{% if field.addit %}
|
|
|
|
{% for id,addit in field.addit %}
|
|
|
|
<div>
|
|
|
|
<input type="{{ addit[0] }}" id="{{ id }}" name="profile_additional_{{ id }}" />
|
|
|
|
<label for="{{ id }}" style="font-size: 10px;">{{ addit[1]|raw }}</label>
|
2015-08-08 00:37:56 +00:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2015-08-10 20:04:22 +00:00
|
|
|
{% endif %}
|
2015-06-19 16:12:44 +00:00
|
|
|
</div>
|
2015-08-10 20:04:22 +00:00
|
|
|
{% endfor %}
|
|
|
|
<div class="profile-save">
|
|
|
|
<input type="submit" value="Save" name="submit" class="inputStyling" />
|
|
|
|
<input type="reset" value="Reset" name="reset" class="inputStyling" />
|
2015-06-19 16:12:44 +00:00
|
|
|
</div>
|
2015-08-10 20:04:22 +00:00
|
|
|
</form>
|
2015-08-11 03:11:14 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
window.addEventListener("load", function() {
|
|
|
|
var editProfileForm = document.getElementById('editProfileForm');
|
|
|
|
var createInput = document.createElement('input');
|
|
|
|
var submit = editProfileForm.querySelector('[type="submit"]');
|
|
|
|
|
|
|
|
createInput.setAttribute('name', 'ajax');
|
|
|
|
createInput.setAttribute('value', 'true');
|
|
|
|
createInput.setAttribute('type', 'hidden');
|
|
|
|
editProfileForm.appendChild(createInput);
|
|
|
|
|
|
|
|
submit.setAttribute('type', 'button');
|
|
|
|
submit.setAttribute('onclick', 'submitPost(\''+ editProfileForm.action +'\', formToObject(\'editProfileForm\'), true, \'Updating Profile...\');');
|
|
|
|
});
|
|
|
|
</script>
|