Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
masto fix #270
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxMaSk committed Dec 1, 2017
1 parent 77e3e43 commit 272aceb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
7 changes: 7 additions & 0 deletions django_th/templates/services/service_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ <h3>{% trans 'Adding of the service' %} {{ service_name_alone }}</h3>
</div>
{% elif service_name in SERVICES_HOSTED_WITH_AUTH %}
<div class="form-group">
{% if service_name == 'ServiceMastodon' %}
<label class="col-sm-2 control-label" for="id_username">{% trans 'Mastodon Username' %}</label>
{% else %}
<label class="col-sm-2 control-label" for="id_username">{% trans 'Username' %}</label>
{% endif %}
<div class="col-sm-6">{{ form.username }}</div>
{% if service_name == 'ServiceMastodon' %}
<div class="col-sm-offset-2 col-sm-6">{% trans "Put your email you connect with" %}</div>
{% endif %}
<div class="col-sm-offset-2 col-sm-8">{{ form.username.errors }}</div>
</div>
<div class="form-group">
Expand Down
3 changes: 2 additions & 1 deletion th_mastodon/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class Meta:

widgets = {
'tag': TextInput(attrs={'class': 'form-control'}),
'tooter': TextInput(attrs={'class': 'form-control'}),
'tooter': TextInput(attrs={'placeholder': '@username@mastodo.tld',
'class': 'form-control'}),
}

def clean(self):
Expand Down
6 changes: 3 additions & 3 deletions th_mastodon/templates/mastodon/edit_provider.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ <h3><span class="glyphicon glyphicon-edit"></span> {% trans 'Edition of the prop
{% if form.screen.errors %}
<div class="col-sm-offset-1 col-sm-6 alert alert-danger" role="alert">{{ form.screen.errors }}</div>
{% endif %}
<label for="id_tooter" class="col-sm-2 control-label">{% trans "Tooter" %}</label>
<label for="id_tooter" class="col-sm-2 control-label">{% trans "Mastodon Username" %}</label>
<div class="col-sm-6">{{ form.tooter }}</div>
<div class="col-sm-offset-2 col-sm-6">{% trans "Put the name of a user you want to get his Toots.<br/><i>user@domain.tld</i> for a remote user or just <i>user</i> if you search local toots of this user" %}</div>
<div class="col-sm-offset-2 col-sm-6">{% trans "Put the name of a user (@user@masto.tld) you want to get his Toots" %}</div>
</div>
<div class="form-group{% if form.fav.errors %} has-error{% endif %}">
{% if form.fav.errors %}
Expand All @@ -51,4 +51,4 @@ <h3><span class="glyphicon glyphicon-edit"></span> {% trans 'Edition of the prop
</fieldset>
</form>
</div>
{% endblock %}
{% endblock %}

0 comments on commit 272aceb

Please sign in to comment.