-
Notifications
You must be signed in to change notification settings - Fork 0
/
form-proposal-agreement-candidate.php
145 lines (102 loc) · 5.63 KB
/
form-proposal-agreement-candidate.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
/**
* Project proposal candidate agreement form template
*
* @package HireBee\Templates
* @since 1.0.0
*/
?>
<form id="proposal-agreement" name="proposal_agreement" method="post" class="custom" action="<?php echo esc_url( get_the_hrb_proposal_url( $proposal ) ); ?>">
<div class="row">
<div class="large-12 columns">
<?php if ( ! empty( $proposal->_hrb_employer_decision ) ) : ?>
<h5><?php _e( 'Employer Decision', APP_TD ); ?></h5>
<fieldset>
<div class="employer-decision <?php echo esc_attr( $proposal->_hrb_employer_decision ); ?>"><?php echo hrb_get_agreement_decision_verbiage( $proposal->_hrb_employer_decision ); ?></div>
<?php if ( $proposal->_hrb_employer_notes ) { ?>
<div class="employer-decision-notes"><?php echo $proposal->_hrb_employer_notes; ?></div>
<?php } ?>
</fieldset>
<?php endif; ?>
<?php if ( $proposal->selected ) { ?>
<h5><?php _e( 'Project Terms', APP_TD ); ?></h5>
<fieldset>
<div class="project-terms"><?php echo esc_textarea( $proposal->project->_hrb_project_terms ? $proposal->project->_hrb_project_terms : __( 'None', APP_TD ) ); ?></div>
</fieldset>
<?php } ?>
<?php if ( $user_can_edit_agreement && $proposal->selected ) : ?>
<h5><?php _e( 'Your Decision', APP_TD ); ?></h5>
<?php if ( ! empty( $proposal->_hrb_candidate_decision ) ) { ?>
<fieldset>
<legend><?php _e( 'Previous', APP_TD ); ?></legend>
<div class="candidate-decision <?php echo esc_attr( $proposal->_hrb_candidate_decision ); ?>"><?php echo hrb_get_agreement_decision_verbiage( $proposal->_hrb_candidate_decision ); ?></div>
</fieldset>
<?php } ?>
<fieldset>
<?php if ( HRB_TERMS_ACCEPT != $proposal->_hrb_employer_decision ) { ?>
<label><input type="radio" name="candidate_decision" class="required" <?php checked( $proposal->_hrb_candidate_decision, HRB_TERMS_PROPOSE ); ?> value="propose"> <?php _e( 'Propose Terms', APP_TD ); ?></label>
<?php } ?>
<?php if ( HRB_TERMS_DECLINE != $proposal->_hrb_employer_decision ) { ?>
<label><input type="radio" name="candidate_decision" class="required" <?php checked( $proposal->_hrb_candidate_decision, HRB_TERMS_ACCEPT ); ?> value="accepted"> <?php _e( 'Accept', APP_TD ); ?></label>
<?php } ?>
<label><input type="radio" name="candidate_decision" class="required" <?php checked( $proposal->_hrb_candidate_decision, HRB_TERMS_DECLINE ); ?> value="declined"> <?php _e( 'Decline', APP_TD ); ?></label>
<p>
<label id="candidate_delete"><input type="checkbox" name="self_candidate_delete">
<span><?php _e( 'Remove me as a candidate', APP_TD ); ?></span>
<span data-tooltip title="<?php esc_attr_e( 'Cancel all negotiations immediately and remove you as a candidate. Note: The proposal will remain active unless you withdraw it.', APP_TD ); ?>" class="more-info">
<i class="icon fi-info"></i>
</span>
</label>
</p>
<fieldset>
<legend><?php _e( 'Notes', APP_TD ); ?></legend>
<textarea name="candidate_notes" placeholder="<?php echo esc_attr_x( 'Add any notes for the employer.', 'placeholder', APP_TD ); ?>"><?php echo esc_textarea( $proposal->candidate_notes ); ?></textarea>
</fieldset>
</fieldset>
<?php elseif ( ! empty( $proposal->_hrb_candidate_decision ) ) : ?>
<h5><?php _e( 'Your Decision', APP_TD ); ?></h5>
<fieldset>
<div class="candidate-decision <?php echo esc_attr( $proposal->_hrb_candidate_decision ); ?>"><?php echo hrb_get_agreement_decision_verbiage( $proposal->_hrb_candidate_decision ); ?></div>
<?php if ( $proposal->_hrb_candidate_notes ) { ?>
<div class="candidate-decision-notes"><?php echo $proposal->_hrb_candidate_notes; ?></div>
<?php } ?>
</fieldset>
<?php elseif ( $proposal->selected ) : ?>
<h4><?php _e( 'Waiting for a decision', APP_TD ); ?></h4>
<?php endif; ?>
<?php if ( $proposal->selected ) : ?>
<?php if ( $user_can_edit_agreement_terms ) : ?>
<fieldset>
<legend><?php _e( 'Your Terms', APP_TD ); ?></legend>
<textarea name="proposal_terms" placeholder="<?php echo esc_attr_x( 'Specify any additional terms the employer must agree to before you accept the project.', 'placeholder', APP_TD ); ?>"><?php echo esc_textarea( $proposal->_hrb_development_terms ); ?></textarea>
</fieldset>
<?php elseif ( $proposal->_hrb_development_terms ) : ?>
<fieldset>
<legend><?php _e( 'Terms', APP_TD ); ?></legend>
<div class="proposal-terms"><?php echo esc_textarea( $proposal->_hrb_development_terms ); ?></div>
</fieldset>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<a href="<?php echo esc_url( $return_url ); ?>" class="button secondary"><?php esc_attr_e( '← Back', APP_TD ); ?></a>
<?php if ( $user_can_edit_agreement && $proposal->selected ) : ?>
<input type="submit" id="proposal_agreement" name="proposal_agreement" class="button" value="<?php esc_attr_e( 'Submit for Approval', APP_TD ); ?>" />
<?php endif; ?>
<?php the_hrb_proposal_edit_link( $proposal->get_id(), '', '', '', array( 'class' => 'button success right' ) ); ?>
<?php the_hrb_proposal_cancel_link( $proposal->get_id(), '', '', '', array( 'class' => 'button secondary right') ); ?>
</div>
</div>
<?php
hrb_hidden_input_fields(
array(
'proposal_id' => esc_attr( $proposal->get_id() ),
'user_relation' => 'candidate',
'decision' => esc_attr( $proposal->_hrb_employer_decision ),
'action' => 'proposal_agreement',
)
);
?>
</form>