Skip to content

Commit

Permalink
Merge f235c5b into b913169
Browse files Browse the repository at this point in the history
  • Loading branch information
KonstantinaStoikou committed May 14, 2020
2 parents b913169 + f235c5b commit e73b918
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 303 deletions.
13 changes: 0 additions & 13 deletions docs/examplesapp.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Invenio-UserProfiles.

installation
configuration
examplesapp


API Reference
Expand Down
22 changes: 0 additions & 22 deletions examples/app-fixtures.sh

This file was deleted.

23 changes: 0 additions & 23 deletions examples/app-setup.sh

This file was deleted.

15 changes: 0 additions & 15 deletions examples/app-teardown.sh

This file was deleted.

134 changes: 0 additions & 134 deletions examples/app.py

This file was deleted.

12 changes: 0 additions & 12 deletions examples/requirements.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<meta charset="utf-8" />
</head>
<body>
You are logged in.
<a href="{{url_for_security('logout')}}">Log out</a>
{%- block page_body %}{%- endblock page_body %}
</body>
</html>
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 %}
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 %}
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@
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.
#}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
</head>
<body>
You are not logged in.
<a href="{{url_for_security('login')}}">Login</a>
</body>
</html>
{%- extends "invenio_userprofiles/base.html" %}

{%- block page_body %}
{%- block settings_form %}{%- endblock settings_form %}
{%- endblock page_body %}
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 %}

0 comments on commit e73b918

Please sign in to comment.