Merge branch 'master' into elastic

This commit is contained in:
2017-12-08 12:55:57 +01:00
22 changed files with 289 additions and 214 deletions

View File

@@ -72,7 +72,8 @@
| none
| {% endif %}
a#button-cancel.btn.btn-default(href="#", data-user-id='{{user.user_id}}') Cancel
a.btn.btn-default(href="javascript:update_from_bid()") Update from Blender ID
a.btn.btn-default(href="javascript:$('#user-edit-container').html('')") Cancel
input#submit_edit_user.btn.btn-default(
data-user-id="{{user.user_id}}",
@@ -101,10 +102,18 @@ script(type="text/javascript").
//- $("#user-edit-form").submit();
});
$('#button-cancel').click(function(e){
$('#user-container').html('')
});
new Clipboard('.copy-to-clipboard');
function update_from_bid() {
var url = '{{ url_for("blender_cloud.subscription.update_subscription_for", user_id=user.user_id) }}';
$.post(url)
.done(function(data) {
toastr.info('User updated from Blender ID');
displayUser('{{ user.user_id }}');
})
.fail(function(data) {
toastr.error(data.responseText);
});
}
| {% endblock %}

View File

@@ -11,13 +11,6 @@
.settings-form
form#settings-form(method='POST', action="{{url_for('settings.profile')}}")
.left
.form-group
| {{ form.full_name.label }}
| {{ form.full_name(size=20, class='form-control') }}
| {% if form.full_name.errors %}
| {% for error in form.full_name.errors %}{{ error|e }}{% endfor %}
| {% endif %}
.form-group
| {{ form.username.label }}
| {{ form.username(size=20, class='form-control') }}
@@ -25,8 +18,15 @@
| {% for error in form.username.errors %}{{ error|e }}{% endfor %}
| {% endif %}
.form-group.settings-password
| {{ _("Change your password at") }} #[a(href="https://blender.org/id/change") Blender ID]
.form-group
label {{ _("Full name") }}
p {{ current_user.full_name }}
.form-group
label {{ _("E-mail") }}
p {{ current_user.email }}
.form-group
| {{ _("Change your full name, email, and password at") }} #[a(href="https://www.blender.org/id/settings/profile",target='_blank') Blender ID].
.right
.settings-avatar