snappymail/rainloop/v/0.0.0/app/templates/Views/AdminSettingsContacts.html

115 lines
No EOL
3.8 KiB
HTML

<div class="b-admin-general">
<div class="row" data-bind="visible: !contactsSupported">
<div class="alert span8">
<h4>Notice!</h4>
<br />
Your system doesn't support contacts.
<br />
You need to install or enable <strong>PDO (SQLite / MySQL / PostgreSQL)</strong> exstenstion on your server.
</div>
</div>
<div class="form-horizontal" data-bind="visible: contactsSupported">
<div class="form-horizontal">
<div class="legend">
Contacts
</div>
<div class="control-group">
<div class="controls">
<label data-bind="click: function () { enableContacts(!enableContacts()); }">
<i data-bind="css: enableContacts() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
Enable contacts
</label>
</div>
</div>
<div class="control-group">
<label class="control-label">
Type
</label>
<div class="controls">
<select data-bind="options: contactsTypesOptions, value: mainContactsType,
optionsText: 'name', optionsValue: 'id', optionsAfterRender: defautOptionsAfterRender, saveTrigger: contactsTypeTrigger"></select>
<div data-bind="saveTrigger: contactsTypeTrigger"></div>
</div>
</div>
<div data-bind="visible: 'sqlite' !== contactsType()">
<div class="legend">
PDO (MySQL / PostgreSQL / ...)
</div>
<div class="control-group">
<label class="control-label">
Dsn
</label>
<div class="controls">
<input type="text" class="span6" data-bind="value: pdoDsn, saveTrigger: pdoDsnTrigger" />
<div data-bind="saveTrigger: pdoDsnTrigger"></div>
<blockquote style="margin-top: 10px">
<p class="muted">
<strong>Examples:</strong>
<br />
mysql:host=127.0.0.1;port=3306;dbname=rainloop
<br />
pgsql:host=127.0.0.1;port=5432;dbname=rainloop
</p>
</blockquote>
</div>
</div>
<div class="control-group">
<label class="control-label">
User
</label>
<div class="controls">
<input type="text" data-bind="value: pdoUser, saveTrigger: pdoUserTrigger" />
<div data-bind="saveTrigger: pdoUserTrigger"></div>
</div>
</div>
<div class="control-group">
<label class="control-label">
Password
</label>
<div class="controls">
<input type="password" data-bind="value: pdoPassword, saveTrigger: pdoPasswordTrigger" />
<div data-bind="saveTrigger: pdoPasswordTrigger"></div>
</div>
</div>
<div class="control-group">
<div class="controls">
<a class="btn" data-bind="command: testContactsCommand, css: { 'btn-success': testContactsSuccess, 'btn-danger': testContactsError }">
<i data-bind="css: {'icon-info': !testing(), 'icon-spinner-2 animated': testing(), 'icon-white': testContactsSuccess() || testContactsError() }"></i>
&nbsp;&nbsp;
Test
</a>
</div>
</div>
</div>
<div data-bind="visible: 'sqlite' === contactsType()">
<div class="legend">
PDO (SQLite)
</div>
<div class="control-group">
<div class="controls">
<div class="alert alert-null-left-margin span8">
<h4>Notice!</h4>
<br />
Don't use this type of database with a large number of active users.
</div>
</div>
</div>
<div class="control-group">
<div class="controls">
<a class="btn" data-bind="command: testContactsCommand, css: { 'btn-success': testContactsSuccess, 'btn-danger': testContactsError }">
<i data-bind="css: {'icon-info': !testing(), 'icon-spinner-2 animated': testing(), 'icon-white': testContactsSuccess() || testContactsError() }"></i>
&nbsp;&nbsp;
Test
</a>
</div>
</div>
</div>
<div class="control-group" data-bind="visible: '' !== testContactsErrorMessage()">
<div class="controls">
<div class="row">
<div class="alert span8" data-bind="text: testContactsErrorMessage"></div>
</div>
</div>
</div>
</div>
</div>