Bug 32618: Add 'page-section' to various administration pages

This patch adds a "page-section" container div around the main section
of administration pages which lack it.

The SMS providers page required a small change to the associated
JavaScript in order to target the right container, so you may need to
clear your browser cache to get the correct behavior.

This patch contains indentation changes, so please ignore whitespace
when looking at the diff.

To test, apply the patch and view the following pages to confirm that
the main content is contained in a white box:

 - Acquisitions -> Vendor -> Contracts
 - Administration -> Budgets -> Budget details -> Planning
 - Administration -> Circulation desks
 - Administration -> OAI sets configuration -> Define mappings
 - Administration -> System preferences -> Search for
   'OverDriveAuthName' -> OverDrive library authnames table
 - Administration -> SMS cellular providers
   - Confirm that the "Edit" buttons work correctly to show and hide the
     right content.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2addd2879a)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2023-01-12 18:00:56 +00:00 committed by Jacob O'Mara
parent 58efcd5fe3
commit de17dcc85f
7 changed files with 315 additions and 307 deletions

View file

@ -109,7 +109,8 @@
<div class="dialog alert">Contract has not been deleted. Maybe a basket linked to this contract exists.</div>
[% END %]
[% IF ( add_form ) %]
[% IF ( add_form ) %]
<div class="page-section">
<form name="Aform" action="/cgi-bin/koha/admin/aqcontract.pl" id="add_modify_contract" method="post">
<input type="hidden" name="op" value="add_validate" />
<input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
@ -150,6 +151,7 @@
<input type="submit" class="btn btn-primary" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | html %]&amp;contractnumber=[% contractnumber | html %]">Cancel</a>
</fieldset>
</form>
</div> <!-- /.page-section -->
[% END %]
[% IF ( add_validate ) %]
<h1>Data recorded</h1>
@ -191,29 +193,31 @@
[% IF ( else ) %]
<h1>Contract(s) of [% booksellername | html %]</h1>
[% IF ( loop ) %]
<table>
<tr>
<th scope="col">Name</th>
<th scope="col">Description</th>
<th scope="col">Start date</th>
<th scope="col">End date</th>
<th scope="col">Actions</th>
</tr>
[% FOREACH loo IN loop %]
<tr>
<td>
<a href="[% loo.script_name | url %]?op=add_form&amp;booksellerid=[% loo.booksellerid | uri %]&amp;contractnumber=[% loo.contractnumber | uri %]">[% loo.contractname | html %]</a>
</td>
<td>[% loo.contractdescription | html %]</td>
<td>[% loo.contractstartdate | html %]</td>
<td>[% loo.contractenddate | html %]</td>
<td class="actions">
<a href="[% loo.script_name | url %]?op=add_form&amp;contractnumber=[% loo.contractnumber | uri %]&amp;booksellerid=[% loo.booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
<a href="[% loo.script_name | url %]?op=delete_confirm&amp;contractnumber=[% loo.contractnumber | uri %]&amp;booksellerid=[% loo.booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
</td>
</tr>
[% END %]
</table>
<div class="page-section">
<table>
<tr>
<th scope="col">Name</th>
<th scope="col">Description</th>
<th scope="col">Start date</th>
<th scope="col">End date</th>
<th scope="col">Actions</th>
</tr>
[% FOREACH loo IN loop %]
<tr>
<td>
<a href="[% loo.script_name | url %]?op=add_form&amp;booksellerid=[% loo.booksellerid | uri %]&amp;contractnumber=[% loo.contractnumber | uri %]">[% loo.contractname | html %]</a>
</td>
<td>[% loo.contractdescription | html %]</td>
<td>[% loo.contractstartdate | html %]</td>
<td>[% loo.contractenddate | html %]</td>
<td class="actions">
<a href="[% loo.script_name | url %]?op=add_form&amp;contractnumber=[% loo.contractnumber | uri %]&amp;booksellerid=[% loo.booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
<a href="[% loo.script_name | url %]?op=delete_confirm&amp;contractnumber=[% loo.contractnumber | uri %]&amp;booksellerid=[% loo.booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
</td>
</tr>
[% END %]
</table>
</div> <!-- /.page-section -->
[% ELSE %]
<div class="dialog message">
There are no contracts with this vendor.

View file

