Initial commit
This commit is contained in:
14
models/Settings.php
Normal file
14
models/Settings.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php namespace NicoSt\GCalendar\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
class Settings extends Model {
|
||||
|
||||
public $implement = ['System.Behaviors.SettingsModel'];
|
||||
|
||||
// A unique code
|
||||
public $settingsCode = 'g-calendar';
|
||||
|
||||
// Reference to field configuration
|
||||
public $settingsFields = 'fields.yaml';
|
||||
}
|
||||
41
models/settings/fields.yaml
Normal file
41
models/settings/fields.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
tabs:
|
||||
fields:
|
||||
|
||||
# Tab: Google Client
|
||||
application_name:
|
||||
label: 'nicost.gcalendar::lang.settings.fields.applicationName.label'
|
||||
tab: 'nicost.gcalendar::lang.settings.tab.client'
|
||||
type: text
|
||||
comment: 'nicost.gcalendar::lang.settings.fields.applicationName.comment'
|
||||
span: left
|
||||
client_id:
|
||||
label: 'nicost.gcalendar::lang.settings.fields.clientId.label'
|
||||
tab: 'nicost.gcalendar::lang.settings.tab.client'
|
||||
type: text
|
||||
comment: 'nicost.gcalendar::lang.settings.fields.clientId.comment'
|
||||
span: left
|
||||
client_secret:
|
||||
label: 'nicost.gcalendar::lang.settings.fields.clientSecret.label'
|
||||
tab: 'nicost.gcalendar::lang.settings.tab.client'
|
||||
type: text
|
||||
comment: 'nicost.gcalendar::lang.settings.fields.clientSecret.comment'
|
||||
span: left
|
||||
google_oauth:
|
||||
label: 'nicost.gcalendar::lang.settings.fields.section.accessToken'
|
||||
tab: 'nicost.gcalendar::lang.settings.tab.client'
|
||||
type: section
|
||||
request_access_token:
|
||||
tab: 'nicost.gcalendar::lang.settings.tab.client'
|
||||
type: NicoSt\GCalendar\FormWidgets\OAuth
|
||||
|
||||
calendar_selector:
|
||||
tab: 'nicost.gcalendar::lang.settings.tab.calendars'
|
||||
type: NicoSt\GCalendar\FormWidgets\CalendarSelector
|
||||
|
||||
cache_time:
|
||||
label: 'nicost.gcalendar::lang.settings.fields.cacheTime.label'
|
||||
tab: 'nicost.gcalendar::lang.settings.tab.settings'
|
||||
comment: 'nicost.gcalendar::lang.settings.fields.cacheTime.comment'
|
||||
type: number
|
||||
span: left
|
||||
default: 15
|
||||
Reference in New Issue
Block a user