220 lines
8.8 KiB
HTML
220 lines
8.8 KiB
HTML
<section>
|
|
{% if id %}
|
|
<ul class="list thick">
|
|
<li>
|
|
{% if conference %}
|
|
<span class="primary icon bubble">
|
|
<img src="{{ conference.picture }}">
|
|
</span>
|
|
<span class="control icon gray divided active" onclick="RoomsUtils_ajaxRemove('{{ conference.jid|echapJS }}');">
|
|
<i class="material-symbols">delete</i>
|
|
</span>
|
|
{% endif %}
|
|
<div>
|
|
<p class="line">{% if conference %}{{ conference.title }}{% else %}{{ id }}{% endif %}</p>
|
|
<p>{{ __('chatrooms.edit') }}</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
{% else %}
|
|
<h3>{{ __('chatrooms.create') }}</h3>
|
|
{% endif %}
|
|
|
|
<form name="bookmarkmucadd">
|
|
{% if create %}
|
|
<div>
|
|
<ul class="list middle">
|
|
<li>
|
|
<span class="primary icon gray">
|
|
<i class="material-symbols">people_alt</i>
|
|
</span>
|
|
<span class="control">
|
|
<div class="radio">
|
|
<input name="type" value="groupchat"
|
|
id="type_groupchat" type="radio"
|
|
checked>
|
|
<label for="type_groupchat"></label>
|
|
</div>
|
|
</span>
|
|
<div>
|
|
<p>{{ __('room.group_chat') }}</p>
|
|
<p>{{ __('room.group_chat_text') }}</p>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<span class="primary icon gray">
|
|
<i class="material-symbols">wifi_tethering</i>
|
|
</span>
|
|
<span class="control">
|
|
<div class="radio">
|
|
<input name="type" value="channel"
|
|
id="type_channel" type="radio">
|
|
<label for="type_channel"></label>
|
|
</div>
|
|
</span>
|
|
<div>
|
|
<p>{{ __('room.channel') }}</p>
|
|
<p>{{ __('room.channel_text') }}</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div>
|
|
<input
|
|
{% if conference %}
|
|
value="{{ conference.name }}"
|
|
{% elif info %}
|
|
value="{{ info.name }}"
|
|
{% elif name %}
|
|
value="{{ name }}"
|
|
{% endif %}
|
|
name="name"
|
|
placeholder="{{ __('chatrooms.name_placeholder') }}"
|
|
onblur="RoomsUtils_ajaxResolveSlug(this.value)"
|
|
required />
|
|
<label>{{ __('general.name') }}</label>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if id and not create %}
|
|
<input type="hidden" value="{{ id }}" name="jid"/>
|
|
{% else %}
|
|
<div id="bookmarkmucadd_jid">
|
|
<input
|
|
name="jid"
|
|
{% if mucservice %}
|
|
placeholder="chatroom@{{ mucservice.server }}"
|
|
{% else %}
|
|
placeholder="chatroom@server.com"
|
|
{% endif %}
|
|
type="email"
|
|
list="suggestions"
|
|
oninput="Rooms.cleanId(this); Rooms.suggest()"
|
|
required />
|
|
<label>{{ __('chatrooms.id') }}</label>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div>
|
|
<ul class="list">
|
|
{% if not create %}
|
|
<li>
|
|
<div>
|
|
<input
|
|
{% if conference %}
|
|
value="{{ conference.name }}"
|
|
{% elif info %}
|
|
value="{{ info.name }}"
|
|
{% elif name %}
|
|
value="{{ name }}"
|
|
{% endif %}
|
|
name="name"
|
|
type="hidden"
|
|
required />
|
|
</div>
|
|
</li>
|
|
{% endif %}
|
|
|
|
<li>
|
|
<span class="primary icon gray">
|
|
<i class="material-symbols">person_book</i>
|
|
</span>
|
|
<div>
|
|
<input
|
|
{% if conference and conference.nick %}
|
|
value="{{ conference.nick }}"
|
|
{% else %}
|
|
value="{{ username }}"
|
|
{% endif %}
|
|
name="nick"
|
|
placeholder="{{ username }}"/>
|
|
<label>{{ __('general.nickname') }}</label>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<span class="primary icon gray">
|
|
<i class="material-symbols">edit_notifications</i>
|
|
</span>
|
|
<div>
|
|
<div class="select">
|
|
<select name="notify">
|
|
<option value="never" {% if conference and conference.notify == 0 %}selected{% endif %}>
|
|
{{ __('room.notify_never') }}
|
|
</option>
|
|
<option value="on-mention" {% if conference and conference.notify == 1 %}selected{% endif %}
|
|
{% if not conference %}selected{% endif %}>
|
|
{{ __('room.notify_mentioned') }}
|
|
</option>
|
|
<option value="always" {% if conference and conference.notify == 2 %}selected{% endif %}>
|
|
{{ __('room.notify_always') }}
|
|
</option>
|
|
</select>
|
|
</div>
|
|
<label>{{ __('room.notify_title') }}</label>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<span class="primary icon gray">
|
|
<i class="material-symbols">login</i>
|
|
</span>
|
|
<span class="control">
|
|
<div class="checkbox">
|
|
<input
|
|
{% if conference and conference.autojoin %}
|
|
checked
|
|
{% endif %}
|
|
type="checkbox"
|
|
id="autojoin"
|
|
name="autojoin"/>
|
|
<label for="autojoin"></label>
|
|
</div>
|
|
</span>
|
|
<div>
|
|
<p class="all">{{ __('chatrooms.autojoin') }}</p>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<span class="primary icon gray">
|
|
<i class="material-symbols">push_pin</i>
|
|
</span>
|
|
<span class="control">
|
|
<div class="checkbox">
|
|
<input
|
|
{% if conference and conference.pinned %}
|
|
checked
|
|
{% endif %}
|
|
type="checkbox"
|
|
id="pinned"
|
|
name="pinned"/>
|
|
<label for="pinned"></label>
|
|
</div>
|
|
</span>
|
|
<div>
|
|
<p>{{ __('chatrooms.pinned') }}</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
<footer>
|
|
<button class="button flat" onclick="Dialog_ajaxClear()">
|
|
{{ __('button.cancel') }}
|
|
</button>
|
|
<button
|
|
class="button flat"
|
|
{% if create %}
|
|
onclick="RoomsUtils_ajaxAddCreate(MovimUtils.formToJson('bookmarkmucadd'));"
|
|
{% else %}
|
|
onclick="RoomsUtils_ajaxAddConfirm(MovimUtils.formToJson('bookmarkmucadd'));"
|
|
{% endif %}
|
|
>
|
|
{% if conference %}
|
|
{{ __('button.edit') }}
|
|
{% else %}
|
|
{{ __('button.add') }}
|
|
{% endif %}
|
|
</button>
|
|
</footer>
|
|
|