Skip to content

Commit

Permalink
Version 3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jshah4517 committed Jun 1, 2021
1 parent 86a260a commit 2d13b70
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 13 deletions.
1 change: 1 addition & 0 deletions head_common.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="token" content="{{ Request.input('token') }}" />
<meta name="date_format" content="{{ Config.get('settings.date_format') }}" />
<meta name="time_format" content="{{ Config.get('settings.time_format') }}" />
<meta name="default_country" content="{{ Config.get('settings.default_country') }}" />
<meta name="max_file_size" content="{{ max_file_size }}" />
<meta name="allowed_files" content="{{ allowed_files }}" />
<meta name="environment" content="{{ Config.get('app.environment') }}" />
Expand Down
4 changes: 2 additions & 2 deletions selfservice/article.twig
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
<!-- Share -->
<div class="sp-w-full md:sp-w-1/2">
<span>{{ Lang.get('general.share_via') }}</span>
<a href="mailto:?body={{ article.title }} - {{ article.url(type) }}"
<a href="mailto:?body={{ article.title|url_encode }} - {{ article.url(type) }}"
class="sp-inline-block sp-h-8 sp-w-8 sp-p-1 sp-ml-1 sp-bg-gray-600 sp-rounded-full sp-text-white
sp-text-center sp-align-middle hover:sp-text-white group">
<i class="fas fa-envelope group-hover:sp-opacity-75"></i>
</a><!--
--><a href="http://twitter.com/intent/tweet?text={{ article.title }}&amp;url={{ article.url(type) }}"
--><a href="http://twitter.com/intent/tweet?text={{ article.title|url_encode }}&amp;url={{ article.url(type) }}"
class="sp-inline-block sp-h-8 sp-w-8 sp-p-1 sp-ml-2 sp-rounded-full sp-text-white sp-text-center
sp-align-middle hover:sp-text-white group" style="background: #55acee">
<i class="fab fa-twitter group-hover:sp-opacity-75"></i>
Expand Down
9 changes: 9 additions & 0 deletions user/forms/phone_number.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="sp-phone-number {% if hide|default is not empty %}sp-hidden{% endif %}">
{{ form_hidden('phone[' ~ (number|default is not empty ? number.id : '') ~ '][id]', number|default is not empty ? number.id : null) }}

{{ form_tel('phone[' ~ (number|default is not empty ? number.id : '') ~ '][number]', number|default is not empty ? number.number : null) }}

<div class="sp-block sp-mt-2 xs:sp-inline-block xs:sp-mt-0">
{{ form_button(Lang.get('general.remove'), {'class': 'sp-remove-number'}) }}
</div>
</div>
35 changes: 24 additions & 11 deletions user/forms/user_profile.twig
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,24 @@
</div>
{% endif %}

<div class="sp-form-row">
{{ form_label('phone', Lang.choice('user.phone_number', 2)) }}
<div class="sp-input-container">
{% include 'operator.' ~ template ~ '.user.forms.phone_number' with {'hide': true} %}

{% for number in record.phonenumbers %}
{% include 'operator.' ~ template ~ '.user.forms.phone_number' %}
{% endfor %}

{{ form_button(Lang.get('general.add'), {'class': 'sp-add-number'}) }}
</div>
</div>

