Bugzilla – Attachment 48060 Details for
Bug 9021
Add SMS via email as an alternative to SMS services via SMS::Send drivers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9021 [QA Followup] - Add feedback to delete button if provider is being used
Bug-9021-QA-Followup---Add-feedback-to-delete-butt.patch (text/plain), 5.19 KB, created by
Jonathan Druart
on 2016-02-15 16:29:56 UTC
(
hide
)
Description:
Bug 9021 [QA Followup] - Add feedback to delete button if provider is being used
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-02-15 16:29:56 UTC
Size:
5.19 KB
patch
obsolete
>From adb097e128678cfb8e15982d9c63891819c3139a Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 10 Feb 2016 10:19:00 +0000 >Subject: [PATCH] Bug 9021 [QA Followup] - Add feedback to delete button if > provider is being used > >* Change links to buttons >* Add warning class to delete button if provider is being used > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/SMS/Provider.pm | 16 ++++++++++ > .../prog/en/modules/admin/sms_providers.tt | 34 ++++++++++++++++++---- > 2 files changed, 45 insertions(+), 5 deletions(-) > >diff --git a/Koha/SMS/Provider.pm b/Koha/SMS/Provider.pm >index 1aa70dc..cc047dd 100644 >--- a/Koha/SMS/Provider.pm >+++ b/Koha/SMS/Provider.pm >@@ -21,6 +21,8 @@ use Modern::Perl; > > use Carp; > >+use Koha::Borrowers; >+ > use base qw(Koha::Object); > > =head1 NAME >@@ -34,6 +36,20 @@ Koha::SMS::Provider - Koha SMS Provider object class > > =cut > >+=head3 patrons_using >+ >+my $count = $provider->patrons_using() >+ >+Gives the number of patrons using this provider >+ >+=cut >+ >+sub patrons_using { >+ my ( $self ) = @_; >+ >+ return Koha::Borrowers->search( { sms_provider_id => $self->id } )->count(); >+} >+ > =head3 type > > =cut >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt >index c33f216..706db5c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt >@@ -60,6 +60,7 @@ function delete_provider( id ) { > <tr> > <th>Name</th> > <th>Domain</th> >+ <th title="Patrons using this provider">Patrons</th> > <th> </th> > <th> </th> > </tr> >@@ -70,8 +71,23 @@ function delete_provider( id ) { > <tr> > <td id="name_[% p.id %]">[% p.name %]</td> > <td id="domain_[% p.id %]">[% p.domain %]</td> >- <td><a href="#" id="edit_[% p.id %]" class="edit" onclick="edit_provider( [% p.id %] );">Edit</td> >- <td><a href="#" id="delete_[% p.id %]" class="delete" onclick="delete_provider( [% p.id %] );">Delete</td> >+ <td id="patrons_using_[% p.id %]">[% p.patrons_using %]</td> >+ <td> >+ <a class="btn" href="#" id="edit_[% p.id %]" class="edit" onclick="edit_provider( [% p.id %] );"> >+ <i class="fa fa-pencil"></i> Edit >+ </a> >+ </td> >+ <td> >+ [% IF p.patrons_using %] >+ <a class="btn btn-danger" href="#" id="delete_[% p.id %]" class="delete" onclick="delete_provider( [% p.id %] );"> >+ <span style="color:white"><i class="fa fa-trash"></i> Delete</span> >+ </a> >+ [% ELSE %] >+ <a class="btn" href="#" id="delete_[% p.id %]" class="delete" onclick="delete_provider( [% p.id %] );"> >+ <i class="fa fa-trash"></i> Delete >+ </a> >+ [% END %] >+ </td> > </tr> > [% END %] > </tbody> >@@ -83,11 +99,19 @@ function delete_provider( id ) { > <tr> > <td><input type="text" id="name" name="name" /></td> > <td><input type="text" id="domain" name="domain" size="40"/></td> >+ <td colspan="2"> >+ <button class="btn" id="submit_save" type="submit"> >+ <i class="fa fa-plus"></i> Add new >+ </button> >+ <button class="btn" id="submit_update" type="submit"> >+ <i class="fa fa-plus-circle"></i> Update >+ </button> >+ </td> > <td> >- <input id="submit_save" type="submit" value="Add new"> >- <input id="submit_update" type="submit" value="Update"> >+ <a class="btn" id="cancel" href="#" onclick="cancel_edit()"> >+ <i class="fa fa-ban"></i> Cancel >+ </a> > </td> >- <td><a id="cancel" href="#" onclick="cancel_edit()">Cancel</a></td> > </tr> > </form> > </tfoot> >-- >2.7.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9021
:
13290
|
13291
|
13293
|
13294
|
14166
|
14167
|
14363
|
15685
|
15687
|
15689
|
15691
|
16628
|
17311
|
21729
|
22478
|
28488
|
29927
|
32453
|
34180
|
34181
|
35816
|
40720
|
44331
|
45152
|
46163
|
46164
|
46165
|
46168
|
46169
|
46170
|
46171
|
47128
|
47129
|
47130
|
47133
|
47134
|
47135
|
47338
|
47339
|
47814
|
47815
|
47816
|
47817
|
47818
|
47845
|
47846
|
47847
|
47848
|
47995
|
48024
|
48025
|
48026
|
48027
|
48028
|
48029
|
48030
|
48031
|
48032
|
48033
|
48034
|
48035
|
48036
|
48052
|
48053
|
48054
|
48055
|
48056
|
48057
|
48058
|
48059
| 48060 |
48061
|
48062
|
48063
|
48064
|
48065
|
48066