2013-12-09 04:44:36 +08:00
|
|
|
<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 />
|
2013-12-13 23:59:36 +08:00
|
|
|
You need to install or enable <strong>PDO (SQLite / MySQL / PostgreSQL)</strong> exstenstion on your server.
|
2013-12-09 04:44:36 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-horizontal" data-bind="visible: contactsSupported">
|
2013-12-13 23:59:36 +08:00
|
|
|
<div class="form-horizontal">
|
2013-12-09 04:44:36 +08:00
|
|
|
<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>
|
2013-12-19 08:53:42 +08:00
|
|
|
<label data-bind="click: function () { contactsSharing(!contactsSharing()); }">
|
|
|
|
<i data-bind="css: contactsSharing() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
|
|
|
|
Allow contacts sharing
|
|
|
|
</label>
|
2013-12-20 07:28:03 +08:00
|
|
|
<label data-bind="click: function () { contactsSync(!contactsSync()); }">
|
|
|
|
<i data-bind="css: contactsSync() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
|
|
|
|
Allow contacts sync (CardDAV)
|
|
|
|
</label>
|
2013-12-09 04:44:36 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
2013-12-13 23:59:36 +08:00
|
|
|
<label class="control-label">
|
|
|
|
Type
|
|
|
|
</label>
|
2013-12-09 04:44:36 +08:00
|
|
|
<div class="controls">
|
2013-12-13 23:59:36 +08:00
|
|
|
<select data-bind="options: contactsTypesOptions, value: mainContactsType,
|
|
|
|
optionsText: 'name', optionsValue: 'id', optionsAfterRender: defautOptionsAfterRender, saveTrigger: contactsTypeTrigger"></select>
|
|
|
|
<div data-bind="saveTrigger: contactsTypeTrigger"></div>
|
2013-12-09 04:44:36 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2013-12-13 23:59:36 +08:00
|
|
|
<div data-bind="visible: 'sqlite' !== contactsType()">
|
|
|
|
<div class="legend">
|
2013-12-14 07:27:12 +08:00
|
|
|
PDO (MySQL / PostgreSQL)
|
2013-12-09 04:44:36 +08:00
|
|
|
</div>
|
2013-12-13 23:59:36 +08:00
|
|
|
<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>
|
2013-12-14 07:27:12 +08:00
|
|
|
<blockquote style="margin: 10px 0 0 0">
|
2013-12-13 23:59:36 +08:00
|
|
|
<p class="muted">
|
|
|
|
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 }">
|
2013-12-15 06:42:32 +08:00
|
|
|
<i data-bind="css: {'icon-info': !testing(), 'icon-spinner animated': testing(), 'icon-white': testContactsSuccess() || testContactsError() }"></i>
|
2013-12-13 23:59:36 +08:00
|
|
|
|
|
|
|
Test
|
|
|
|
</a>
|
|
|
|
</div>
|
2013-12-09 04:44:36 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2013-12-13 23:59:36 +08:00
|
|
|
<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 }">
|
2013-12-15 06:42:32 +08:00
|
|
|
<i data-bind="css: {'icon-info': !testing(), 'icon-spinner animated': testing(), 'icon-white': testContactsSuccess() || testContactsError() }"></i>
|
2013-12-13 23:59:36 +08:00
|
|
|
|
|
|
|
Test
|
|
|
|
</a>
|
|
|
|
</div>
|
2013-12-10 08:40:21 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2013-12-11 00:07:10 +08:00
|
|
|
<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>
|
2013-12-09 04:44:36 +08:00
|
|
|
</div>
|
|
|
|
</div>
|