<div class="sp-form-row">
{{ form_label('country', Lang.get('user.country')) }}
<div class="sp-input-container">
{{ form_select('country', countries(),
organisation_add is defined and organisation.country|default is not empty ? organisation.country :
organisation_add is defined and organisation.country|default is not empty ? organisation.country :
record.country|default is not empty ? record.country : Config.get('settings.default_country')) }}
</div>
</div>
Expand Down Expand Up @@ -105,15 +118,15 @@
{{ form_label('avatar', Lang.get('user.avatar')) }}
<div class="sp-input-container">
<img class="sp-avatar" src="{{ record.avatar_url }}" />
<div class="sp-mt-3 lg:sp-inline-block lg:sp-mt-0 lg:sp-ml-3">
{{ form_file('avatar') }}
<div class="{% if record.getOriginal('avatar') is not null %}sp-button-group{% endif %} sp-mt-3">
<label class="sp-button">
<input type="file" name="avatar" class="sp-hidden" data-url="{{ route('user.avatar.upload', {id: record.id}) }}" />
{{ Lang.get('general.update') }}
</label>
<button class="remove-avatar {% if record.getOriginal('avatar') is null %}sp-hidden{% endif %}" type="button"
data-url="{{ route('user.avatar.delete', {id: record.id}) }}">
{{ Lang.get('general.remove') }}
</button>
</div>
{% if record.getOriginal('avatar') is not null %}
<div class="sp-mt-3">
<button class="remove-avatar" type="button" data-url="{{ route('user.avatar.delete') }}">
{{ Lang.get('user.remove_avatar') }}
</button>
</div>
{% endif %}
</div>
</div>
</div>
4 changes: 4 additions & 0 deletions user/organisation_add.twig
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
{% endblock %}

{% block scripts_footer %}
<!-- Phone numbers -->
<script type="text/javascript" src="{{ asset_rev('resources/assets/libs/intltelinput/js/intl-tel-input.min.js') }}"></script>
<script type="text/javascript" src="{{ asset_rev('resources/assets/general/js/phonenumbers.js') }}"></script>

<!-- Redactor -->
<script src="{{ asset_rev('resources/assets/libs/editor.min.js') }}"></script>
<script src="{{ asset_rev('resources/assets/general/js/editor_config.js') }}"></script>
Expand Down
13 changes: 13 additions & 0 deletions user/profile.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
{{ Lang.get('user.profile') }}
{% endblock %}

{% block precontent %}
<div class="sp-alert sp-alert-success sp-alert-sticky sp-hidden action">
{{ Lang.get('messages.success_action') }}
</div>
{% endblock %}

{% block content %}

{{ form_model(record, {'route': 'user.profile.update', 'method': 'PUT', 'files': true, 'class': 'validate'}) }}
Expand Down Expand Up @@ -38,14 +44,21 @@
{% endblock %}

{% block scripts_footer %}
<!-- Phone numbers -->
<script type="text/javascript" src="{{ asset_rev('resources/assets/libs/intltelinput/js/intl-tel-input.min.js') }}"></script>
<script type="text/javascript" src="{{ asset_rev('resources/assets/general/js/phonenumbers.js') }}"></script>

<!-- Redactor -->
<script src="{{ asset_rev('resources/assets/libs/editor.min.js') }}"></script>
<script src="{{ asset_rev('resources/assets/general/js/editor_config.js') }}"></script>

<!-- Custom fields -->
<script src="{{ asset_rev('resources/assets/general/js/customfields.js') }}"></script>

<link rel="stylesheet" type="text/css" href="{{ asset_rev('resources/assets/libs/cropper/css/cropper.min.css') }}" />
<script type="text/javascript" src="{{ asset_rev('resources/assets/libs/cropper/js/cropper.min.js') }}"></script>
<script type="text/javascript" src="{{ asset_rev('resources/assets/general/js/user.js') }}"></script>

<script type="text/javascript">
$(document).ready(function() {
// Enable hide/show password toggle
Expand Down
4 changes: 4 additions & 0 deletions user/register.twig
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
{% endblock %}

{% block scripts_footer %}
<!-- Phone numbers -->
<script type="text/javascript" src="{{ asset_rev('resources/assets/libs/intltelinput/js/intl-tel-input.min.js') }}"></script>
<script type="text/javascript" src="{{ asset_rev('resources/assets/general/js/phonenumbers.js') }}"></script>

<!-- Redactor -->
<script src="{{ asset_rev('resources/assets/libs/editor.min.js') }}"></script>
<script src="{{ asset_rev('resources/assets/general/js/editor_config.js') }}"></script>
Expand Down

0 comments on commit 2d13b70

Please sign in to comment.