Skip to content

Commit 5aa3244

Browse files
authored
Merge pull request #75 from companieshouse/release/4.34.0
Release/4.34.0
2 parents b57b96d + 784486b commit 5aa3244

File tree

12 files changed

+117
-39
lines changed

12 files changed

+117
-39
lines changed

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
PERL_DEPS_SERVER_URL ?= s3://release.ch.gov.uk/ch.gov.uk-deps
2+
PERL_DEPS_VERSION ?= 1.0.0
3+
PERL_DEPS_PACKAGE ?= ch.gov.uk-deps-$(PERL_DEPS_VERSION).zip
4+
PERL_DEPS_URL ?= $(PERL_DEPS_SERVER_URL)/$(PERL_DEPS_PACKAGE)
5+
16
LOCAL ?= ./local
27

38
SMARTPAN_URL ?= http://darkpan.ch.gov.uk:7050
@@ -24,6 +29,10 @@ api-enumerations/.git:
2429
git submodule init
2530
git submodule update
2631

32+
deps:
33+
test -d $(CURDIR)/local || { aws s3 cp $(PERL_DEPS_URL) .; unzip -q $(PERL_DEPS_PACKAGE) -d $(CURDIR)/local; }
34+
test -f $(PERL_DEPS_PACKAGE) && rm -f $(PERL_DEPS_PACKAGE)
35+
2736
getpan:
2837
getpan $(GETPAN_ARGS)
2938

@@ -63,4 +72,4 @@ package:
6372

6473
dist: build package
6574

66-
.PHONY: all build clean dist package getpan test test-unit test-int
75+
.PHONY: all build clean dist package getpan test test-unit test-int deps

api-enumerations

appconfig.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ external_url_for:
4848
follow_company : '<CHS_MONITOR_GUI_URL>/company/:company_number/confirm-follow'
4949
unfollow_company : '<CHS_MONITOR_GUI_URL>/company/:company_number/confirm-unfollow'
5050
file_accounts : '<EXTERNAL_FILE_ACCOUNTS_URL>'
51+
file_cic_accounts : '<EXTERNAL_FILE_CIC_ACCOUNTS_URL>'
5152

5253
admin_url_for:
5354
roles : <ACCOUNT_URL>/admin/roles

lib/ChGovUk/Controllers/Admin/User/Filings.pm

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ sub list {
3535
$doc->{closed_at_date} = CH::Util::DateHelper->isodate_as_string($doc->{closed_at});
3636
$doc->{closed_at_time} = CH::Util::DateHelper->isotime_as_string($doc->{closed_at})->strftime("%l:%M%P");
3737
}
38-
if ($doc->{status} eq "open" && $doc->{resume_journey_uri}) {
39-
$self->_build_resume_link($doc, $doc->{resume_journey_uri});
38+
if (($doc->{status} eq "open" ||
39+
$doc->{status} eq "closed pending payment") && $doc->{resume_journey_uri}) {
40+
$self->_build_resume_link($doc, $doc->{resume_journey_uri});
4041
}
4142
}
4243