@ -48,131 +48,129 @@
<input type="hidden" name="authcat" value="[% authcat | html %]" />
<!-- Budget Lines -->
[% IF ( budget_lines ) %]
<div class="page-section">
[% INCLUDE 'budgets-active-currency.inc' %]
[% IF ( show_actual ) %]
<p><strong>Each cell contain both actual and estimated values.</strong></p>
[% ELSE %]
<p><strong>Cells contain estimated values only.</strong></p>
[% END %]
[% IF ( budget_lines ) %]
<p id="selections">
<strong>Show/hide columns:</strong> <span class="selected"><input type="checkbox" checked="checked" id="showall"/><label for="showall">Show all columns</label></span> <span><input type="checkbox" id="hideall"/><label for="hideall">Hide all columns</label></span>
[% FOREACH authvals_ro IN authvals_row %]
<span class="selected"><label><input type="checkbox" checked="checked" id="col[% authvals_ro.colnum | html %]">[% authvals_ro.code | html %]</label></span>
[% END %]
</p>
<table id="plan">
<thead>
<tr>
<th>Fund name</th>
<th>Fund total</th>
[% FOREACH authvals_ro IN authvals_row %]
[% IF ( authvals_ro.display ) %]
<th id="col[% authvals_ro.code | html %]" class="[% authvals_ro.colnum | html %]">
[% ELSE %]
<th id="col[% authvals_ro.code | html %]" style="display:none;" class="[% authvals_ro.colnum | html %]">
[% END %]
[% authvals_ro.code | html %]</th>
[% END %]
<th class="remaining">Fund remaining</th>
<th class="noExport">Actions</th>
</tr>
</thead>
<tbody>
[% FOREACH budget_line IN budget_lines %]
<tr id="[% budget_line.budget_id | html %]">
[% IF ( budget_line.budget_lock ) %]
<td class="locked" title="Fund locked">
[% ELSE %]
<td>
[% END %]
<a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_id=[% budget_line.budget_id | uri %]&amp;budget_period_id=[% budget_period_id | uri %]">[% budget_line.budget_name | html %]</a></td>
<td><span id="[% budget_line.budget_amount | html %]">[% budget_line.budget_amount | $Price %]&nbsp;</span>
<!-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND ESTIMATED AMOUNTS -->
<div style="display:none;" id="budget_tot_[% budget_line.budget_id | html %]">[% budget_line.budget_amount | html %]</div></td>
[% FOREACH line IN budget_line.lines %]
[% IF ( line.display ) %]
<td class="[% line.colnum | html %]">
[% INCLUDE 'budgets-active-currency.inc' %]
[% IF ( show_actual ) %]
<p><strong>Each cell contain both actual and estimated values.</strong></p>
[% ELSE %]
<td style="display:none;" class="[% line.colnum | html %]">
<p><strong>Cells contain estimated values only.</strong></p>
[% END %]
<table class="invis">
<p id="selections">
<strong>Show/hide columns:</strong> <span class="selected"><input type="checkbox" checked="checked" id="showall"/><label for="showall">Show all columns</label></span> <span><input type="checkbox" id="hideall"/><label for="hideall">Hide all columns</label></span>
[% FOREACH authvals_ro IN authvals_row %]
<span class="selected"><label><input type="checkbox" checked="checked" id="col[% authvals_ro.colnum | html %]">[% authvals_ro.code | html %]</label></span>
[% END %]
</p>
<table id="plan">
<thead>
<tr>
[% IF show_actual %]
<td >[% line.actual_amount | html %]</td>
<th>Fund name</th>
<th>Fund total</th>
[% FOREACH authvals_ro IN authvals_row %]
[% IF ( authvals_ro.display ) %]
<th id="col[% authvals_ro.code | html %]" class="[% authvals_ro.colnum | html %]">
[% ELSE %]
<th id="col[% authvals_ro.code | html %]" style="display:none;" class="[% authvals_ro.colnum | html %]">
[% END %]
[% authvals_ro.code | html %]</th>
[% END %]
<td>
<th class="remaining">Fund remaining</th>
<th class="noExport">Actions</th>
</tr>
</thead>
[% IF ( line.budget_lock ) %]
[% line.estimated_amount | html %]&nbsp;
<input type="hidden" style="text-align: right;" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" />
[% ELSE %]
<input type="text" size="6" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" id="budget_[% line.budget_id | html %][% line.colnum | html %]" class="plan_entry plan_entry_[% line.budget_id | html %]" />
<tbody>
[% FOREACH budget_line IN budget_lines %]
<tr id="[% budget_line.budget_id | html %]">
[% IF ( budget_line.budget_lock ) %]
<td class="locked" title="Fund locked">
[% ELSE %]
<td>
[% END %]
<a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_id=[% budget_line.budget_id | uri %]&amp;budget_period_id=[% budget_period_id | uri %]">[% budget_line.budget_name | html %]</a></td>
<td><span id="[% budget_line.budget_amount | html %]">[% budget_line.budget_amount | $Price %]&nbsp;</span>
<!-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND ESTIMATED AMOUNTS -->
<div style="display:none;" id="budget_tot_[% budget_line.budget_id | html %]">[% budget_line.budget_amount | html %]</div></td>
[% FOREACH line IN budget_line.lines %]
[% IF ( line.display ) %]
<td class="[% line.colnum | html %]">
[% ELSE %]
<td style="display:none;" class="[% line.colnum | html %]">
[% END %]
<table class="invis">
<tr>
[% IF show_actual %]
<td >[% line.actual_amount | html %]</td>
[% END %]
<td>
[% IF ( line.budget_lock ) %]
[% line.estimated_amount | html %]&nbsp;
<input type="hidden" style="text-align: right;" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" />
[% ELSE %]
<input type="text" size="6" name="[% line.cell_name | html %]" value="[% line.estimated_amount | html %]" id="budget_[% line.budget_id | html %][% line.colnum | html %]" class="plan_entry plan_entry_[% line.budget_id | html %]" />
[% END %]
</td></tr>
</table>
</td>
[% END %]
<td>
<table class="invis">
<tr>
[% IF show_actual %]
[% IF ( budget_line.act_negative ) %]
<td style="color: red;">
[% ELSIF ( budget_line.act_positive ) %]
<td style="color: green;">
[% ELSE %]
<td>
[% END %]
[% budget_line.budget_act_remain | html %]
</td>
[% END %]
[% IF ( budget_line.est_negative ) %]
<td style="color: red;" id="budget_est_[% budget_line.budget_id | html %]">
[% ELSIF ( budget_line.est_positive ) %]
<td style="color: green;" id="budget_est_[% budget_line.budget_id | html %]">
[% ELSE %]
<td id="budget_est_[% budget_line.budget_id | html %]">
[% END %]
[% budget_line.budget_est_remain | $Price %]&nbsp;
</td>
</tr>
</table>
</td>
<td class="actions">
[% UNLESS ( budget_line.budget_lock ) %]
<input type="button" class="auto_fill_row btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Auto-fill row"/>
<input type="button" class="clear_fields btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Clear">
[% ELSE %]
<div style="color:red;">not owned</div>
[% END %]
</td>
</tr>
[% END %]
</td></tr>
</table>
</td>
[% END %]
<td>
<table class="invis">
<tr>
[% IF show_actual %]
[% IF ( budget_line.act_negative ) %]
<td style="color: red;">
[% ELSIF ( budget_line.act_positive ) %]
<td style="color: green;">
[% ELSE %]
<td>
[% END %]
[% budget_line.budget_act_remain | html %]
</td>
[% END %]
[% IF ( budget_line.est_negative ) %]
<td style="color: red;" id="budget_est_[% budget_line.budget_id | html %]">
[% ELSIF ( budget_line.est_positive ) %]
<td style="color: green;" id="budget_est_[% budget_line.budget_id | html %]">
[% ELSE %]
<td id="budget_est_[% budget_line.budget_id | html %]">
[% END %]
[% budget_line.budget_est_remain | $Price %]&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
<td class="actions">
[% UNLESS ( budget_line.budget_lock ) %]
<input type="button" class="auto_fill_row btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Auto-fill row"/>
<input type="button" class="clear_fields btn btn-default btn-xs" data-budget-id="[% budget_line.budget_id | html %]" value="Clear">
[% ELSE %]
<div style="color:red;">not owned</div>
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
<input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
[% IF ( budget_period_locked ) %]
<!-- <input STYLE="background: gray;" type="submit" value="Save" disabled="disabled"/> -->
[% ELSE %]
<input type="hidden" name="op" value="save" />
<fieldset class="action"><input type="submit" class="btn btn-primary" value="Save" /></fieldset>
[% END %]
<input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
[% IF ( budget_period_locked ) %]
<!-- <input STYLE="background: gray;" type="submit" value="Save" disabled="disabled"/> -->
[% ELSE %]
<input type="hidden" name="op" value="save" />
<fieldset class="action"><input type="submit" class="btn btn-primary" value="Save" /></fieldset>
[% END %]
</div> <!-- /.page-section -->
<div id="hide_div">
[% FOREACH authvals_ro IN authvals_row %]

