/
config_form.php
49 lines (49 loc) · 2.28 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
<?php
$page = get_option('pb_page_url');
$text = get_option('pb_banner_text');
$btn_text = get_option('pb_banner_button_text');
$btn_url = get_option('pb_banner_button_url');
if($text == '')
$text = 'Default';
?>
<div class="field">
<?php echo get_view()->formLabel('pb_page_url', 'Page on which to display the banner', array('class'=>'two columns alpha', 'placeholder'=>'Click here')); ?>
<div class="inputs five columns">
<?php echo get_view()->formText('pb_page_url', $page, array('class' => 'textinput')); ?>
<p class="explanation">
Default is /search. Use /solr-search for Solr Search.
</p>
</div>
</div>
<div class="field">
<?php echo get_view()->formLabel('pb_banner_text', 'Show the banner in public view?', array('class'=>'two columns alpha')); ?>
<div class="inputs five columns omega">
<?php echo get_view()->formCheckbox('pb_show_public', true,
array('checked'=>(boolean)get_option('pb_show_public'))); ?>
<p class="explanation"><?php echo __('If checked, the banner will be shown before the content of the public search page.'); ?></p>
</div>
</div>
<div class="field">
<?php echo get_view()->formLabel('pb_banner_text', 'Banner text', array('class'=>'two columns alpha')); ?>
<div class="inputs five columns">
<?php echo get_view()->formTextarea('pb_banner_text', $text, array('class'=>'textinput', 'rows'=>4)); ?>
</div>
</div>
<div class="field">
<?php echo get_view()->formLabel('pb_banner_button_text', 'Button Text (if any)', array('class'=>'two columns alpha', 'placeholder'=>'Click here')); ?>
<div class="inputs five columns">
<?php echo get_view()->formText('pb_banner_button_text', $btn_text, array('class' => 'textinput')); ?>
<p class="explanation">
The text of the main button. No button if left empty.
</p>
</div>
</div>
<div class="field">
<?php echo get_view()->formLabel('pb_banner_button_url', 'Button URL (if any)', array('class'=>'two columns alpha', 'placeholder'=>'http://')); ?>
<div class="inputs five columns">
<?php echo get_view()->formText('pb_banner_button_url', $btn_url, array('class' => 'textinput')); ?>
<p class="explanation">
The destination of the main button.
</p>
</div>
</div>