diff options
author | David Lawrence <dkl@mozilla.com> | 2015-07-22 10:00:02 +0200 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-07-22 10:00:02 +0200 |
commit | 5f8b7d80c6d390d6eb135f8d8bb9f8662524a24b (patch) | |
tree | 64fe87476f6601aa1c56510a72763c4390fee27f /extensions | |
parent | de49ecc0ca26af7d391286d1a4b17af11920a1fd (diff) | |
download | bugzilla-5f8b7d80c6d390d6eb135f8d8bb9f8662524a24b.tar.gz bugzilla-5f8b7d80c6d390d6eb135f8d8bb9f8662524a24b.tar.xz |
Bug 1171605 - Intern Request Form
Diffstat (limited to 'extensions')
6 files changed, 411 insertions, 8 deletions
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 <mark@mozilla.com> + # Reed Loden <reed@mozilla.com> + #%] + +[% 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") %] + <p>Sorry, you do not have access to this page.</p> + [% RETURN %] +[% END %] + +<div id="heading">Intern Requests</div> +<div> + <p> + 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. <em>Please submit a [% terms.bug %] for + each individual intern you would like even if the descriptions are the same</em>. + 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. + </p> + + <p> + 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. + </p> + + <p> + Interns will be allotted based on the need for level 1 and 2 growth on your + team, business need, and location support. + </p> + + <form method="post" action="post_bug.cgi" id="internForm"> + <input type="hidden" id="short_desc" name="short_desc" value=""> + <input type="hidden" name="product" value="Recruiting"> + <input type="hidden" name="component" value="Intern"> + <input type="hidden" name="rep_platform" value="All"> + <input type="hidden" name="op_sys" value="Other"> + <input type="hidden" name="version" value="unspecified"> + <input type="hidden" name="priority" value="--"> + <input type="hidden" name="bug_severity" value="normal"> + <input type="hidden" name="format" value="intern"> + <input type="hidden" name="created-format" value="intern"> + <input type="hidden" name="token" value="[% token FILTER html %]"> + <input type="hidden" id="description" name="description" value="Job Description"> + <input type="hidden" name="contenttypemethod" value="autodetect" /> + [% IF user.in_group('canconfirm') %] + <input type="hidden" name="bug_status" value="NEW"> + [% END %] + + <div class="row"> + <label class="required" for="hiring_manager_name">Hiring Manager Name:</label> + <input required name="hiring_manager_name" id="hiring_manager_name" size="60" > + </div> + + <div class="row"> + <label class="required" for="team_name">Team:</label> + <input required name="team_name" id="team_name" size="60" > + </div> + + <div class="row"> + <label class="required" for="cost_center">Cost Center:</label> + <select required id="cost_center" name="cost_center"> + <option value="">Select..</option> + [% INCLUDE "bug/create/cost-centers.html.tmpl" %] + </select> + </div> + + <div class="row"> + <label class="required" for="vp_authority">VP Authority</label> + <select required id="vp_authority" name="vp_authority"> + <option value="">Select..</option> + [% INCLUDE "bug/create/vp-authority.html.tmpl" %] + </select> + </div> + + <div class="row"> + <label class="required" for="product_line">Product Line</label> + <select required id="product_line" name="product_line"> + <option value="">Select..</option> + <option value="Firefox">Firefox</option> + <option value="Firefox OS">Firefox OS</option> + <option value="Firefox for Android">Firefox for Android</option> + <option value="Content Services">Content Services</option> + <option value="Cloud Services">Cloud Services</option> + <option value="Legal">Legal</option> + <option value="Engagement">Engagement</option> + <option value="IT">IT</option> + <option value="Office of the CTO">Office of The CTO</option> + <option value="Platform">Platform</option> + <option value="Product Management">Product Management</option> + <option value="Marketplace">Marketplace</option> + <option value="Other">Other</option> + </select> + </div> + + <div class="row"> + <label class="required" for="level_1_or_2"> + Do you have a need for a level 1 or level 2 hire (entry level/new grad/JR role) to your team in the next year? + </label> + [% INCLUDE yesno name = "level_1_or_2" %] + </div> + + <div class="row"> + <label class="required" for="calironto"> + Are you located in a California or Toronto office? + </label> + [% INCLUDE yesno name = "calironto" %] + </div> + + <div class="row" id="other_location_row"> + <label class="required" for="other_location"> + If not where are you located? + </label> + <input required name="other_location" id="other_location" size="60"> + </div> + + <div class="row"> + <label class="required" for="onsite"> + Will you have onsite Mentorship for your intern in 2016? + </label> + [% INCLUDE yesno name = "onsite" %] + </div> + <div class="row"> + <label class="required" for="possible_mentor"> + Possible Mentor? + </label> + <input required name="possible_mentor" id="possible_mentor" size="60"> + </div> + + <div class="row"> + <label class="required" for="business_need"> + Business Need? + </label> + <select required id="business_need" name="business_need"> + <option value="">Select..</option> + <option value="I have a need for a level 1 or 2 hire in the next year">I have a need for a level 1 or 2 hire in the next year</option> + <option value="I have a short term project-based need that can wait until next Summer">I have a short term project-based need that can wait until next Summer</option> + <option value="Other">Neither of these fit and I can elaborate</option> + </select> + <br> + <textarea required disabled name="business_need_elaborate" + id="business_need_elaborate" cols="80" rows="10" + style="display:none;" placeholder="Elaborate on your business need"></textarea> + </div> + + <div class="row"> + <label class="required" for="potential_project"> + Please describe your potential project + </label> + <input required name="potential_project" id="potential_project" size="60"> + </div> + + <div class="row"> + <label class="required" for="job_description"> + Job Description + (<a target="_blank" href="https://mana.mozilla.org/wiki/display/globalstaffing/Intern+Job+Descriptions">more info</a>) + </label> + <textarea required name="job_description" + id="job_description" cols="80" rows="10" + placeholder="Please add link to Mana or copy and paste a JD. (if you are looking for multiple types interns please include a job description for each)"></textarea> + </div> + + <div class="row"> + <label class="required" for="would_hire"> + If my intern does exceptional work I would be willing to use headcount to hire them + </label> + [% INCLUDE yesno name = "would_hire" %] + </div> + + <div class="row"> + <label class="required" for="would_reintern"> + I would like my past intern to return for another internship + </label> + [% INCLUDE yesno name = "would_reintern" %] + </div> + + <div class="row"> + <label class="required" for="name"> + Name: + </label> + <input required name="name" id="name" size="60"> + </div> + + <div class="row"> + <label class="required" for="duration"> + Duration: + </label> + <input required name="duration" id="duration" size="60"> + </div> + + <input type="submit" id="commit" value="Submit Request"> + <p> + [ <span class="required_star">*</span> <span class="required_explanation"> + Required Field</span> ] + </p> + </form> + + <p>Thanks for contacting us. You will be notified by email of any progress made in resolving your request.</p> +</div> + +[% PROCESS global/footer.html.tmpl %] + +[% BLOCK yesno %] + <select required id="[% name FILTER html %]" name="[% name FILTER html %]"> + <option value="">Select..</option> + <option value="Yes">Yes</option> + <option value="No">No</option> + </select> +[% 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" +%] + +<h1>Thank you!</h1> + +<p> + Thank you for submitting your intern request! It will be + reviewed by the VPs and prioritized according to needs across the + organization. +</p> + +<p style="font-size: x-small"> + Reference: <a href="show_bug.cgi?id=[% id FILTER uri %]">#[% id FILTER html %]</a> +</p> + +[% 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", + } + ], } %] |