[Rt-commit] rt branch, 5.0/delete-db-configs-web-ui, repushed

? sunnavy sunnavy at bestpractical.com
Tue Jun 22 18:38:08 EDT 2021


The branch 5.0/delete-db-configs-web-ui was deleted and repushed:
       was 54cf84a271ff7d07810e0dc258edbd51be0d1a00
       now 90104b708378e92810446ed7b02eae8f3e0ed91f

1: 54cf84a271 ! 1: 90104b7083 Support to delete configs in database from web UI
    @@ -17,6 +17,18 @@
      RT::Base->_ImportOverlays();
      
      1;
    +
    +diff --git a/share/html/Admin/Elements/ConfigHelp b/share/html/Admin/Elements/ConfigHelp
    +--- a/share/html/Admin/Elements/ConfigHelp
    ++++ b/share/html/Admin/Elements/ConfigHelp
    +@@
    + <div class="help" id="rt-help-text">
    + <&| /Widgets/TitleBox, title => loc('RT Configuration') &>
    + <p>RT has dozens of configuration options to allow you to modify RT to meet your needs. You can view details about each configuration option online in the <a href="https://docs.bestpractical.com/rt/latest/RT_Config.html" target="_blank">RT documentation</a> or in the file <code>etc/RT_Config.pm</code> on your RT server. You can set global configuration options in the file <code>etc/RT_SiteConfig.pm</code> or right in the browser by clicking the Edit link.</p>
    +-<p>Changes made in the web interface take precedence over customizations in server configuration files. Some core settings can only be changed in configuration files.</p>
    ++<p>Changes made in the web interface take precedence over customizations in server configuration files. Some core settings can only be changed in configuration files. Check "Reset" to switch to the corresponding value in configuration files.</p>
    + </&>
    + </div>
     
     diff --git a/share/html/Admin/Tools/Config/Elements/Option b/share/html/Admin/Tools/Config/Elements/Option
     --- a/share/html/Admin/Tools/Config/Elements/Option
    @@ -43,15 +55,19 @@
      if ($widget eq '/Widgets/Form/Boolean') {
          %$args = (
     @@
    +     Description  => $name,
    +     Hints        => $meta->{WidgetArguments}->{Hints} || '',
    +     LabelCols    => 4,
    +-    ValueCols    => 8,
    ++    ValueCols    => 6,
    +     %$args,
          %{ $m->comp('/Widgets/FinalizeWidgetArguments', WidgetArguments =>
                  $meta->{'WidgetArguments'} ) },
        &>
     +% if ( $name ne 'CustomDateRanges' ) {
    -+  <div class="form-row mb-3 mt-0 file-config">
    -+    <div class="col-8 offset-4">
    -+      <& /Widgets/Form/Boolean:InputOnly, Name => "$name-file", CurrentValue => !$db_config->Id, DefaultLabel => loc('Use default in config files') &>
    -+      <input type="hidden" name="<% $name %>-file-Current" value="<% $current_file_value %>" />
    -+    </div>
    ++  <div class="col-2 file-config mt-1">
    ++    <& /Widgets/Form/Boolean:InputOnly, Name => "$name-file", CurrentValue => !$db_config->Id, DefaultLabel => loc('Reset') &>
    ++    <input type="hidden" name="<% $name %>-file-Current" value="<% $current_file_value %>" />
     +  </div>
     +% }
     +
    @@ -104,6 +120,12 @@
              });
          }
     +
    ++    // Move reset col to the corresponding edit row
    ++    jQuery('form[name=EditConfig] div.file-config').each(function () {
    ++        var prev_row = jQuery(this).prev('div.form-row');
    ++        jQuery(this).detach().appendTo(prev_row);
    ++    });
    ++
     +    // Automatically sync to set input values to ones in config files.
     +    jQuery('form[name=EditConfig] input[name$="-file"]').change(function (e) {
     +        var file_input = jQuery(this);
    @@ -117,7 +139,7 @@
     +        var db_input = form.find(':input[name=' + db_name + ']');
     +        var db_input_type = db_input.attr('type') || db_input.prop('tagName').toLowerCase();
     +        if ( db_input_type == 'radio' ) {
    -+            db_input.filter('[value=' + file_value + ']').prop('checked', true);
    ++            db_input.filter('[value=' + (file_value || 0) + ']').prop('checked', true);
     +        }
     +        else if ( db_input_type == 'select' ) {
     +            db_input.selectpicker('val', file_value.length ? file_value : '__empty_value__');



More information about the rt-commit mailing list