~timwhite88/grase/trunk

« back to all changes in this revision

Viewing changes to files/usr/share/grase/www/radmin/templates/loginconfig.tpl

  • Committer: Timothy White
  • Date: 2013-10-27 19:25:34 UTC
  • Revision ID: tim@purewhite.id.au-20131027192534-b4ybtss6d7hcnrnd
minor cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{include file="header.tpl" Name="Portal Settings" activepage="loginconfig" helptext="Use this page to change login page Settings"}
2
2
 
3
 
<script src="/javascript/codemirror/lib/codemirror.js"></script>
4
 
<link rel="stylesheet" href="/javascript/codemirror/lib/codemirror.css">
 
3
<script src="/javascript/codemirror/codemirror.js"></script>
 
4
<script src="/javascript/codemirror/util/searchcursor.js" type="text/javascript"></script>
 
5
<link rel="stylesheet" href="/javascript/codemirror/codemirror.css">
5
6
<script src="/javascript/codemirror/mode/css/css.js"></script>
6
7
<script src="/javascript/codemirror/mode/xml/xml.js"></script>
7
 
<link rel="stylesheet" href="/javascript/codemirror/theme/default.css">
8
8
 
9
9
<script src="/javascript/codemirror-ui/js/codemirror-ui.js" type="text/javascript"></script>
10
10
<link rel="stylesheet" href="/javascript/codemirror-ui/css/codemirror-ui.css" type="text/css" media="screen" />
11
11
{literal}    <style type="text/css">
12
12
      .CodeMirror {border: 1px solid black;}
13
13
    </style>
14
 
{/literal}    
 
14
{/literal}
15
15
 
16
16
<h2>{t}Portal Customisation{/t}</h2>
17
17
 
24
24
        {if $attributes.type != 'bool'}
25
25
            <input type="text" name="{$option}" id="{$option}" value='{$attributes.value}'/>
26
26
        {else}
27
 
            <input type="checkbox" name="{$option}" id="{$option}" {if $attributes.value == "TRUE"}checked="checked"{/if}'/>
 
27
            <input type="checkbox" name="{$option}" id="{$option}" {if $attributes.value == "TRUE"}checked="checked"{/if}/>
28
28
        {/if}
29
29
        <span id="{$option}Info">{$attributes.description}</span>
30
30
    </div>
31
31
    {/foreach}
32
 
    
33
 
    
 
32
 
 
33
 
34
34
    {foreach from=$templateoptions item=attributes key=option}
35
35
    <div>
36
36
        <label for='{$option}'>{$attributes.label}</label>
38
38
        {if $attributes.location}<span class="tpllocation">[{$attributes.location}]</span>{/if}
39
39
        <br/>
40
40
 
41
 
        
42
 
        <textarea name="{$option}" id="{$option}">{$attributes.value}</textarea>    
43
 
        
 
41
 
 
42
        <textarea name="{$option}" id="{$option}">{$attributes.value}</textarea>
 
43
 
44
44
            <script>
45
45
                var delay{$option};
46
 
                
 
46
 
47
47
                //first set up some variables
48
48
                var textarea = document.getElementById('{$option}');
49
49
                {literal}
50
 
                var uiOptions = { path : '/javascript/codemirror-ui/js/', searchMode : 'popup' }
 
50
                var uiOptions = { path : '/javascript/codemirror-ui/js/', searchMode : 'popup', imagePath: '/javascript/codemirror-ui/images/silk', }
51
51
                var codeMirrorOptions = {
52
52
                {/literal}
53
53
                    mode: "text/{$attributes.type}",
54
54
                    lineNumbers: true,
 
55
 
55
56
                {literal}}{/literal};
56
57
 
57
58
                //then create the editor
58
59
                var my{$option} = new CodeMirrorUI(textarea,uiOptions,codeMirrorOptions);
59
 
                
 
60
 
60
61
            </script>
61
 
    
 
62
 
62
63
    </div>
63
 
    
64
 
    {/foreach}    
 
64
 
 
65
    {/foreach}
65
66
 
66
67
<p class="nojshelp">{t}For each of the following items, if you need multiple values you can submit the form and it will append a blank input below the last valid value{/t}<p>
67
 
    
 
68
 
68
69
    {foreach from=$multiloginoptions item=attributes key=option name=multiloop}
69
70
    <div>
70
71
        <label for='{$option}'>{$attributes.label}</label>
73
74
            <span class="jsremove">
74
75
                <span class="jsremovebutton"></span>
75
76
                <span class="jsaddremovetext" id="addtext"></span>
76
 
            </span>                 
 
77
            </span>
77
78
        </div>
78
79
        {/foreach}
79
80
        <div class="jsmultioption"><input type="text" name="{$option}[]" id="{$option}" value=''/>
80
81
            <span class="jsadd">
81
82
                <span class="jsaddbutton"></span>
82
83
                <span class="jsaddremovetext" id="addtext"></span>
83
 
            </span>            
 
84
            </span>
84
85
        </div>
85
86
        <span id="{$option}Info">{$attributes.description}</span>
86
87
 
87
88
    </div>
88
 
    {/foreach}    
 
89
    {/foreach}
89
90
 
90
 
    <button type="submit" name="submit">{t}Save Settings{/t}</button> 
 
91
    <button type="submit" name="submit">{t}Save Settings{/t}</button>
91
92
 
92
93
</form>
93
94