View file

@ -182,29 +182,31 @@
[% END %]
[% IF desks.count %]
<table id="table_desks">
<thead>
<tr>
<th>Desk ID</th>
<th>Desk</th>
<th>Library</th>
<th class="NoSort noExport">Action</th>
</tr>
</thead>
<tbody>
[% FOREACH desk IN desks %]
<tr>
<td>[% desk.desk_id | html %]</td>
<td>[% desk.desk_name | html %]</td>
<td>[% Branches.GetName( desk.branchcode ) | html %]</td>
<td class="actions">
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/desks.pl?op=add_form&amp;desk_id=[% desk.desk_id | html %]"><i class="fa fa-pencil"></i> Edit</a>
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/desks.pl?op=delete_confirm&amp;desk_id=[% desk.desk_id | html %]"><i class="fa fa-trash"></i> Delete</a>
</td>
</tr>
[% END %]
</tbody>
</table>
<div class="page-section">
<table id="table_desks">
<thead>
<tr>
<th>Desk ID</th>
<th>Desk</th>
<th>Library</th>
<th class="NoSort noExport">Action</th>
</tr>
</thead>
<tbody>
[% FOREACH desk IN desks %]
<tr>
<td>[% desk.desk_id | html %]</td>
<td>[% desk.desk_name | html %]</td>
<td>[% Branches.GetName( desk.branchcode ) | html %]</td>
<td class="actions">
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/desks.pl?op=add_form&amp;desk_id=[% desk.desk_id | html %]"><i class="fa fa-pencil"></i> Edit</a>
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/desks.pl?op=delete_confirm&amp;desk_id=[% desk.desk_id | html %]"><i class="fa fa-trash"></i> Delete</a>
</td>
</tr>
[% END %]
</tbody>
</table>
</div> <!-- /.page-section -->
[% ELSE %]
<div class="dialog message">
There are no desks defined. <a href="/cgi-bin/koha/admin/desks.pl?op=add_form">Create a new desk</a>.

