From 5f8b7d80c6d390d6eb135f8d8bb9f8662524a24b Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Wed, 22 Jul 2015 16:00:02 +0800 Subject: Bug 1171605 - Intern Request Form --- .htaccess | 1 + extensions/BMO/Extension.pm | 4 +- extensions/BMO/lib/Reports/Recruiting.pm | 13 +- .../en/default/bug/create/comment-intern.txt.tmpl | 63 +++++ .../en/default/bug/create/create-intern.html.tmpl | 301 +++++++++++++++++++++ .../en/default/bug/create/created-intern.html.tmpl | 27 ++ .../en/default/bug/create/custom_forms.none.tmpl | 11 +- 7 files changed, 412 insertions(+), 8 deletions(-) create mode 100644 extensions/BMO/template/en/default/bug/create/comment-intern.txt.tmpl create mode 100644 extensions/BMO/template/en/default/bug/create/create-intern.html.tmpl create mode 100644 extensions/BMO/template/en/default/bug/create/created-intern.html.tmpl diff --git a/.htaccess b/.htaccess index c71b5c541..0ebc36584 100644 --- a/.htaccess +++ b/.htaccess @@ -54,6 +54,7 @@ RewriteRule ^form[\.:]itrequest$ enter_bug.cgi?product=Infrastructure+\%26+Opera RewriteRule ^form[\.:](mozlist|poweredby|presentation|trademark|recoverykey)$ enter_bug.cgi?product=mozilla.org&format=$1 [QSA] RewriteRule ^form[\.:]legal$ enter_bug.cgi?product=Legal&format=legal [QSA] RewriteRule ^form[\.:]recruiting$ enter_bug.cgi?product=Recruiting&format=recruiting [QSA] +RewriteRule ^form[\.:]intern$ enter_bug.cgi?product=Recruiting&format=intern [QSA] RewriteRule ^form[\.:]mozpr$ enter_bug.cgi?product=Mozilla+PR&format=mozpr [QSA] RewriteRule ^form[\.:]reps[\.:]mentorship$ enter_bug.cgi?product=Mozilla+Reps&format=mozreps [QSA] RewriteRule ^form[\.:]reps[\.:]budget$ enter_bug.cgi?product=Mozilla+Reps&format=remo-budget [QSA] diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index 7d5bc42d1..3d46ead6b 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -1883,8 +1883,8 @@ sub enter_bug_start { # if configured with create_bug_formats, force users into a custom bug # format (can be overridden with a __standard__ format) my $cgi = Bugzilla->cgi; - if ($cgi->param('format') && $cgi->param('format') eq '__standard__') { - $cgi->delete('format'); + if ($cgi->param('format')) { + $cgi->delete('format') if $cgi->param('format') eq '__standard__'; } elsif (my $format = forced_format($cgi->param('product'))) { $cgi->param('format', $format); } diff --git a/extensions/BMO/lib/Reports/Recruiting.pm b/extensions/BMO/lib/Reports/Recruiting.pm index 34d61b681..bd988d9b1 100644 --- a/extensions/BMO/lib/Reports/Recruiting.pm +++ b/extensions/BMO/lib/Reports/Recruiting.pm @@ -12,6 +12,7 @@ use warnings; use Bugzilla::Error; use Bugzilla::Bug; use Bugzilla::Product; +use Bugzilla::Component; sub report { my ($vars) = @_; @@ -22,18 +23,20 @@ sub report { action => 'run', object => 'recruiting_dashboard' }); - my $product = Bugzilla::Product->check({ name => 'Recruiting', cache => 1 }); + my $product = Bugzilla::Product->check({ name => 'Recruiting', cache => 1 }); + my $component = Bugzilla::Component->new({ product => $product, name => 'General', cache => 1 }); # find all open recruiting bugs my $bugs = Bugzilla::Bug->match({ - product_id => $product->id, - resolution => '', + product_id => $product->id, + component_id => $component->id, + resolution => '', }); # filter bugs based on visibility and re-bless $user->visible_bugs($bugs); $bugs = [ - map { bless($_, 'RecuritingBug') } + map { bless($_, 'RecruitingBug') } grep { $user->can_see_bug($_->id) } @$bugs ]; @@ -43,7 +46,7 @@ sub report { 1; -package RecuritingBug; +package RecruitingBug; use strict; use warnings; diff --git a/extensions/BMO/template/en/default/bug/create/comment-intern.txt.tmpl b/extensions/BMO/template/en/default/bug/create/comment-intern.txt.tmpl new file mode 100644 index 000000000..bc422e2e2 --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/comment-intern.txt.tmpl @@ -0,0 +1,63 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +Hiring Manager: +[%+ cgi.param('hiring_manager_name') %] + +Team: +[%+ cgi.param('team_name') %] + +Cost Center: +[%+ cgi.param('cost_center') %] + +VP Authority: +[%+ cgi.param('vp_authority') %] + +Level 1/Level 2: +[%+ cgi.param("level_1_or_2") %] + +California or Toronto: +[%+ cgi.param("calironto") %] + +[% IF cgi.param("other_location") %] +Other Location: +[%+ cgi.param("other_location") %] +[% END %] + +Possible Mentor: +[%+ cgi.param("possible_mentor") %] + +Business Need: +[%+ + IF cgi.param("business_need") == "Other"; + cgi.param("business_need_elaborate"); + ELSE; + cgi.param("business_need"); + END; +%] + +Potential Project: +[%+ cgi.param("potential_project") %] + +Job Description: +[%+ cgi.param("job_description") %] + +Would Hire: +[%+ cgi.param("would_hire") %] + +Would like to intern again: +[%+ cgi.param("would_reintern") %] + +Name: +[%+ cgi.param("name") %] + +Duration: +[%+ cgi.param("duration") %] diff --git a/extensions/BMO/template/en/default/bug/create/create-intern.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-intern.html.tmpl new file mode 100644 index 000000000..358b0fd61 --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/create-intern.html.tmpl @@ -0,0 +1,301 @@ +[%# 1.0@bugzilla.org %] +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Mozilla Corporation. + # Portions created by Mozilla are Copyright (C) 2008 Mozilla + # Corporation. All Rights Reserved. + # + # Contributor(s): Mark Smith + # Reed Loden + #%] + +[% PROCESS global/variables.none.tmpl %] + +[% inline_style = BLOCK %] +#heading { + width: 98%; + font-size: 2em; + font-weight: bold; + margin: 10px; +} +p { + max-width: 40%; +} +label.required:before { + w + content: "* "; + color: red; +} +.required_star { + color: red; +} +.row label { + display: block; +} +.row { + padding-bottom: 10px; +} +[% END %] + +[% inline_javascript = BLOCK %] +$(document).ready(function() { + $("#calironto").change(function() { + var v = $(this).val(); + if (v == "" || v == "Yes") { + $("#other_location").removeAttr("required"); + $("label[for='other_location']").removeClass("required"); + $("#other_location_row").hide(); + } + else { + $("#other_location").attr("required", true); + $("label[for='other_location']").addClass("required"); + $("#other_location_row").show(); + } + }).change(); + $("#business_need").change(function() { + var v = $(this).val(); + if (v === "Other") { + $("#business_need_elaborate").prop("disabled", false).show(); + } + else { + $("#business_need_elaborate").prop("disabled", true).hide(); + } + }); + $("#internForm").on("submit", function() { + var name = $("#name").val(); + $("#short_desc").val("Intern Request: " + encodeURIComponent(name)); + }); +}); +[% END %] + +[% PROCESS global/header.html.tmpl + title = "Mozilla Corporation Intern Requests" + generate_api_token = 1 + style_urls = [ 'skins/standard/attachment.css' ] + javascript_urls = [] + style = inline_style + javascript = inline_javascript +%] + +[% IF !user.in_group("mozilla-employee-confidential") + && !user.in_group("mozilla-messaging-confidential") + && !user.in_group("mozilla-foundation-confidential") %] +

Sorry, you do not have access to this page.

+ [% RETURN %] +[% END %] + +
Intern Requests
+
+

+ Applications for 2016 Interns are now being accepted. If you would + like to request an intern for 2016 the application deadline is August + 28, 2015, as recruiting begins September 2015. Please submit a [% terms.bug %] for + each individual intern you would like even if the descriptions are the same. + Applying for an intern is not a guarantee that you will be granted an intern + this time around. All applications will be considered and reviewed by the + University Team, your Human Resource Business Partner, and ultimately approved + at the VP level. +

+ +

+ Interns are charged back to your department and cost approximately 30K (USD) + for a 12 week period and includes salary, housing, relocation, equipment and + visa if needed. Costs for Interns outside of the US and Canada will be researched + and determined on a case by case basis as they do not follow the same conventions + as US and CAD. +

+ +

+ Interns will be allotted based on the need for level 1 and 2 growth on your + team, business need, and location support. +

+ +
+ + + + + + + + + + + + + + [% IF user.in_group('canconfirm') %] + + [% END %] + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + [% INCLUDE yesno name = "level_1_or_2" %] +
+ +
+ + [% INCLUDE yesno name = "calironto" %] +
+ +
+ + +
+ +
+ + [% INCLUDE yesno name = "onsite" %] +
+
+ + +
+ +
+ + +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + [% INCLUDE yesno name = "would_hire" %] +
+ +
+ + [% INCLUDE yesno name = "would_reintern" %] +
+ +
+ + +
+ +
+ + +
+ + +

+ [ * + Required Field ] +

+
+ +

Thanks for contacting us. You will be notified by email of any progress made in resolving your request.

+
+ +[% PROCESS global/footer.html.tmpl %] + +[% BLOCK yesno %] + +[% END %] diff --git a/extensions/BMO/template/en/default/bug/create/created-intern.html.tmpl b/extensions/BMO/template/en/default/bug/create/created-intern.html.tmpl new file mode 100644 index 000000000..e45142b89 --- /dev/null +++ b/extensions/BMO/template/en/default/bug/create/created-intern.html.tmpl @@ -0,0 +1,27 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% PROCESS global/variables.none.tmpl %] + +[% PROCESS global/header.html.tmpl + title = "Intern Request Submission" +%] + +

Thank you!

+ +

+ Thank you for submitting your intern request! It will be + reviewed by the VPs and prioritized according to needs across the + organization. +

+ +

+ Reference: #[% id FILTER html %] +

+ +[% PROCESS global/footer.html.tmpl %] diff --git a/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl b/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl index 6e7841ecc..749b2a989 100644 --- a/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl +++ b/extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl @@ -191,6 +191,15 @@ custom_forms = { title => "Data Compliance Form", }, ], - + "Recruiting" => [ + { + link => "form.recruiting", + title => "Recruiting Requests", + }, + { + link => "form.intern", + title => "Intern Requests", + } + ], } %] -- cgit v1.2.3-24-g4f1b