summaryrefslogtreecommitdiff
path: root/addons/google_drive/views/res_config_settings_views.xml
blob: 42965daabe2126a26d20f1844197f3ea72dc86b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <record id="res_config_settings_view_form" model="ir.ui.view">
        <field name="name">res.config.settings.view.form.inherit.google.drive</field>
        <field name="model">res.config.settings</field>
        <field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
        <field name="arch" type="xml">
            <div id="msg_module_google_drive" position="replace">
                <div class="content-group"
                     attrs="{'invisible': [('module_google_drive','=',False)]}">
                    <div class="mt8 row">
                        <div class="col-sm">
                            <field name="is_google_drive_token_generated" invisible="1"/>
                            <div role="alert"
                                 attrs="{'invisible': [('is_google_drive_token_generated', '=', False)]}">
                                <i class="text-success fa fa-check"></i> &amp;nbsp; Refresh token set
                            </div>
                            <div role="alert"
                                 attrs="{'invisible': [('is_google_drive_token_generated', '=', True)]}">
                                <i class="fa fa-exclamation-triangle text-warning"></i> &amp;nbsp; No refresh token set
                            </div>
                        </div>
                        <div class="col-sm text-center"
                             attrs="{'invisible': [('is_google_drive_token_generated', '=', True)]}">
                            <button class="btn btn-link"
                                    name="action_setup_token"
                                    type="object"><i class="fa fa-arrow-right"></i> Set up token</button>
                        </div>
                        <div class="col-sm text-center"
                             attrs="{'invisible': [('is_google_drive_token_generated', '=', False)]}">
                            <button class="btn btn-link"
                                    name="action_setup_token"
                                    type="object"><i class="fa fa-arrow-right"></i> Reset token</button>
                        </div>
                    </div>
                    <div class="mt8">
                        <button type="action"
                                name="%(action_google_drive_users_config)d"
                                string="Google Drive Templates"
                                icon="fa-arrow-right"
                                class="btn-link pl-0"/>
                    </div>
                </div>
            </div>
        </field>
    </record>

    <record id="google_drive_auth_code_wizard" model="ir.ui.view">
        <field name="name">google.drive.authorization.wizard</field>
        <field name="model">res.config.settings</field>
        <field name="mode">primary</field>
        <field name="priority">2048</field>
        <field name="arch" type="xml">
            <form>
                <group>
                    <span>Get an authorization code and set it in the field below.</span>
                    <field name="google_drive_uri"
                           class="fa fa-arrow-right mt-1"
                           widget="url"
                           text="Get Authorization Code"
                           nolabel="1"/>
                </group>
                <group class="mt-3">
                    <field name="google_drive_authorization_code" required="1"/>
                </group>
                <footer>
                    <button string="Confirm"
                            class="btn btn-primary"
                            name="confirm_setup_token"
                            type="object"/>
                    <button special="cancel" string="Cancel" />
                </footer>
            </form>
        </field>
    </record>
</odoo>