View file

@ -45,94 +45,97 @@
[% UNLESS ( mappings ) %]
<div class="dialog alert"><p><strong>Warning:</strong> No mappings have been defined for this set</p></div>
[% END %]
<form action="/cgi-bin/koha/admin/oai_set_mappings.pl" method="post" id="mappingform">
<table id="mappings">
<thead>
<tr>
<th>Rule operator</th>
<th>Field</th>
<th>Subfield</th>
<th>Operator</th>
<th>Value</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
[% IF ( mappings ) %]
[% FOREACH mapping IN mappings %]
<tr>
<td>
<select name="rule_operator">
[% IF (mapping.rule_operator == 'and') %]
<option value="and" selected="selected">and</option>
[% ELSE %]
<option value="and">and</option>
[% END %]
[% IF (mapping.rule_operator == 'or') %]
<option value="or" selected="selected">or</option>
[% ELSE %]
<option value="or">or</option>
[% END %]
</select>
</td>
<td><input type="text" name="marcfield" size="3" value="[% mapping.marcfield | html %]" /></td>
<td><input type="text" name="marcsubfield" size="1" value="[% mapping.marcsubfield | html %]" /></td>
<td><select name=operator>
[% IF mapping.operator == 'equal' %]
<option value="equal" selected="selected">is equal to</option>
<option value="notequal">not equal to</option>
[% ELSE %]
<option value="equal">is equal to</option>
<option value="notequal" selected="selected">not equal to</option>
[% END %]
</select></td>
<td><input type="text" name="marcvalue" value="[% mapping.marcvalue | html %]" /></td>
<td>
[% IF ( loop.last ) %]
<button type="button" id="new_rule_button" class="btn btn-default btn-xs" title="Add another condition"><i class="fa fa-plus"></i> Add</button>
[% END %]
</td>
<td><button class="btn btn-default btn-xs clear-field" type="button"><i class="fa fa-trash"></i> Delete</button></td>
</tr>
[% END %]
[% ELSE %]
<tr>
<td>
<select name="rule_operator">
[% IF (mapping.rule_operator == 'and') %]
<option value="and" selected="selected">and</option>
[% ELSE %]
<option value="and">and</option>
[% END %]
[% IF (mapping.rule_operator == 'or') %]
<option value="or" selected="selected">or</option>
[% ELSE %]
<option value="or">or</option>
[% END %]
</select>
</td>
<td><input type="text" name="marcfield" size="3" /></td>
<td><input type="text" name="marcsubfield" size="1" /></td>
<td><select name=operator>
<option value="equal">is equal to</option>
<option value="notequal">not equal to</option>
</select></td>
<td><input type="text" name="marcvalue" /></td>
<td>
<button type="button" id="new_rule_button" class="btn btn-default btn-xs" title="Add another condition"><i class="fa fa-plus"></i> Add</button>
</td>
<td><button class="btn btn-default btn-xs clear-field" type="button"><i class="fa fa-trash"></i> Delete</button></td>
</tr>
[% END %]
</tbody>
</table>
<input type="hidden" name="id" value="[% id | html %]" />
<input type="hidden" name="op" value="save" />
<fieldset class="action">
<input type="submit" class="btn btn-primary" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/oai_sets.pl">Cancel</a>
</fieldset>
</form>
<div class="page-section">
<form action="/cgi-bin/koha/admin/oai_set_mappings.pl" method="post" id="mappingform">
<table id="mappings">
<thead>
<tr>
<th>Rule operator</th>
<th>Field</th>
<th>Subfield</th>
<th>Operator</th>
<th>Value</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
[% IF ( mappings ) %]
[% FOREACH mapping IN mappings %]
<tr>
<td>
<select name="rule_operator">
[% IF (mapping.rule_operator == 'and') %]
<option value="and" selected="selected">and</option>
[% ELSE %]
<option value="and">and</option>
[% END %]
[% IF (mapping.rule_operator == 'or') %]
<option value="or" selected="selected">or</option>
[% ELSE %]
<option value="or">or</option>
[% END %]
</select>
</td>
<td><input type="text" name="marcfield" size="3" value="[% mapping.marcfield | html %]" /></td>
<td><input type="text" name="marcsubfield" size="1" value="[% mapping.marcsubfield | html %]" /></td>
<td><select name=operator>
[% IF mapping.operator == 'equal' %]
<option value="equal" selected="selected">is equal to</option>
<option value="notequal">not equal to</option>
[% ELSE %]
<option value="equal">is equal to</option>
<option value="notequal" selected="selected">not equal to</option>
[% END %]
</select></td>
<td><input type="text" name="marcvalue" value="[% mapping.marcvalue | html %]" /></td>
<td>
[% IF ( loop.last ) %]
<button type="button" id="new_rule_button" class="btn btn-default btn-xs" title="Add another condition"><i class="fa fa-plus"></i> Add</button>
[% END %]
</td>
<td><button class="btn btn-default btn-xs clear-field" type="button"><i class="fa fa-trash"></i> Delete</button></td>
</tr>
[% END %]
[% ELSE %]
<tr>
<td>
<select name="rule_operator">
[% IF (mapping.rule_operator == 'and') %]
<option value="and" selected="selected">and</option>
[% ELSE %]
<option value="and">and</option>
[% END %]
[% IF (mapping.rule_operator == 'or') %]
<option value="or" selected="selected">or</option>
[% ELSE %]
<option value="or">or</option>
[% END %]
</select>
</td>
<td><input type="text" name="marcfield" size="3" /></td>
<td><input type="text" name="marcsubfield" size="1" /></td>
<td><select name=operator>
<option value="equal">is equal to</option>
<option value="notequal">not equal to</option>
</select></td>
<td><input type="text" name="marcvalue" /></td>
<td>
<button type="button" id="new_rule_button" class="btn btn-default btn-xs" title="Add another condition"><i class="fa fa-plus"></i> Add</button>
</td>
<td><button class="btn btn-default btn-xs clear-field" type="button"><i class="fa fa-trash"></i> Delete</button></td>
</tr>
[% END %]
</tbody>
</table>
<input type="hidden" name="id" value="[% id | html %]" />
<input type="hidden" name="op" value="save" />
<fieldset class="action">
<input type="submit" class="btn btn-primary" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/oai_sets.pl">Cancel</a>
</fieldset>
</form>
</div> <!-- /.page-section -->
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->