@@ -57,7 +58,7 @@ sub list {
5758

5859
$self->render;
5960
},
60-
61+
6162
failure => sub {
6263
my ($api, $tx) = @_;
6364
my $error_code = $tx->error->{code} // 0;
@@ -76,10 +77,10 @@ sub list {
7677

7778
sub _build_resume_link {
7879
my ($self, $transaction, $resume_link) = @_;
79-
80+
8081
my $transaction_id = $transaction->{id};
8182
my $encoded_resume_link = encode_base64url($resume_link);
82-
83+
8384
$transaction->{resume_link} = "/user/transactions/" . $transaction_id . "/resume?link=" . $encoded_resume_link;
8485
return;
8586
}

lib/ChGovUk/Controllers/CustomerFeedback.pm

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ sub record_feedback {
1919
customer_name => $self->_sanitize_param('customer_name'),
2020
customer_email => $self->_sanitize_param('customer_email'),
2121
customer_feedback => $self->_sanitize_param('customer_feedback'),
22-
source_url => $self->_sanitize_param('source_url'),
22+
source_url => $self->_sanitize_param('source_url') =~ /sourceurl=([^&#]*)/,
2323
};
24-
24+
2525
# check the feedback looks ok?
2626
return $self->_render_json_error('No feedback entered. Please enter some feedback.', 1)
2727
unless $feedback->{customer_feedback};
@@ -40,16 +40,10 @@ sub record_feedback {
4040
if (not $feedback->{customer_name}) {
4141
$feedback->{customer_name} = '(not provided)';
4242
}
43-
43+
4444
debug 'Writing customer FEEDBACK to ['.$self->ch_api->admin->customer_feedback->path.']';
4545

46-
$self->ch_api->admin->customer_feedback->create({
47-
kind => $feedback->{kind},
48-
customer_name => $feedback->{customer_name},
49-
customer_email => $feedback->{customer_email},
50-
customer_feedback => $feedback->{customer_feedback},
51-
source_url => $feedback->{source_url},
52-
})->on(
46+
$self->ch_api->admin->customer_feedback->create($feedback)->on(
5347
success => sub {
5448
my ( $api, $tx ) = @_;
5549
return $self->render(json => { message => 'Feedback saved OK' });

templates/base.tx

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,23 @@
131131
</header>
132132
<!--end header-->
133133

134+
% if $feedback_banner {
135+
<div class="govuk-body" id="chs-customer-insights-top">
136+
<div class="govuk-width-container">
137+
<a href="http://resources.companieshouse.gov.uk/csat/index.shtml?Service=CHS">Tell us what you think of Companies House</a>
138+
</div>
139+
</div>
140+
% }
141+
134142
<main id="page-container" class="search <% $classes %>" role="main">
135143

136-
<div class="phase-banner">
137-
<div class="small-text"><a href="http://resources.companieshouse.gov.uk/serviceInformation.shtml#compInfo" target="_blank">Companies House does not verify the accuracy of the information filed<span class="visuallyhidden">(link opens a new window)</span></a></span>
138-
</div>
139-
</div>
144+
% if !$feedback_banner {
145+
<div class="phase-banner">
146+
% } else {
147+
<div>
148+
% }
149+
<div class="small-text"><a href="http://resources.companieshouse.gov.uk/serviceInformation.shtml#compInfo" target="_blank">Companies House does not verify the accuracy of the information filed<span class="visuallyhidden">(link opens a new window)</span></a></div>
150+
</div>
140151

141152
% if $user_bar != false {
142153
<div class="js-toggle-nav" id="global-nav">
@@ -184,21 +195,19 @@
184195
<div id="<% (! $disable_header_search) ? 'content-container' : 'search-container' %>">
185196
% block content -> { ; }
186197
</div>
187-
198+
188199
</main>
189200

190201
<!--end main-->
191202
<div class="push"></div>
192203

193-
194204
</div> <!-- end of entire-wrapper -->
195205

196-
% if ! $c.config.disable_feedback_form {
197-
<!-- powered by feedback.js -->
198-
<div class="feedback-wrapper">
199-
% include "includes/feedback.tx" { header_or_body => 'header' }
200-
</div>
201-
206+
% if $insights_bar != false {
207+
<div id="chs-customer-insights">
208+
<a href="https://www.surveymonkey.co.uk/r/chsat-migrt" target="_blank" onclick="javascript:_paq.push(['trackEvent', 'Beta', 'Feedback']);">Tell us what you think of this service<span class="hidden">(link opens a new window)</span></a>
209+
<a id="feedback-link" class="secondary-customer-insights" target="_blank">Is there anything wrong with this page?<span class="hidden">(link opens a new window)</span></a>
210+
</div>
202211
% }
203212

204213
<footer class="group js-footer" id="footer" role="contentinfo">
@@ -219,6 +228,10 @@
219228

220229
<!-- BEGIN Companies House Scripts -->
221230
<% include 'includes/piwik.tx' %>
231+
232+
<script>
233+
document.getElementById("feedback-link").setAttribute("href", "/help/feedback?sourceurl=" + window.location.href);
234+
</script>
222235
<!-- End of Companies House Scripts -->
223236
</body>
224237
</html>

templates/company/view.html.tx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,20 @@
203203

204204
% if $company.company_number == $c.authorised_company && !$c.config.disable_filing {
205205
% if $file_accounts {
206-
<p>
207-
<a href="<% $c.external_url_for('file_accounts', company_number => $company.company_number)%>" id="file-accounts" data-event-id="file-accounts" class="button piwik-event"><% l('File accounts') %>
206+
% if $company.is_community_interest_company {
207+
<p>
208+
<a href="<% $c.external_url_for('file_cic_accounts', company_number => $company.company_number)%>" id="file-accounts" data-event-id="file-accounts" class="button piwik-event"><% l('File accounts') %>
208209
</a>
209-
</p>
210+
</p>
211+
% }
212+
% else {
213+
<p>
214+
<a href="<% $c.external_url_for('file_accounts', company_number => $company.company_number)%>" id="file-accounts" data-event-id="file-accounts" class="button piwik-event"><% l('File accounts') %>
215+
</a>
216+
</p>
217+
% }
210218
% }
211219
% }
212-
213220
% }
214221
% if $company.latest_made_up_date {
215222
<p>Last accounts made up to <strong><% $c.isodate_as_string($company.latest_made_up_date) %></strong></p>

templates/includes/feedback.tx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
<div class="panel">
88
<form action="/customer-feedback" class="form" enctype="" method="post" name="" id="feedback-form">
99
<input type="hidden" name="source_url" value="" id="source-url-field">
10-
<h2 class="heading-medium">Help us improve the Companies House service</h2>
10+
<h2 class="heading-large" style="width: 500px;">Help us improve the Companies House service</h2>
1111
<div id="feedback-failed" style="display: none;">
1212
<p>Your submission has not been successful, please try again</p>
1313
</div>
1414
<fieldset>
1515
<legend class="visuallyhidden">Is there anything wrong with this page?</legend>
1616
<p><a href="https://www.gov.uk/stop-companies-house-from-publishing-your-address" target="_blank">Stop Companies House from publishing your address</a></p>
1717
<div class="form-group">
18-
<label for="feedback-textarea" class="form-label"><strong>What is wrong with this page?</strong>
18+
<label for="feedback-textarea" class="form-label"><strong>What is wrong with the page?</strong>
1919
<span class="form-hint">For example, information is missing or incorrect.</span></label>
2020
<textarea rows="5" maxlength="300" id="feedback-textarea" name="customer_feedback" cols="30" class="form-control" required></textarea>
2121
</div>

templates/includes/transactions.tx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@
3232
% if $c.can_do('/admin/transaction-lookup') {
3333
<a class="admin-link" id="view-transaction-<% $~transaction %>" href="<% $c.url_for('admin_transaction_details', transaction_number => $transaction.id) %>"> View transaction</a>
3434
% }
35-
35+
3636
% if $c.can_do('/admin/transaction-reprocess') && $transaction.status == "closed" {
3737

3838
<form method="post" action="<% $c.url_for('admin_transaction_reprocess', transaction_number => $transaction.id) %>">
3939
<div class="form-group">
4040
<input type="submit" id="reprocess" name="reprocess" class="admin-link" value="Reprocess transaction">
4141
</div>
4242
</form>
43-
43+
4444
% }
4545
</div>
4646
<div class="column-third column-reference" id="reference-number-<% $~transaction.count %>">
@@ -57,6 +57,13 @@
5757
<div class="column-third column-status" id="status-<% $~transaction.count %>">
5858
Status<strong> Processing </strong>
5959
</div>
60+
% } else if $transaction.status == "closed pending payment" {
61+
<div class="column-third column-status" id="status-<% $~transaction.count %>">
62+
Status<strong> Pending payment </strong>
63+
% if $transaction.resume_link && !$c.can_do('/admin/transaction-lookup') {
64+
<a class="piwik-event" data-event-id="Pay now" id="transaction-<% $~transaction.count %>-resume-link" href="<% $transaction.resume_link %>">Pay now</a>
65+
% }
66+
</div>
6067
% } else {
6168
<div class="column-third column-received_on" id="received-on-<% $~transaction.count %>">
6269
Received on <strong><% $transaction.closed_at_date %> at <% $transaction.closed_at_time %></strong>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
% cascade base { title => 'Feedback form - Companies House service', disable_header_search => 1, user_bar => false, insights_bar => false, }
2+
3+
% around content -> {
4+
5+
<div id="feedback-received" class="no-script">
6+
<h2 class="heading-medium">Thank you, your submission has been accepted</h2>
7+
</div>
8+
9+
<div id="feedback-form-container">
10+
<form action="/customer-feedback" class="form" enctype="" method="post" name="" id="feedback-form">
11+
<input type="hidden" name="source_url" value="" id="source-url-field">
12+
<div class="text">
13+
<h1 class="heading" id="main">Help us improve the Companies House service</h1>
14+
</div>
15+
<div id="feedback-failed" class="no-script">
16+
<p>Your submission has not been successful, please try again</p>
17+
</div>
18+
<fieldset>
19+
<legend class="visuallyhidden">Is there anything wrong with this page?</legend>
20+
<p><a href="https://www.gov.uk/stop-companies-house-from-publishing-your-address" target="_blank">Stop Companies House from publishing your address<span class="visuallyhidden">(link opens a new window)</span></a></p>
21+
<div class="form-group">
22+
<label for="feedback-textarea" class="form-label"><strong>What is wrong with the page?</strong>
23+
<span class="form-hint">For example, information is missing or incorrect.</span></label>
24+
<textarea rows="5" maxlength="300" id="feedback-textarea" name="customer_feedback" cols="30" class="form-control" required></textarea>
25+
</div>
26+
<div class="form-group">
27+
<label class="form-label" for="feedback-name"><strong>What is your name?</strong> (optional) </label>
28+
<input autocomplete="off" id ="feedback-name" class="form-control" name="customer_name" type="text" value="">
29+
</div>
30+
<div class="form-group" style="display: none;">
31+
<label class="form-label" for="feedback-check">confirmation</label>
32+
<input autocomplete="off" id ="feedback-check" name="customer_realcheck" type="text" value="">
33+
</div>
34+
<div class="form-group">
35+
<label class="form-label" for="feedback-email"><strong>What is your email address?</strong> (optional) </label>
36+
<input autocomplete="off" id="feedback-email" class="form-control" name="customer_email" type="email" value="">
37+
</div>
38+
<div class="form-group" id="auth-form-group">
39+
<label class="form-label" id="auth-code-label" for="feedback-auth"><strong>Enter these characters to prove you're not a robot </strong></label>
40+
<input autocomplete="off" id="feedback-auth" class="form-control form-control-1-8" required name="customer_auth" type="numbers" value="">
41+
</div>
42+
<input type="submit" class="button" id="submit-report" value="Submit report">
43+
</fieldset>
44+
</form>
45+
</div><!--toggle-->
46+
% }

0 commit comments

Comments
 (0)