mirror of https://github.com/zulip/zulip.git
Start to clean up settings.html.
Check that settings.html has at least balanced tags, and automate the checking of those tags. (imported from commit 35e9be269caa211803d64f2b54cb0287e13707b3)
This commit is contained in:
parent
06d9eb78d4
commit
3494ce6ebc
|
@ -4,8 +4,10 @@
|
|||
|
||||
<div class="alert" id="settings-status"></div>
|
||||
<div id="settings-change-box">
|
||||
|
||||
<form action="/json/settings/change" method="post"
|
||||
class="form-horizontal">{% csrf_token %}
|
||||
|
||||
<div id="account-settings" class="settings-section">
|
||||
<div class="settings-section-title"><i class="icon-vector-user settings-section-icon"></i>Your Account</div>
|
||||
<div class="account-settings-form">
|
||||
|
@ -144,12 +146,17 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="bot-settings" class="settings-section">
|
||||
|
||||
<div class="settings-section-title"><i class="icon-vector-github settings-section-icon"></i>Your Bots</div>
|
||||
|
||||
<div class="bot-settings-form">
|
||||
<p class="bot-settings-note">Looking for our <a href="/integrations" target="_blank">Integrations</a>
|
||||
or <a href="/api" target="_blank">API</a> documentation?</p>
|
||||
|
@ -181,7 +188,8 @@
|
|||
<button class="btn" id="bot_avatar_upload_button">Customize avatar</button> (Optional)
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<div id="bot_avatar_file_input_error" class="text-error"></div>
|
||||
</p>
|
||||
|
@ -192,7 +200,7 @@
|
|||
</div>
|
||||
<div id="create_bot_spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<hr class="settings_separator" />
|
||||
|
||||
|
@ -200,7 +208,8 @@
|
|||
<p class="api-key-note">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 access your own private
|
||||
messages, you should use your personal API key.</p>
|
||||
messages, you should use your personal API key.
|
||||
</p>
|
||||
<div class="control-group">
|
||||
<button class="btn" id="api_key_button">Show/change your API key</button>
|
||||
</div>
|
||||
|
@ -234,6 +243,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="word-alert-settings" class="settings-section">
|
||||
<div class="settings-section-title"><i class="icon-vector-book settings-section-icon"></i>Custom Word Alerts</div>
|
||||
<ul id="word-alerts">
|
||||
|
|
|
@ -84,7 +84,15 @@ def validate(fn):
|
|||
assert state.depth == 0
|
||||
|
||||
git_files = map(str.strip, check_output(['git', 'ls-files']).split('\n'))
|
||||
|
||||
# Check all our handlebars templates.
|
||||
templates = [fn for fn in git_files if fn.endswith('.handlebars')]
|
||||
assert len(templates) >= 10 # sanity check that we are actually doing work
|
||||
|
||||
# Django templates are pretty messy now, so we whitelist them for now.
|
||||
templates += [
|
||||
'templates/zerver/settings.html'
|
||||
]
|
||||
|
||||
for fn in templates:
|
||||
validate(fn)
|
||||
|
|
Loading…
Reference in New Issue