2012-10-16 06:03:29 +02:00
|
|
|
{# Settings tab of the app. #}
|
|
|
|
|
2012-10-05 17:46:07 +02:00
|
|
|
<div class="row-fluid">
|
2013-05-03 00:28:13 +02:00
|
|
|
<div id="current_settings" class="span12">
|
2013-04-03 23:17:20 +02:00
|
|
|
<h1>Settings</h1>
|
|
|
|
|
2013-04-08 19:22:05 +02:00
|
|
|
{# One text line worth of space #}
|
|
|
|
<div> </div>
|
2013-04-03 23:17:20 +02:00
|
|
|
|
2013-04-08 19:37:52 +02:00
|
|
|
<div class="alert" id="settings-status"></div>
|
|
|
|
|
2012-10-17 22:26:59 +02:00
|
|
|
<div id="settings-change-box">
|
2013-04-03 22:47:59 +02:00
|
|
|
<form action="/json/settings/change" method="post"
|
2013-04-03 22:51:14 +02:00
|
|
|
class="form-horizontal">{% csrf_token %}
|
2013-08-05 02:29:01 +02:00
|
|
|
<div class="control-group" id="name_change_container">
|
2013-04-03 22:47:59 +02:00
|
|
|
<label for="full_name" class="control-label">Full name</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="text" name="full_name" id="full_name"
|
|
|
|
value="{{ user_profile.full_name }}" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2013-04-08 20:03:21 +02:00
|
|
|
<div class="control-group" id="pw_change_link">
|
2013-05-28 23:10:11 +02:00
|
|
|
<div class="controls">
|
|
|
|
<button class="btn change_password_button" data-dismiss="modal" aria-hidden="true">Change Password</button>
|
|
|
|
</div>
|
2013-04-03 22:47:59 +02:00
|
|
|
</div>
|
|
|
|
|
2013-04-08 20:03:21 +02:00
|
|
|
<div id="pw_change_controls">
|
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="old_password" class="control-label">Old password</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="password" autocomplete="off"
|
|
|
|
name="old_password" id="old_password" value="" />
|
|
|
|
</div>
|
2013-04-03 22:47:59 +02:00
|
|
|
</div>
|
|
|
|
|
2013-04-08 20:03:21 +02:00
|
|
|
<div class="control-group">
|
|
|
|
<label for="new_password" class="control-label">New password</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="password" autocomplete="off"
|
|
|
|
name="new_password" id="new_password" value="" />
|
2013-04-04 00:55:36 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2013-04-08 20:03:21 +02:00
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label">Password strength</label>
|
|
|
|
<div class="controls">
|
2013-04-08 20:21:20 +02:00
|
|
|
<div class="progress" id="pw_strength">
|
2013-04-08 20:31:00 +02:00
|
|
|
<div class="bar bar-danger" style="width: 10%;"></div>
|
2013-04-08 20:03:21 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2013-04-03 22:47:59 +02:00
|
|
|
</div>
|
2013-04-08 20:03:21 +02:00
|
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="confirm_password" class="control-label">Confirm password</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="password" autocomplete="off"
|
|
|
|
name="confirm_password" id="confirm_password" value="" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2013-04-03 22:47:59 +02:00
|
|
|
</div>
|
|
|
|
|
2013-05-28 20:03:38 +02:00
|
|
|
<div class="form-horizontal">
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label">Your picture</label>
|
|
|
|
<div class="controls">
|
|
|
|
<a href="https://en.gravatar.com/emails" target="_blank" class="change_gravatar_button">
|
2013-06-10 21:35:48 +02:00
|
|
|
<p><img class="img-rounded gravatar-profile user-image-settings"
|
2013-08-02 21:14:08 +02:00
|
|
|
src="{{ avatar_url }}&s=120" /></p>
|
2013-05-28 20:03:38 +02:00
|
|
|
<p>Change at Gravatar.com</p>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2013-05-28 23:10:11 +02:00
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<input type="submit" name="change_settings"
|
|
|
|
value="Save changes" class="btn btn-big btn-primary" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2013-05-28 20:03:38 +02:00
|
|
|
<hr class="settings_separator">
|
2013-07-15 23:50:53 +02:00
|
|
|
<h2>Notification settings <i class="tiny icon-vector-question-sign" id="notification-docs"></i></h2>
|
2013-05-28 21:33:59 +02:00
|
|
|
<div id="notification-settings">
|
2013-04-03 22:47:59 +02:00
|
|
|
<div class="control-group">
|
|
|
|
<label for="enable_desktop_notifications" class="control-label">
|
2013-07-15 23:50:53 +02:00
|
|
|
Desktop
|
|
|
|
notifications </label>
|
2013-04-03 22:47:59 +02:00
|
|
|
<div class="controls">
|
|
|
|
<input type="checkbox" name="enable_desktop_notifications" id="enable_desktop_notifications"
|
2012-11-23 21:23:41 +01:00
|
|
|
{% if user_profile.enable_desktop_notifications %}
|
|
|
|
checked="yes"
|
2013-04-03 22:47:59 +02:00
|
|
|
{% endif %} />
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-05-03 21:49:01 +02:00
|
|
|
<div class="control-group">
|
|
|
|
<label for="enable_sounds" class="control-label">
|
2013-07-15 23:50:53 +02:00
|
|
|
Audible notifications</label>
|
2013-05-03 21:49:01 +02:00
|
|
|
<div class="controls">
|
|
|
|
<input type="checkbox" name="enable_sounds" id="enable_sounds"
|
|
|
|
{% if user_profile.enable_sounds %}
|
|
|
|
checked="yes"
|
|
|
|
{% endif %} />
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-04-03 22:47:59 +02:00
|
|
|
|
2013-05-07 23:19:52 +02:00
|
|
|
<div class="control-group">
|
|
|
|
<label for="enable_offline_email_notifications" class="control-label">
|
2013-07-15 23:50:53 +02:00
|
|
|
Email notifications when offline</label>
|
2013-05-07 23:19:52 +02:00
|
|
|
<div class="controls">
|
|
|
|
<input type="checkbox" name="enable_offline_email_notifications" id="enable_offline_email_notifications"
|
|
|
|
{% if user_profile.enable_offline_email_notifications %}
|
|
|
|
checked="yes"
|
|
|
|
{% endif %} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2013-04-03 22:47:59 +02:00
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<input type="submit" name="change_settings" value="Save changes" class="btn btn-big btn-primary" />
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-05-28 21:33:59 +02:00
|
|
|
</div>
|
2012-09-21 19:32:01 +02:00
|
|
|
</form>
|
2012-10-17 22:26:59 +02:00
|
|
|
</div>
|
2013-02-20 04:19:18 +01:00
|
|
|
|
2013-04-03 22:58:17 +02:00
|
|
|
<hr class="settings_separator" />
|
2013-02-20 04:19:18 +01:00
|
|
|
|
2013-05-03 00:29:52 +02:00
|
|
|
<h2>Your bots</h2>
|
2013-07-05 20:59:25 +02:00
|
|
|
<ol id="bots_list">
|
|
|
|
</ol>
|
2013-06-27 22:36:41 +02:00
|
|
|
|
2013-06-28 16:15:24 +02:00
|
|
|
<form id="create_bot_form" class="form-horizontal">
|
2013-06-27 22:36:41 +02:00
|
|
|
<div id="bot_table_error" class="alert alert-error hide"></div>
|
2013-07-03 16:22:39 +02:00
|
|
|
<h3>Add new bot</h3>
|
2013-08-08 18:08:30 +02:00
|
|
|
<p>
|
2013-06-28 16:15:24 +02:00
|
|
|
<label for="create_bot_name" class="control-label">Full name</label>
|
2013-06-27 22:36:41 +02:00
|
|
|
<input type="text" name="bot_name" id="create_bot_name" class="required"
|
2013-06-28 16:35:55 +02:00
|
|
|
maxlength=100 placeholder="Full Bot Name" value="" />
|
2013-06-27 22:36:41 +02:00
|
|
|
<div><label for="create_bot_name" generated="true" class="text-error"></label></div>
|
|
|
|
</p>
|
|
|
|
<p>
|
2013-06-28 16:15:24 +02:00
|
|
|
<label for="bot_short_name" class="control-label">Username</label>
|
2013-06-27 22:36:41 +02:00
|
|
|
<input type="text" name="bot_short_name" id="create_bot_short_name" class="required bot_local_part"
|
2013-06-28 16:35:55 +02:00
|
|
|
placeholder="bot_user_name" value="" />-bot@{{ user_profile.realm.domain }}
|
2013-06-27 22:36:41 +02:00
|
|
|
<div><label for="create_bot_short_name" generated="true" class="text-error"></label></div>
|
|
|
|
</p>
|
|
|
|
<p>
|
2013-06-28 16:15:24 +02:00
|
|
|
<label for="bot_avatar_file_input" class="control-label">Optional avatar</label>
|
2013-06-28 17:41:18 +02:00
|
|
|
<input type="file" name="bot_avatar_file_input" class="notdisplayed" id="bot_avatar_file_input" value="Upload avatar" />
|
|
|
|
<button class="btn" id="bot_avatar_clear_button">Clear avatar</button>
|
|
|
|
<button class="btn" id="bot_avatar_upload_button">Choose avatar</button>
|
|
|
|
<span id="bot_avatar_file"></span>
|
2013-06-27 22:36:41 +02:00
|
|
|
</p>
|
|
|
|
<p>
|
2013-06-28 16:30:03 +02:00
|
|
|
<div id="bot_avatar_file_input_error" class="text-error"></div>
|
2013-06-27 22:36:41 +02:00
|
|
|
</p>
|
|
|
|
<input type="submit" class="btn btn-primary" id="create_bot_button" value="Create Bot" />
|
|
|
|
<div id="create_bot_spinner"></div>
|
2013-05-03 00:29:52 +02:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<hr class="settings_separator" />
|
|
|
|
|
2013-05-28 20:03:38 +02:00
|
|
|
<div class="form-horizontal" id="api_key_button_box">
|
|
|
|
<p class="small">For most bots using the API, you'll want to give each bot
|
|
|
|
its own name and API key using the above section. But if you
|
|
|
|
want to write a bot that can e.g. read your own private
|
|
|
|
messages, you should use your personal API key.</p>
|
2013-05-28 23:10:11 +02:00
|
|
|
<div class="controls">
|
2013-08-08 18:08:30 +02:00
|
|
|
<button class="btn" id="api_key_button">Show/change your API key</button>
|
2013-05-28 23:10:11 +02:00
|
|
|
</div>
|
2013-05-28 20:03:38 +02:00
|
|
|
</div>
|
|
|
|
<div id="get_api_key_box">
|
2013-08-07 23:49:27 +02:00
|
|
|
<p>Please re-enter your password to confirm your identity.
|
|
|
|
(<a href="/accounts/password/reset/" target="_blank">Forgotten it?</a>)</p>
|
2013-05-28 20:03:38 +02:00
|
|
|
<form action="/json/fetch_api_key" method="post" class="form-horizontal">{% csrf_token %}
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="password" class="control-label">Current password</label>
|
|
|
|
<div class="controls">
|
|
|
|
<input type="password" autocomplete="off"
|
|
|
|
name="password" id="get_api_key_password" value="" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<div class="controls">
|
|
|
|
<input type="submit" name="view_api_key" value="Get API key"
|
|
|
|
class="btn btn-primary" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div id="show_api_key_box">
|
|
|
|
<p>Your API key:</p>
|
|
|
|
<p><b><span id="api_key_value"></span></b></p>
|
2013-08-08 18:08:30 +02:00
|
|
|
<button type="submit" class="btn btn-primary regenerate_api_key">
|
|
|
|
Generate new API Key
|
|
|
|
</button>
|
|
|
|
<div id="user_api_key_error text-error"></div>
|
|
|
|
</div>
|
2013-05-28 20:03:38 +02:00
|
|
|
</div>
|
|
|
|
<hr class="settings_separator">
|
|
|
|
|
2013-05-03 00:28:13 +02:00
|
|
|
</div>
|
2012-09-21 19:32:01 +02:00
|
|
|
</div>
|
|
|
|
|