View file

@ -37,35 +37,36 @@
<h1>OverDrive library authnames</h1>
<form action="/cgi-bin/koha/admin/overdrive.pl" name="overdrive_form" method="post" class="validated">
<input type="hidden" name="op" value="update" />
<table id="od_info">
<thead>
<tr>
<th>Library</th>
<th>Authname</th>
</tr>
</thead>
<tbody>
[% FOREACH b IN branches %]
<tr>
<td>
[% Branches.GetName( b.branchcode ) | html %]
<input type="hidden" name="branchcode" value="[% b.branchcode | html %]" />
</td>
<td>
<input type="text" name="authname" value="[% b.authname | html %]" />
</td>
</tr>
[% END %]
</tbody>
</table>
<div class="action">
<input type="submit" class="btn btn-primary" value="Submit" />
</div>
</form>
<div class="page-section">
<form action="/cgi-bin/koha/admin/overdrive.pl" name="overdrive_form" method="post" class="validated">
<input type="hidden" name="op" value="update" />
<table id="od_info">
<thead>
<tr>
<th>Library</th>
<th>Authname</th>
</tr>
</thead>
<tbody>
[% FOREACH b IN branches %]
<tr>
<td>
[% Branches.GetName( b.branchcode ) | html %]
<input type="hidden" name="branchcode" value="[% b.branchcode | html %]" />
</td>
<td>
<input type="text" name="authname" value="[% b.authname | html %]" />
</td>
</tr>
[% END %]
</tbody>
</table>
<div class="action">
<input type="submit" class="btn btn-primary" value="Submit" />
</div>
</form>
</div> <!-- /.page-section -->
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->

View file

@ -41,36 +41,36 @@
<h1>SMS cellular providers</h1>
[% IF providers.count %]
<table id="providerst">
<thead>
<tr>
<th>Name</th>
<th>Domain</th>
<th title="Patrons using this provider">Patrons</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
[% FOREACH p IN providers %]
<div id="providers" class="page-section">
<table>
<thead>
<tr>
<td id="name_[% p.id | html %]">[% p.name | html %]</td>
<td id="domain_[% p.id | html %]">[% p.domain | html %]</td>
<td id="patrons_using_[% p.id | html %]">[% p.patrons_using | html %]</td>
<td class="actions">
<a class="btn btn-default btn-xs edit" href="#" id="edit_[% p.id | html %]" data-providerid="[% p.id | html %]">
<i class="fa fa-pencil"></i> Edit
</a>
<a class="btn btn-default btn-xs delete" href="#" data-providerid="[% p.id | html %]" data-patrons_using="[% p.patrons_using | html %]" id="delete_[% p.id | html %]">
<i class="fa fa-trash"></i> Delete
</a>
</td>
<th>Name</th>
<th>Domain</th>
<th title="Patrons using this provider">Patrons</th>
<th>&nbsp;</th>
</tr>
[% END %]
</tbody>
</table>
</thead>
<tbody>
[% FOREACH p IN providers %]
<tr>
<td id="name_[% p.id | html %]">[% p.name | html %]</td>
<td id="domain_[% p.id | html %]">[% p.domain | html %]</td>
<td id="patrons_using_[% p.id | html %]">[% p.patrons_using | html %]</td>
<td class="actions">
<a class="btn btn-default btn-xs edit" href="#" id="edit_[% p.id | html %]" data-providerid="[% p.id | html %]">
<i class="fa fa-pencil"></i> Edit
</a>
<a class="btn btn-default btn-xs delete" href="#" data-providerid="[% p.id | html %]" data-patrons_using="[% p.patrons_using | html %]" id="delete_[% p.id | html %]">
<i class="fa fa-trash"></i> Delete
</a>
</td>
</tr>
[% END %]
</tbody>
</table>
</div> <!-- /.page-section -->
[% ELSE %]
<div class="dialog message">

View file

@ -34,7 +34,7 @@ function add_provider(){
clear_form();
$(".dialog").hide();
$("legend").text( __("Add an SMS cellular provider") );
$("#toolbar,#submit_update,#providerst").hide();
$("#toolbar,#submit_update,#providers").hide();
$("#sms_add_form,#submit_save").show();
$("#name").focus();
}
@ -48,7 +48,7 @@ function edit_provider( id ) {
$("#name").val( $("#name_" + id).text() );
$("#domain").val( $("#domain_" + id).text() );
$("#toolbar,#submit_save,#providerst").hide();
$("#toolbar,#submit_save,#providers").hide();
$("#name").focus();
}
@ -58,7 +58,7 @@ function cancel_edit() {
clear_form();
$(".dialog").show();
$("#sms_add_form,#submit_update").hide();
$("#toolbar,#submit_save,#providerst").show();
$("#toolbar,#submit_save,#providers").show();
}
function delete_provider( id, users ) {