-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
94 additions
and
303 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ Invenio-UserProfiles. | |
|
||
installation | ||
configuration | ||
examplesapp | ||
|
||
|
||
API Reference | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
19 changes: 19 additions & 0 deletions
19
invenio_userprofiles/templates/semantic-ui/invenio_userprofiles/register_user.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{# -*- coding: utf-8 -*- | ||
|
||
This file is part of Invenio. | ||
Copyright (C) 2016-2018 CERN. | ||
|
||
Invenio is free software; you can redistribute it and/or modify it | ||
under the terms of the MIT License; see LICENSE file for more details. | ||
#} | ||
|
||
{%- extends config.USERPROFILES_REGISTER_USER_BASE_TEMPLATE %} | ||
|
||
{% from "invenio_accounts/_macros.html" import render_field %} | ||
|
||
{% block registration_form_fields %} | ||
{%- with form = register_user_form %} | ||
{{ render_field(form.profile, icon="lock icon", errormsg=False) }} | ||
{%- endwith %} | ||
{{ super() }} | ||
{% endblock %} |
29 changes: 29 additions & 0 deletions
29
invenio_userprofiles/templates/semantic-ui/invenio_userprofiles/settings/_macros.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{# -*- coding: utf-8 -*- | ||
|
||
This file is part of Invenio. | ||
Copyright (C) 2015-2018 CERN. | ||
|
||
Invenio is free software; you can redistribute it and/or modify it | ||
under the terms of the MIT License; see LICENSE file for more details. | ||
#} | ||
|
||
{% macro render_field(field, icon="", placeholder='', autofocus=False) %} | ||
<div class="field {% if field.errors %}error{% endif %}"> | ||
{{ field.label }} | ||
{%- set extras = dict(autofocus="") if autofocus else dict() %} | ||
{{field(class_="form-control", placeholder=placeholder, **extras)}} | ||
{%- if icon %} | ||
<i class="{{icon}}" aria-hidden="true" ></i> | ||
{%- endif %} | ||
{%- if field.description %} | ||
<small>{{ field.description }}</small> | ||
{%- endif %} | ||
{%- if field.errors %} | ||
<div class="ui negative message" role="alert"> | ||
{%- for error in field.errors %} | ||
<p>{{error}}</p> | ||
{% endfor %} | ||
</div> | ||
{%- endif %} | ||
</div> | ||
{% endmacro %} |
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
40 changes: 40 additions & 0 deletions
40
invenio_userprofiles/templates/semantic-ui/invenio_userprofiles/settings/profile.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{# -*- coding: utf-8 -*- | ||
|
||
This file is part of Invenio. | ||
Copyright (C) 2015-2018 CERN. | ||
|
||
Invenio is free software; you can redistribute it and/or modify it | ||
under the terms of the MIT License; see LICENSE file for more details. | ||
#} | ||
{%- extends config.USERPROFILES_SETTINGS_TEMPLATE %} | ||
|
||
{% from "invenio_userprofiles/settings/_macros.html" import render_field, form_errors %} | ||
|
||
{% set panel_title = _("Profile") %} | ||
{% set panel_icon = "user icon" %} | ||
|
||
{%- block settings_form %} | ||
{%- if security.confirmable and not current_user.confirmed_at %} | ||
<form method="POST" role="form"> | ||
{{ verification_form.csrf_token }} | ||
<div class="ui warning message"> | ||
{{ _("You have not yet verified your email address.") }} {{ verification_form.send_verification_email(class_="compact ui small basic button") }} | ||
</div> | ||
<input type="hidden" name="submit" value="verification" /> | ||
</form> | ||
{%- endif %} | ||
{%- set form = profile_form %} | ||
<form method="POST" name="profile_form" class="ui form"> | ||
{%- for field in form %} | ||
{%- if field.widget.input_type == 'hidden' %} | ||
{{ field() }} | ||
{%- else %} | ||
{{ render_field(field, autofocus=True, placeholder=field.label.text) }} | ||
{%- endif %} | ||
{%- endfor %} | ||
<div class="form-actions"> | ||
<a href="." class="ui secondary basic button"><i class="close icon"></i> {{ _('Cancel') }}</a> | ||
<button type="submit" name="submit" value="profile" class="ui primary button"><i class="close icon"></i> {{ _('Update profile') }}</button> | ||
</div> | ||
</form> | ||
{%- endblock settings_form %} |
Oops, something went wrong.