[Rt-commit] rt branch, create-action, updated. 5e1d48d63b6e305f603808f7ad38b50aeec0a46e
sartak at bestpractical.com
sartak at bestpractical.com
Mon Nov 9 14:32:44 EST 2009
The branch, create-action has been updated
via 5e1d48d63b6e305f603808f7ad38b50aeec0a46e (commit)
from 9e320a456b87ca2ca1e64adf426c5e1a71f88798 (commit)
Summary of changes:
share/html/Ticket/Create.html | 426 -----------------------------------------
1 files changed, 0 insertions(+), 426 deletions(-)
delete mode 100755 share/html/Ticket/Create.html
- Log -----------------------------------------------------------------
commit 5e1d48d63b6e305f603808f7ad38b50aeec0a46e
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Mon Nov 9 14:32:33 2009 -0500
Get rid of /Ticket/Create.html
diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
deleted file mode 100755
index 4e96d78..0000000
--- a/share/html/Ticket/Create.html
+++ /dev/null
@@ -1,426 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
-%# <jesse at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-<&| /_elements/wrapper,
- title => _("Create a new ticket"),
-&>
-<& /Elements/Tabs,
- current_toptab => "ticket/create",
- title => _("Create a new ticket"),
- actions => $actions &>
-<& /Elements/ListActions, actions => \@results &>
-<form action="<% RT->config->get('web_path') %>/ticket/create" method="post" enctype="multipart/form-data" name="ticket_create">
-<input type="hidden" class="hidden" name="id" value="new" />
-% $m->callback( callback_name => 'FormStart', args_ref => \%ARGS );
-% if ($gnupg_widget) {
-<& /Elements/GnuPG/SignEncryptWidget:ShowIssues, self => $gnupg_widget &>
-% }
-<div id="Ticket-Create-basics">
-<a name="basics"></a>
-<&| /Widgets/TitleBox, title => _("Create a new ticket") &>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td class="label"><&|/l&>Queue</&>:</td>
-<td class="value"><& Elements/ShowQueue, queue_obj => $queue_obj &>
-<input type="hidden" class="hidden" name="queue" value="<% $queue_obj->name %>" />
-</td>
-<td class="label"><&|/l&>Status</&>:
-</td>
-<td class="value">
-<& /Elements/SelectStatus, name => "status", queue => $queue_obj, default => $ARGS{status}||'new', default_value => 0 &>
-</td>
-<td class="label">
-<&|/l&>Owner</&>:
-</td>
-<td class="value">
- <& /Elements/SelectOwner, name => "owner", queue_obj => $queue_obj, default => $ARGS{owner}|| RT->nobody->id, default_value => 0 &>
-</td>
-</tr>
-<tr>
-<td class="label">
-<&|/l&>Requestors</&>:
-</td>
-<td class="value" colspan="5">
- <& /Elements/EmailInput, name => 'requestors', size => '40', default => $ARGS{requestors} || Jifty->web->current_user->email &>
-</td>
-</tr>
-<tr>
-<td class="label">
-<&|/l&>Cc</&>:
-</td>
-<td class="value" colspan="3"><& /Elements/EmailInput, name => 'cc', size => '40', default => $ARGS{cc} &></td>
-<td class="comment" colspan="2"><i><font size="-2">
-<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <strong>will</strong> receive future updates.)</&></font></i>
-</td>
-</tr>
-<tr>
-<td class="label">
-<&|/l&>Admin Cc</&>:
-</td>
-<td class="value" colspan="3"><& /Elements/EmailInput, name => 'admin_cc', size => '40', default => $ARGS{admin_cc} &></td>
-<td class="comment" colspan="2"><i><font size="-2">
-<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <strong>will</strong> receive future updates.)</&></font></i>
-</td>
-</tr>
-<tr>
-<td class="label">
-<&|/l&>Subject</&>:
-</td>
-<td class="value" colspan="5">
-<input name="subject" size="60" maxsize="200" value="<%$ARGS{subject} || ''%>" />
-</td>
-</tr>
-<tr>
-<td colspan="6">
-<& /Ticket/Elements/EditCustomFields, %ARGS, queue_obj => $queue_obj &>
-</td>
-</tr>
-% if ($TxnCFs->count) {
-% while (my $CF = $TxnCFs->next()) {
-<tr>
-<td class="label"><% $CF->name %>:</td>
-<td><& /Elements/EditCustomField, custom_field => $CF, name_prefix =>
- "object-RT::Model::Transaction--CustomField-" &><em><% $CF->friendly_type %></em></td>
-</td></tr>
-% }
-% }
-<tr>
-% if (Jifty->web->session->get('Attachments')) {
-<td class="label">
-<&|/l&>Attached file</&>:
-</td>
-<td colspan="5">
-<&|/l&>Check box to delete</&><br />
-% foreach my $attach_name (keys %{Jifty->web->session->get('Attachments')}) {
-<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
-% } # end of foreach
-</td>
-</tr>
-<tr>
-% } # end of if
-<td class="label">
-<&|/l&>Attach file</&>:
-</td>
-<td class="value" colspan="5">
-<input type="file" name="attach" />
-<input type="submit" class="button" name="add_more_attach" value="<&|/l&>add More Files</&>" />
-</td>
-</tr>
-
-% if ( $gnupg_widget ) {
-<tr><td> </td><td colspan="5">
-<& /Elements/GnuPG/SignEncryptWidget, self => $gnupg_widget, queue_obj => $queue_obj &>
-</td></tr>
-% }
-
-<tr>
-<td colspan="6">
-<&|/l&>Describe the issue below</&>:<br />
-% $m->callback( %ARGS, queue_obj => $queue_obj, callback_name => 'BeforeMessageBox' );
-% if (exists $ARGS{content}) {
-<& /Elements/MessageBox, default => $ARGS{content}, include_signature => 0 &>
-% } else {
-<& /Elements/MessageBox, quote_transaction => $quote_transaction &>
-%}
-
-<br />
-</td>
-</tr>
-</table>
-</&>
-<& /Elements/Submit, label => _("Create")&>
-</div>
-
-<div id="Ticket-Create-details" class="jshide">
-<a name="details"></a>
-<table width="100%" border="0">
-<tr>
-<td width="50%" valign="top" class="boxcontainer">
- <div class="ticket-info-basics">
-
- <&| /Widgets/TitleBox, title => _('The Basics'),
- title_class=> 'inverse',
- color => "#993333" &>
-<table border="0">
-<tr><td class="label"><&|/l&>Priority</&>:</td><td><input size="3" name="initial_priority" value="<% $ARGS{initial_priority} ? $ARGS{initial_priority} : $queue_obj->initial_priority %>" /></td></tr>
-<tr><td class="label"><&|/l&>Final Priority</&>:</td><td><input size="3" name="final_priority" value="<% $ARGS{final_priority} ? $ARGS{final_priority} : $queue_obj->final_priority %>" /></td></tr>
-<tr><td class="label"><&|/l&>Time Estimated</&>:</td>
-<td>
-<input size="3" name="time_estimated" value="<%$ARGS{time_estimated} || ''%>" />
-<& /Elements/SelectTimeUnits, name =>'time_estimated' &>
-
-</td></tr>
-<tr><td class="label"><&|/l&>Time Worked</&>:</td>
-<td>
-<input size="3" name="time_worked" value="<%$ARGS{time_worked} || ''%>" />
-<& /Elements/SelectTimeUnits, name =>'time_worked' &>
-
-</td></tr>
-<tr>
-<td class="label"><&|/l&>Time Left</&>:</td>
-<td><input size="3" name="time_left" value="<%$ARGS{time_left} || ''%>" />
-<& /Elements/SelectTimeUnits, name =>'time_left' &>
-</td></tr>
-</table>
-</&>
-<br />
-<&|/Widgets/TitleBox, title => _("Dates"),
- title_class=> 'inverse',
- color => "#663366" &>
-
-<table>
-<tr><td class="label"><&|/l&>Starts</&>:</td><td><& /Elements/SelectDate, name => "starts", default => $ARGS{starts} || '' &></td></tr>
-<tr><td class="label"><&|/l&>Due</&>:</td><td><& /Elements/SelectDate, name => "due", default => $ARGS{due} || '' &></td></tr>
-</table>
-</&>
-</div>
-<br />
-</td>
-
-<td valign="top" class="boxcontainer">
-<div class="ticket-info-links">
-<&| /Widgets/TitleBox, title => _('Links'), title_class=> 'inverse' &>
-
-<em><&|/l&>(Enter ticket ids or URLs, separated with spaces)</&></em>
-<table border="0">
-<tr><td class="label"><&|/l&>Depends on</&></td><td><input size="10" name="new-DependsOn" value="<% $ARGS{'new-DependsOn'} || '' %>" /></td></tr>
-<tr><td class="label"><&|/l&>Depended on by</&></td><td><input size="10" name="DependsOn-new" value="<% $ARGS{'DependsOn-new'} || '' %>" /></td></tr>
-<tr><td class="label"><&|/l&>Parents</&></td><td><input size="10" name="new-MemberOf" value="<% $ARGS{'new-MemberOf'} || '' %>" /></td></tr>
-<tr><td class="label"><&|/l&>Children</&></td><td><input size="10" name="MemberOf-new" value="<% $ARGS{'MemberOf-new'} || '' %>" /></td></tr>
-<tr><td class="label"><&|/l&>Refers to</&></td><td><input size="10" name="new-RefersTo" value="<% $ARGS{'new-RefersTo'} || '' %>" /></td></tr>
-<tr><td class="label"><&|/l&>Referred to by</&></td><td><input size="10" name="RefersTo-new" value="<% $ARGS{'RefersTo-new'} || '' %>" /></td></tr>
-
-
-</table>
-</&>
-</div>
-<br />
-
-</td>
-</tr>
-</table>
-<& /Elements/Submit, label => _("Create") &>
-</div>
-</form>
-
-</&>
-<%INIT>
-$m->callback( callback_name => "Init", args_ref => \%ARGS );
-my $queue = $ARGS{queue};
-
-my $cloneticket_obj;
-if ( $clone_ticket ) {
- $cloneticket_obj = RT::Model::Ticket->new( current_user => Jifty->web->current_user );
- $cloneticket_obj->load($clone_ticket) or abort(_("Ticket could not be loaded"));
-
- my $clone = {
- Requestors => join( ',', $cloneticket_obj->role_group("requestor")->member_emails_as_string ),
- Cc => join( ',', $cloneticket_obj->role_group("cc")->member_emails_as_string),
- AdminCc => join( ',', $cloneticket_obj->role_group("admin_cc")->member_emails_as_string),
- initial_priority => $cloneticket_obj->priority,
- };
-
- $clone->{$_} = $cloneticket_obj->$_()
- for qw/owner subject final_priority time_estimated TimeWorked
- status TimeLeft Starts Started Due Resolved/;
-
- my $members = $cloneticket_obj->members;
- my ( @members, @members_of, @refers, @refers_by, @depends, @depends_by );
- my $refers = $cloneticket_obj->refers_to;
- while ( my $refer = $refers->next ) {
- push @refers, $refer->local_target;
- }
- $clone->{'new-RefersTo'} = join ' ', @refers;
-
- my $refers_by = $cloneticket_obj->referred_to_by;
- while ( my $refer_by = $refers_by->next ) {
- push @refers_by, $refer_by->local_base;
- }
- $clone->{'RefersTo-new'} = join ' ', @refers_by;
- if (0) { # Temporarily disabled
- my $depends = $cloneticket_obj->depends_on;
- while ( my $depend = $depends->next ) {
- push @depends, $depend->localtarget;
- }
- $clone->{'new-DependsOn'} = join ' ', @depends;
-
- my $depends_by = $cloneticket_obj->depended_on_by;
- while ( my $depend_by = $depends_by->next ) {
- push @depends_by, $depend_by->local_base;
- }
- $clone->{'DependsOn-new'} = join ' ', @depends_by;
-
- while ( my $member = $members->next ) {
- push @members, $member->local_base;
- }
- $clone->{'MemberOf-new'} = join ' ', @members;
-
- my $members_of = $cloneticket_obj->member_of;
- while ( my $member_of = $members_of->next ) {
- push @members_of, $member_of->localtarget;
- }
- $clone->{'new-MemberOf'} = join ' ', @members_of;
-
-
- my $cfs = $cloneticket_obj->queue->ticket_custom_fields();
- while ( my $cf = $cfs->next ) {
- my $cf_id = $cf->id;
- my $cf_values = $cloneticket_obj->custom_field_values( $cf->id );
- my @cf_values;
- while ( my $cf_value = $cf_values->next ) {
- push @cf_values, $cf_value->content;
- }
- $clone->{"object-RT::Model::Ticket--CustomField-$cf_id-value"}
- = join "\n", @cf_values;
- }
-
- for ( keys %$clone ) {
- $ARGS{$_} = $clone->{$_} if not defined $ARGS{$_};
- }
- }
-}
-my @results;
-my $queue_obj = RT::Model::Queue->new( current_user => Jifty->web->current_user );
-$queue_obj->load($queue) || abort(_("Queue could not be loaded."));
-
-$m->callback( queue_obj => $queue_obj, args_ref => \%ARGS );
-
-$queue_obj->disabled && abort(_("Cannot create tickets in a disabled queue."));
-
-my $CFs = $queue_obj->ticket_custom_fields();
-my $TxnCFs = $queue_obj->ticket_transaction_custom_fields();
-
-my $ValidCFs = $m->comp(
- '/Elements/ValidateCustomFields',
- custom_fields => $CFs,
- args_ref => \%ARGS
-);
-
-# {{{ deal with deleting uploaded attachments
-my $attachments = Jifty->web->session->get('Attachments') || {};
-foreach my $key (keys %ARGS) {
- if ($key =~ m/^DeleteAttach-(.+)$/) {
- delete $attachments->{$1};
- }
-}
-# }}}
-
-Jifty->web->session->set('Attachments', $attachments);
-
-# {{{ store the uploaded attachment in session
-if ($ARGS{'attach'}) { # attachment?
- my $attachment = make_mime_entity(
- attachment_field_name => 'attach'
- );
- my $file_path = Encode::decode_utf8("$ARGS{'attach'}");
- Jifty->web->session->set('Attachments', {
- %{Jifty->web->session->get('Attachments') || {}},
- $file_path => $attachment,
- });
-
-}
-# }}}
-
-# delete temporary storage entry to make WebUI clean
-unless (keys %{Jifty->web->session->get('Attachments')} and $ARGS{'id'} eq 'new') {
- Jifty->web->session->remove('Attachments');
-}
-
-my $checks_failure = 0;
-
-my $gnupg_widget = $m->comp('/Elements/GnuPG/SignEncryptWidget:new', arguments => \%ARGS );
-$m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
- self => $gnupg_widget,
- queue_obj => $queue_obj,
-);
-
-
-if ( !exists $ARGS{'add_more_attach'} && ($ARGS{'id'}||'') eq 'new' ) {
- my $status = $m->comp('/Elements/GnuPG/SignEncryptWidget:Check',
- self => $gnupg_widget,
- operation => 'create',
- queue_obj => $queue_obj,
- );
- $checks_failure = 1 unless $status;
-}
-
-my $skip_create = 0;
-$m->callback( callback_name => 'BeforeCreate', args_ref => \%ARGS, skip_create => \$skip_create,
- checks_failure => $checks_failure, results => \@results );
-
-if ((!exists $ARGS{'add_more_attach'}) and (defined($ARGS{'id'}) and $ARGS{'id'} eq 'new')) { # new ticket?
- if ( $ValidCFs && !$checks_failure && !$skip_create ) {
-
- $m->comp('Display.html', %ARGS);
- Jifty->log->fatal("After display call; error is $@");
- $m->abort();
- }
- elsif ( !$ValidCFs ) {
- # Invalid CFs
- while (my $CF = $CFs->next) {
- my $msg = $m->notes('InvalidField-' . $CF->id) or next;
- push @results, $CF->name . ': ' . $msg;
- }
- }
-}
-
-my $actions = {
- A => {
- html => q[<a href="#basics" onclick="jQuery('#Ticket-Create-details').hide(); jQuery('#Ticket-Create-basics').show(); return false;">] . _('Show basics') . q[</a>],
- },
- B => {
- html => q[<a href="#details" onclick="jQuery('#Ticket-Create-basics').hide(); jQuery('#Ticket-Create-details').show(); return false;">] . _('Show details') . q[</a>],
- },
-};
-</%INIT>
-
-<%ARGS>
-$depends_on => undef
-$depended_on_by => undef
-$member_of => undef
-$quote_transaction => undef
-$clone_ticket => undef
-</%ARGS>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list