-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcas-framework-schedules.php
More file actions
60 lines (49 loc) · 2.03 KB
/
cas-framework-schedules.php
File metadata and controls
60 lines (49 loc) · 2.03 KB
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
<?php
namespace fewbricks\bricks;
use fewbricks\acf\fields as acf_fields;
/**
* Class cas_framework_schedules
* @package fewbricks\bricks
*/
class cas_framework_schedules extends project_brick {
/**
* @var string This will be the default label showing up in the editor area for the administrator.
* It can be overridden by passing an item with the key "label" in the array that is the second argument when
* creating a brick.
*/
protected $label = 'Framework schedules';
/**
* This is where all the fields for the brick will be set-
*/
public function set_fields() {
$this->add_field( (new acf_fields\repeater("Documents - {$this->label}", 'framework_schedule', '202205171625a', [
'button_label' => 'Add Document'
]))
->add_sub_field( new acf_fields\text( 'Document Name', 'document_name', '202205171625b', [
'required' => 1,
] ) )
->add_sub_field( new acf_fields\file( 'Document', 'document', '202205171625c', [
'wrapper' => array (
'width' => '50',
'class' => '',
'id' => ''),
'required' => 1,
] ) )
->add_sub_field( new acf_fields\radio( 'Document Usage', 'document_usage', '202205171625e', [
'wrapper' => array (
'width' => '50',
'class' => '',
'id' => ''),
'choices' => array(
'read_only' => 'Read only',
'enter_detail' => 'You must complete the relevant sections in this document',
'enter_detail_optional' => 'If you use this document, you must complete the relevant sections',
),
'required' => 1,
] ) )
->add_sub_field( new acf_fields\wysiwyg( 'Document Description', 'document_description', '202205171625f',[
'required' => 1,
] ) )
);
}
}