Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post" accept-charset="UTF-8" enctype="multipart/form-data">
- {{ getCsrfInput() }}
- <input type="hidden" name="action" value="users/saveUser">
- <input type="hidden" name="redirect" value="partners/view/{{ user.id }}">
- <input type="hidden" name="userId" value="{{ user.id }}">
- {% macro errorList(errors) %}
- {% if errors %}
- <ul class="errors">
- {% for error in errors %}
- <li>{{ error }}</li>
- {% endfor %}
- </ul>
- {% endif %}
- {% endmacro %}
- {% from _self import errorList %}
- <div class="row">
- <div class="col-xs-12 col-sm-6">
- <label for="firstName">First Name:</label>
- <input id="firstName" name="firstName" autocomplete="off" type="text" data-parsley-required="true" value="{{ user.firstName }}">
- {% if account is defined %}{{ errorList(account.getErrors('firstName')) }}{% endif %}
- </div>
- <div class="col-xs-12 col-sm-6">
- <label for="lastName">Last Name:</label>
- <input id="lastName" name="lastName" autocomplete="off" type="text" data-parsley-required="true" value="{{ user.lastName }}">
- {% if account is defined %}{{ errorList(account.getErrors('lastName')) }}{% endif %}
- </div>
- </div>
- <div class="row">
- <div class="col-xs-12">
- <label for="email">Email:</label>
- <input id="email" name="email" autocomplete="off" type="email" data-parsley-required="true" data-parsley-type="email" value="{{ user.email }}">
- {% if account is defined %}{{ errorList(account.getErrors('email')) }}{% endif %}
- </div>
- </div>
- <div class="row">
- <div class="col-xs-12 col-sm-6">
- <label for="fields[userPosition]">Position:</label>
- <input id="userPosition" name="fields[userPosition]" autocomplete="off" type="text" data-parsley-required="true" value="{{ user.userPosition }}">
- {% if account is defined %}{{ errorList(account.getErrors('userPosition')) }}{% endif %}
- </div>
- <div class="col-xs-12 col-sm-6">
- <label for="fields[userCompany]">Company:</label>
- <input id="userCompany" name="fields[userCompany]" autocomplete="off" type="text" data-parsley-required="true" value="{{ user.userCompany }}">
- {% if account is defined %}{{ errorList(account.getErrors('userCompany')) }}{% endif %}
- </div>
- </div>
- <div class="row">
- <div class="col-xs-12">
- <label for="userPhoto">User Photo:</label>
- {% if user.photoUrl %}
- <img src="{{ userPhotoUrl }}" id="userPhoto" width="100" height="100" />
- <input type="hidden" name="deleteUserPhoto" id="input-delete-user-photo" value="">
- {% else %}
- <img src="{{ userPhotoUrl }}" width="100" height="100" alt="No User Photo" />
- {% endif %}
- <input id="profilePhoto" type="file" accept="image/*" capture="camera" name="userPhoto" value="{{ (user.photoUrl ? 'Change Photo' : 'Upload') }}">
- {% if user.photoUrl %}
- <a id="btn-delete-user-photo" class="btn btn-solid btn-xs">Delete</a>
- {% endif %}
- {% if account is defined %}{{ errorList(account.getErrors('userPhoto')) }}{% endif %}
- </div>
- </div>
- {% includeJsResource "lib/redactor/redactor.js" %}
- {% includeCssResource "lib/redactor/redactor.css" %}
- <div class="row">
- <div class="col-xs-12">
- <label for="userDescription">User Description:</label>
- <textarea id="userDescription" name="fields[userDescription]" autocomplete="off" data-parsley-required="true">{{ user.userDescription }}</textarea>
- {% if account is defined %}{{ errorList(account.getErrors('userDescription')) }}{% endif %}
- </div>
- </div>
- <div class="row">
- <div class="col-xs-12">
- <label for="userSpecialisms">User Specialisms:</label>
- <textarea id="userSpecialisms" name="fields[userSpecialisms]" autocomplete="off" data-parsley-required="true">{{ user.userSpecialisms }}</textarea>
- {% if account is defined %}{{ errorList(account.getErrors('userSpecialisms')) }}{% endif %}
- </div>
- </div>
- <button type="submit" class="btn btn-solid">Save</button>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement