X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=koha-tmpl%2Fintranet-tmpl%2Fprog%2Fen%2Fmodules%2Ftools%2Fcsv-profiles.tt;h=35b7b46132b84145281187fe603b29110440959e;hb=c0d420f42a293e68228bbe7fa95545a08fd2c964;hp=242e7f9a7c151ce3588f15526640883d01715973;hpb=60186fa42fa0742eb3e8484f1fd4b16e04d32ae1;p=koha.git diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt index 242e7f9a7c..35b7b46132 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt @@ -6,7 +6,40 @@ function reloadPage(p) { if (id != 0) { document.location = "/cgi-bin/koha/tools/csv-profiles.pl?id=" + id; } } $(document).ready(function() { - $('#csvexporttabs > ul').tabs(); + $('#csvexporttabs').tabs(); + + $("#profile_type").find("option:first").attr("selected", "selected"); + $("#csvnew").find("li.marc_specific").show(); + $("#csvnew").find("li.sql_specific").hide(); + + $("#profile_type").change(function(){ + if ( $(this).find("option:selected").val() == "marc" ) { + $("#csvnew li.marc_specific").show(); + $("#new_profile_marc_content").attr("required", "required"); + $("#csvnew li.sql_specific").hide(); + $("#new_profile_sql_content").removeAttr("required"); + } else { + $("#csvnew li.marc_specific").hide(); + $("#new_profile_marc_content").removeAttr("required"); + $("#csvnew li.sql_specific").show(); + $("#new_profile_sql_content").attr("required", "required"); + } + }); + $("#modify_profile_type").change(function(){ + if ( $(this).find("option:selected").val() == "marc" ) { + $("#csvedit li.marc_specific").show(); + $("#modify_profile_marc_content").attr("required", "required"); + $("#csvedit li.sql_specific").hide(); + $("#modify_profile_sql_content").removeAttr("required"); + } else { + $("#csvedit li.marc_specific").hide(); + $("#modify_profile_marc_content").removeAttr("required"); + $("#csvedit li.sql_specific").show(); + $("#modify_profile_sql_content").attr("required", "required"); + } + }); + $("#profile_type").change(); + $("#modify_profile_type").change(); }); //]]> @@ -28,33 +61,46 @@ function reloadPage(p) {
The new CSV profile "[% profile_name %]" has been successfully created.
[% END %] - [% IF ( action == 'edit' ) %]The CSV profile has been successfully modified.
[% END %] - [% IF ( action == 'delete' ) %]The CSV profile has been successfully deleted.
[% END %] - [% ELSE %] - [% IF ( action == 'create' ) %]The new CSV profile "[% profile_name %]" has not been created.
[% END %] - [% IF ( action == 'edit' ) %]The CSV profile has not been modified.
[% END %] - [% IF ( action == 'delete' ) %]The CSV profile has not been deleted.
[% END %] + [% IF ( action == 'create' ) %] [% END %] + [% IF ( action == 'edit' ) %] [% END %] + [% IF ( action == 'delete' ) %] [% END %] + [% ELSE %] + [% IF ( action == 'create' ) %]