From 8175110e8624c3cca07f28bd3011980e329ff3d7 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Date: Thu, 31 Jul 2014 15:36:55 -0300 Subject: [PATCH] Bug 12686: Make more selected option XHTML compliant This patch fixes several occurrences of selected options that do not follow XHTML style rule for markup. To test: 1. Apply the patch 2. There are no functional changes at all, only a more strict markup Changed all cases I can found. --- .../en/modules/admin/auth_subfields_structure.tt | 8 ++--- .../prog/en/modules/admin/auth_tag_structure.tt | 2 +- .../prog/en/modules/admin/koha2marclinks.tt | 4 +-- .../en/modules/admin/marc_subfields_structure.tt | 8 ++--- .../prog/en/modules/admin/oai_set_mappings.tt | 4 +-- .../prog/en/modules/admin/smart-rules.tt | 2 +- .../prog/en/modules/tools/koha-news.tt | 32 ++++++++++---------- .../modules/tools/marc_modification_templates.tt | 2 +- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt index 6de697d..9c0f95b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt @@ -146,7 +146,7 @@ function displayMoreConstraint(numlayer){ <select name="kohafield" id="[% loo.kohafield.id %]" size="1"> [% FOREACH value IN loo.kohafield.values %] [% IF ( value == loo.kohafield.default ) %] - <option value="[% value %]" selected>[% value %]</option> + <option value="[% value %]" selected="selected">[% value %]</option> [% ELSE %] <option value="[% value %]">[% value %]</option> [% END %] @@ -158,7 +158,7 @@ function displayMoreConstraint(numlayer){ <select name="authorised_value" id="[% loo.authorised_value.id %]" size="1"> [% FOREACH value IN loo.authorised_value.values %] [% IF ( value == loo.authorised_value.default ) %] - <option value="[% value %]" selected>[% value %]</option> + <option value="[% value %]" selected="selected">[% value %]</option> [% ELSE %] <option value="[% value %]">[% value %]</option> [% END %] @@ -170,7 +170,7 @@ function displayMoreConstraint(numlayer){ <select name="frameworkcode" id="[% loo.frameworkcode.id %]" size="1"> [% FOREACH value IN loo.frameworkcode.values %] [% IF ( value == loo.frameworkcode.default ) %] - <option value="[% value %]" selected>[% value %]</option> + <option value="[% value %]" selected="selected">[% value %]</option> [% ELSE %] <option value="[% value %]">[% value %]</option> [% END %] @@ -182,7 +182,7 @@ function displayMoreConstraint(numlayer){ <select name="value_builder" id="[% loo.value_builder.id %]" size="1"> [% FOREACH value IN loo.value_builder.values %] [% IF ( value == loo.value_builder.default ) %] - <option value="[% value %]" selected>[% value %]</option> + <option value="[% value %]" selected="selected">[% value %]</option> [% ELSE %] <option value="[% value %]">[% value %]</option> [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt index 43892ec..87c55b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt @@ -113,7 +113,7 @@ <select name="authorised_value" id="authorised_value" size="1"> [% FOREACH value IN authorised_value.values %] [% IF ( value == authorised_value.default ) %] - <option value="[% value %]" selected>[% value %]</option> + <option value="[% value %]" selected="selected">[% value %]</option> [% ELSE %] <option value="[% value %]">[% value %]</option> [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt index aad10bd..945adac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt @@ -41,7 +41,7 @@ <select name="marc" id="marc" size="1" width="570" style="width: 570px;"> [% FOREACH value IN $marclist.values %] [% IF ( value == $marclist.default ) %] - <option value="[% value %]" selected>[% value %]</option> + <option value="[% value %]" selected="selected">[% value %]</option> [% ELSE %] <option value="[% value %]">[% value %]</option> [% END %] @@ -74,7 +74,7 @@ <select name="tablename" id="tablename" size="1"> [% FOREACH value IN tablename.values %] [% IF ( value == tablename.default ) %] - <option value=[% value %] selected>[% value %]</option> + <option value=[% value %] selected="selected">[% value %]</option> [% ELSE %] <option value=[% value %]>[% value %]</option> [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt index 1568393..c12ddf1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt @@ -282,7 +282,7 @@ function populateHiddenCheckboxes(tab) { <select name="kohafield" id="[% loo.kohafield.id %]" size="1"> [% FOREACH value IN loo.kohafield.values %] [% IF ( value == loo.kohafield.default ) %] - <option value="[% value %]" selected>[% value %]</option> + <option value="[% value %]" selected="selected">[% value %]</option> [% ELSE %] <option value="[% value %]">[% value %]</option> [% END %] @@ -301,7 +301,7 @@ function populateHiddenCheckboxes(tab) { <select name="authorised_value" id="[% loo.authorised_value.id %]" size="1"> [% FOREACH value IN loo.authorised_value.values %] [% IF ( value == loo.authorised_value.default ) %] - <option value="[% value %]" selected>[% value %]</option> + <option value="[% value %]" selected="selected">[% value %]</option> [% ELSE %] <option value="[% value %]">[% value %]</option> [% END %] @@ -313,7 +313,7 @@ function populateHiddenCheckboxes(tab) { <select name="authtypecode" id="[% loo.authtypes.id %]" size="1"> [% FOREACH value IN loo.authtypes.values %] [% IF ( value == loo.authtypes.default ) %] - <option value="[% value %]" selected>[% value %]</option> + <option value="[% value %]" selected="selected">[% value %]</option> [% ELSE %] <option value="[% value %]">[% value %]</option> [% END %] @@ -325,7 +325,7 @@ function populateHiddenCheckboxes(tab) { <select name="value_builder" id="[% loo.value_builder.id %]" size="1"> [% FOREACH value IN loo.value_builder.values %] [% IF ( value == loo.value_builder.default ) %] - <option value="[% value %]" selected>[% value %]</option> + <option value="[% value %]" selected="selected">[% value %]</option> [% ELSE %] <option value="[% value %]">[% value %]</option> [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt index 60469b8..277c145 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt @@ -80,11 +80,11 @@ function hideDialogBox() { <td style="text-align:center"><input type="text" name="marcsubfield" size="1" value="[% mapping.marcsubfield %]" /></td> <td><select name=operator> [% IF mapping.operator == 'equal' %] - <option selected value="equal">is equal to</option> + <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 selected value="notequal">not equal to</option> + <option value="notequal" selected="selected">not equal to</option> [% END %] </select></td> <td><input type="text" name="marcvalue" value="[% mapping.marcvalue %]" /></td> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index 1b8b21a..bc0a3d7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -242,7 +242,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde <td><input type="text" name="issuelength" id="issuelength" size="3" /> </td> <td> <select name="lengthunit" id="lengthunit"> - <option value="days" selected>Days</option> + <option value="days" selected="selected">Days</option> <option value="hours">Hours</option> </select> </td> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt index f7de1fe..b4d2440 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt @@ -78,25 +78,25 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> <label for="lang">Display location</label> <select id="lang" name="lang"> [% IF ( default_lang == "" ) %] - <option value="" selected>All</option> + <option value="" selected="selected">All</option> [% ELSE %] - <option value="" >All</option> + <option value="" >All</option> [% END %] [% IF ( default_lang == "koha" ) %] - <option value="koha" selected>Librarian interface</option> + <option value="koha" selected="selected">Librarian interface</option> [% ELSE %] - <option value="koha" >Librarian interface</option> + <option value="koha" >Librarian interface</option> [% END %] [% IF ( default_lang == "slip" ) %] - <option value="slip" selected>Slip</option> + <option value="slip" selected="selected">Slip</option> [% ELSE %] - <option value="slip" >Slip</option> + <option value="slip" >Slip</option> [% END %] [% FOREACH lang_lis IN lang_list %] [% IF ( lang_lis.language == default_lang ) %] - <option value="[% lang_lis.language %]" selected>OPAC ([% lang_lis.language %])</option> + <option value="[% lang_lis.language %]" selected="selected">OPAC ([% lang_lis.language %])</option> [% ELSE %] - <option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option> + <option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option> [% END %] [% END %] </select> @@ -105,13 +105,13 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> <label for="branch">Library: </label> <select id="branch" name="branch"> [% IF ( new_detail.branchcode == '' ) %] - <option value="" selected>All Libraries</option> + <option value="" selected="selected">All Libraries</option> [% ELSE %] <option value="" >All Libraries</option> [% END %] [% FOREACH branch_item IN branch_list %] [% IF ( branch_item.value.branchcode == new_detail.branchcode ) %] - <option value="[% branch_item.value.branchcode %]" selected>[% branch_item.value.branchname %]</option> + <option value="[% branch_item.value.branchcode %]" selected="selected">[% branch_item.value.branchname %]</option> [% ELSE %] <option value="[% branch_item.value.branchcode %]">[% branch_item.value.branchname %]</option> [% END %] @@ -153,23 +153,23 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> <label for="lang">Display location:</label> <select name="lang" id="lang"> [% IF ( lang == "" ) %] - <option value="" selected>All</option> + <option value="" selected="selected">All</option> [% ELSE %] <option value="" >All</option> [% END %] [% IF ( lang == "koha" ) %] - <option value="koha" selected>Librarian interface</option> + <option value="koha" selected="selected">Librarian interface</option> [% ELSE %] <option value="koha" >Librarian interface</option> [% END %] [% IF ( lang == "slip" ) %] - <option value="slip" selected>Slip</option> + <option value="slip" selected="selected">Slip</option> [% ELSE %] <option value="slip" >Slip</option> [% END %] [% FOREACH lang_lis IN lang_list %] [% IF ( lang_lis.language == lang ) %] - <option value="[% lang_lis.language %]" selected>OPAC ([% lang_lis.language %])</option> + <option value="[% lang_lis.language %]" selected="selected">OPAC ([% lang_lis.language %])</option> [% ELSE %] <option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option> [% END %] @@ -178,14 +178,14 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> <label for="branch">Library: </label> <select id="branch" name="branch"> [% IF ( branchcode == "" ) %] - <option value="" selected>All Libraries</option> + <option value="" selected="selected">All Libraries</option> [% ELSE %] <option value="" >All Libraries</option> [% END %] [% FOREACH branch_item IN branch_list %] [% IF ( branch_item.value.branchcode == branchcode ) %] <option value="[% branch_item.value.branchcode %]" - selected>[% branch_item.value.branchname %] + selected="selected">[% branch_item.value.branchname %] </option> [% ELSE %] <option value="[% branch_item.value.branchcode %]" diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt index a9b9d3d..6253135 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt @@ -455,7 +455,7 @@ function setSelectByValue( selectId, value ) { <p/> <select name="conditional" id="conditional" onchange="onConditionalChange(this);"> - <option value="" selected /> + <option value="" selected="selected" /> <option value="if">if</option> <option value="unless">unless</option> </select> -- 1.7.9.5