-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_form.php
64 lines (58 loc) · 2.49 KB
/
config_form.php
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
<?php $view = get_view();
// Prefill fields with values stored previously
// TODO Error handling
$defaultLicenses = get_option(OPTION_LICENSES);
$defaultFolder = get_option(OPTION_FOLDER);
$timeout = get_option(OPTION_TIMEOUT);
$customMessage = file_get_contents(FILES_DIR . DIRECTORY_SEPARATOR
. SO_PLAYLIST. DIRECTORY_SEPARATOR
. SO_CUSTOM_MSG_FILE);
?>
<div id="stream-only-plugin-theme-warning">
<p><?php echo __(SO_THEME_WARNING);?></p>
</div>
<div id="stream-only-plugin-documentation">
<p><?php echo __(SO_SEE_USER_DOCUMENTATION)?></p>
</div>
<div id="stream-only-plugin-settings">
<h2><?php echo __(ELEMENT_LICENSE_COUNT_TITLE); ?></h2>
<div class="field">
<div class="two columns alpha">
<?php echo $view->formLabel(OPTION_LICENSES, __(ELEMENT_LICENSE_COUNT)); ?>
</div>
<div class="inputs five columns omega">
<?php echo $view->formText(OPTION_LICENSES, $defaultLicenses); ?>
</div>
<div><?php echo __(ELEMENT_LICENSE_COUNT_DESCRIPTION . SO_SEE_USER_DOCUMENTATION);?></div>
</div>
<h2><?php echo __(ELEMENT_FOLDER_TITLE ); ?></h2>
<div class="field">
<div class="two columns alpha">
<?php echo $view->formLabel(OPTION_FOLDER, __(ELEMENT_FOLDER)); ?>
</div>
<div class="inputs five columns omega">
<?php echo $view->formText(OPTION_FOLDER, $defaultFolder); ?>
</div>
<div><?php echo __(ELEMENT_FOLDER_DESCRIPTION . SO_SEE_USER_DOCUMENTATION);?></div>
</div>
<h2><?php echo __(ELEMENT_TIMEOUT_TITLE); ?></h2>
<div class="field">
<div class="two columns alpha">
<?php echo $view->formLabel(OPTION_TIMEOUT, __(ELEMENT_TIMEOUT)); ?>
</div>
<div class="inputs five columns omega">
<?php echo $view->formText(OPTION_TIMEOUT, $timeout); ?>
</div>
<div><?php echo __(ELEMENT_TIMEOUT_DESCRIPTION . SO_SEE_USER_DOCUMENTATION);?></div>
</div>
<h2><?php echo __(ELEMENT_CUSTOM_MSG_TITLE); ?></h2>
<div class="field">
<div class="two columns alpha">
<?php echo $view->formLabel(OPTION_CUSTOM_MSG, __(ELEMENT_CUSTOM_MSG)); ?>
</div>
<div class="inputs five columns omega">
<?php echo $view->formTextarea(OPTION_CUSTOM_MSG, $customMessage); ?>
</div>
<div><?php echo __(ELEMENT_CUSTOM_MSG_DESCRIPTION . SO_SEE_USER_DOCUMENTATION);?></div>
</div>
</div>