Skip to content

Commit

Permalink
Merge pull request Aspen-Discovery#1835 from catsoup11789/24.06.00
Browse files Browse the repository at this point in the history
submit ticket changes
  • Loading branch information
mdnoble73 authored Jun 6, 2024
2 parents aea6b6c + 26bfbd2 commit 6f1cc43
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 18 deletions.
8 changes: 8 additions & 0 deletions code/aspen_app/app-configs/updateConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,14 @@ const app_config = {
project: app['sentryProject'],
},
],
[
'expo-build-properties',
{
ios: {
deploymentTarget: '16.0',
},
},
],
],
};

Expand Down
2 changes: 2 additions & 0 deletions code/aspen_app/src/navigations/stack/AccountStackNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { MyLinkedAccounts } from '../../screens/MyAccount/LinkedAccounts/LinkedA
import { Settings_NotificationOptions } from '../../screens/MyAccount/Settings/NotificationOptions';
import { PreferencesScreen } from '../../screens/MyAccount/Settings/Preferences';
import { MyHolds } from '../../screens/MyAccount/TitlesOnHold/MyHolds';
import { BackIcon } from '../../themes/theme';
import { getTermFromDictionary } from '../../translations/TranslationService';
import { EditionsModal } from './BrowseStackNavigator';

Expand All @@ -33,6 +34,7 @@ const AccountStackNavigator = () => {
screenOptions={{
headerShown: true,
headerBackTitleVisible: false,
headerBackImage: () => <BackIcon />,
}}>
<Stack.Group>
<Stack.Screen name="MyPreferences" component={PreferencesScreen} options={{ title: getTermFromDictionary(language, 'preferences') }} />
Expand Down
7 changes: 5 additions & 2 deletions code/aspen_app/src/navigations/stack/BrowseStackNavigator.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { createStackNavigator } from '@react-navigation/stack';
import { ChevronLeftIcon, CloseIcon, Pressable } from 'native-base';
import { ChevronLeftIcon, CloseIcon, Pressable, Icon } from 'native-base';
import React from 'react';
import Scanner from '../../components/Scanner';
import { LanguageContext } from '../../context/initialContext';
import { LanguageContext, ThemeContext } from '../../context/initialContext';
import { navigate } from '../../helpers/RootNavigator';

import { DiscoverHomeScreen } from '../../screens/BrowseCategory/Home';
import { EventScreen } from '../../screens/Event/Event';
Expand All @@ -19,6 +20,7 @@ import { SearchResultsForBrowseCategory } from '../../screens/Search/SearchByCat
import { SearchResultsForList } from '../../screens/Search/SearchByList';
import { SearchResultsForSavedSearch } from '../../screens/Search/SearchBySavedSearch';
import { SearchResults } from '../../screens/Search/SearchResults';
import { BackIcon } from '../../themes/theme';
import { getTermFromDictionary } from '../../translations/TranslationService';

const BrowseStackNavigator = () => {
Expand All @@ -31,6 +33,7 @@ const BrowseStackNavigator = () => {
screenOptions={({ navigation, route }) => ({
headerShown: true,
headerBackTitleVisible: false,
headerBackImage: () => <BackIcon />,
})}>
<Stack.Screen
name="HomeScreen"
Expand Down
2 changes: 2 additions & 0 deletions code/aspen_app/src/navigations/stack/MoreStackNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { ScreenBrightnessPermissionDescription } from '../../screens/MyAccount/S
import { PermissionsDashboard } from '../../screens/MyAccount/Settings/Permissions';
import { PreferencesScreen } from '../../screens/MyAccount/Settings/Preferences';
import { SupportScreen } from '../../screens/MyAccount/Settings/Support';
import { BackIcon } from '../../themes/theme';
import { getTermFromDictionary } from '../../translations/TranslationService';

const MoreStackNavigator = () => {
Expand All @@ -28,6 +29,7 @@ const MoreStackNavigator = () => {
screenOptions={{
headerShown: true,
headerBackTitleVisible: false,
headerBackImage: () => <BackIcon />,
}}>
<Stack.Screen name="MoreMenu" component={MoreMenu} options={{ title: getTermFromDictionary(language, 'nav_more') }} />
<Stack.Screen
Expand Down
2 changes: 2 additions & 0 deletions code/aspen_app/src/navigations/stack/SearchStackNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { SearchIndexScreen } from '../../screens/Search/Facets/SearchIndex';
import { SearchSourceScreen } from '../../screens/Search/Facets/SearchSource';
import { FiltersScreen } from '../../screens/Search/Filters';
import { SearchHome } from '../../screens/Search/Search';
import { BackIcon } from '../../themes/theme';
import { getTermFromDictionary } from '../../translations/TranslationService';
import { EditionsModal } from './BrowseStackNavigator';

Expand All @@ -28,6 +29,7 @@ const SearchStackNavigator = ({ options, route, back, navigation }) => {
screenOptions={({ navigation, route }) => ({
headerShown: true,
headerBackTitleVisible: false,
headerBackImage: () => <BackIcon />,
})}>
<Stack.Group>
<Stack.Screen
Expand Down
7 changes: 6 additions & 1 deletion code/aspen_app/src/themes/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ import { create } from 'apisauce';
import chroma from 'chroma-js';
import { LinearGradient } from 'expo-linear-gradient';
import _ from 'lodash';
import { Box, extendTheme, HStack, Icon, IconButton, Text, useColorMode, useColorModeValue } from 'native-base';
import { ChevronLeftIcon, Box, extendTheme, HStack, Icon, IconButton, Text, useColorMode, useColorModeValue } from 'native-base';
import React, { useState } from 'react';
import { ThemeContext } from '../context/initialContext';

import { createAuthTokens, getHeaders } from '../util/apiAuth';
import { GLOBALS } from '../util/globals';
import { getAppSettings, LIBRARY } from '../util/loadLibrary';

export const BackIcon = (props) => {
const { theme } = React.useContext(ThemeContext);
return <ChevronLeftIcon size="md" ml={1} {...props} color={theme['colors']['primary']['baseContrast']} />;
};

export async function getThemeData() {
let theme = [];
const discovery = create({
Expand Down
29 changes: 17 additions & 12 deletions code/web/interface/themes/responsive/Admin/submitTicket.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,50 @@
<div class="form-group">
<label class="control-label" for="subject">{translate text="Subject" isAdminFacing=true} <span class="label label-danger" style="margin-right: .5em;">{translate text="Required" isAdminFacing=true}</span></label>
<span class="help-block" style="margin-bottom:.5em; margin-top: 0">{translate text="Please use descriptive keywords, i.e. Creating lists in LiDA" isAdminFacing=true}</span>
<input type="text" class="form-control required" name="subject" id="subject">
<input type="text" class="form-control required" name="subject" id="subject" {if !empty($subject)}value="{$subject}"{/if}>
</div>
<div class="form-group">
<label class="control-label" for="reason">{translate text="Reason" isAdminFacing=true}</label>
<select class="form-control" name="reason" id="reason">
<option value="Something is not appearing or working as expected">{translate text="Something is not appearing or working as expected" isAdminFacing=true inAttribute=true}</option>
<option value="Question about setting or workflow">{translate text="Question about setting or workflow" isAdminFacing=true inAttribute=true}</option>
<option value="Request for a new feature or integration">{translate text="Request for a new feature or integration" isAdminFacing=true inAttribute=true}</option>
<option value="Other">{translate text="Other" isAdminFacing=true inAttribute=true}</option>
<option value="Something is not appearing or working as expected" {if !empty($reason) && $reason == 'Something is not appearing or working as expected'}selected{/if}>{translate text="Something is not appearing or working as expected" isAdminFacing=true inAttribute=true}</option>
<option value="Question about setting or workflow" {if !empty($reason) && $reason == 'Question about setting or workflow'}selected{/if}>{translate text="Question about setting or workflow" isAdminFacing=true inAttribute=true}</option>
<option value="Request for a new feature or integration" {if !empty($reason) && $reason == 'Request for a new feature or integration'}selected{/if}>{translate text="Request for a new feature or integration" isAdminFacing=true inAttribute=true}</option>
<option value="Other" {if !empty($reason) && $reason == 'Other'}selected{/if}>{translate text="Other" isAdminFacing=true inAttribute=true}</option>
</select>
</div>
<div class="form-group">
<label class="control-label" for="product">{translate text="Product" isAdminFacing=true}</label>
<select class="form-control" name="product" id="product">
<option value="Aspen Discovery Only">{translate text="Aspen Discovery Only" isAdminFacing=true inAttribute=true}</option>
<option value="Aspen LiDA Only">{translate text="Aspen LiDA Only" isAdminFacing=true inAttribute=true}</option>
<option value="Both Aspen Discovery and Aspen LiDA">{translate text="Both Aspen Discovery and Aspen LiDA" isAdminFacing=true inAttribute=true}</option>
<option value="Aspen Discovery Only" {if !empty($product) && $product == 'Aspen Discovery Only'}selected{/if}>{translate text="Aspen Discovery Only" isAdminFacing=true inAttribute=true}</option>
<option value="Aspen LiDA Only" {if !empty($product) && $product == 'Aspen LiDA Only'}selected{/if}>{translate text="Aspen LiDA Only" isAdminFacing=true inAttribute=true}</option>
<option value="Both Aspen Discovery and Aspen LiDA" {if !empty($product) && $product == 'Both Aspen Discovery and Aspen LiDA'}selected{/if}>{translate text="Both Aspen Discovery and Aspen LiDA" isAdminFacing=true inAttribute=true}</option>
</select>
</div>
<div class="form-group">
<label class="control-label" for="description">{translate text="Description" isAdminFacing=true} <span class="label label-danger" style="margin-right: .5em;">{translate text="Required" isAdminFacing=true}</span></label>
<span class="help-block" style="margin-bottom:.5em; margin-top: 0">{translate text="Include detailed steps to replicate the problem, account number for impacted user(s), device information, etc. Please do not include sensitive information like login credentials." isAdminFacing=true}</span>
<textarea class="form-control required" name="description" id="description"></textarea>
<textarea class="form-control required" name="description" id="description">{if !empty($description)}{$description}{/if}</textarea>
</div>
{if $supportingCompany == 'ByWater Solutions'}
<div class="form-group">
<label class="control-label" for="sharepass">{translate text="Sharepass Url" isAdminFacing=true}</label>
<span class="help-block" style="margin-bottom:.5em; margin-top: 0">{translate text="Use Sharepass to send sensitive information to us such as login credentials we can use to replicate the behavior reported." isAdminFacing=true} <a href="https://app.tango.us/app/workflow/Share-sensitive-information-with-ByWater-SharePass-ea39fbda64f24949a1a8a80a1be8223b" target="_blank"><u>{translate text="Learn how to use Sharepass." isAdminFacing=true}</u></a></span>
<input type="url" class="form-control" name="sharepass" id="sharepass">
<input type="url" class="form-control" name="sharepass" placeholder="https://" id="sharepass" {if !empty($sharepass)}value="{$sharepass}"{/if}>
</div>
{/if}
<div class="form-group">
<label class="control-label" for="examples">{translate text="Url(s) to Records or Search Results" isAdminFacing=true}</label>
<textarea class="form-control" name="examples" id="examples"></textarea>
<label class="control-label" id="examples">{translate text="Url(s) to example records" isAdminFacing=true}</label>
<fieldset>
<input style="margin-bottom: .5em" aria-labelledby="examples" type="url" class="form-control" placeholder="http://" name="example1" id="example1" {if !empty($example1)}value="{$example1}"{/if}>
<input style="margin-bottom: .5em" aria-labelledby="examples" type="url" class="form-control" placeholder="http://" name="example2" id="example2" {if !empty($example2)}value="{$example2}"{/if}>
<input aria-labelledby="examples" type="url" class="form-control" placeholder="http://" name="example3" id="example3" {if !empty($example3)}value="{$example3}"{/if}>
</fieldset>
</div>
<div class="form-group">
<label class="control-label" for="attachments">{translate text="Attachment(s)" isAdminFacing=true}</label>
<span class="help-block" style="margin-bottom:.5em; margin-top: 0">{translate text="Attach any screenshots or recordings that display the reported behavior or to help us replicate it. To select multiple files, hold down the CTRL or SHIFT key while selecting." isAdminFacing=true}</span>
<input type="file" name="attachments[]" id="attachments" multiple>
<span class="help-block small">{translate text="10MB size limit per attachment." isAdminFacing=true}</span>
</div>
<div class="form-group">
<button type="submit" name="submitTicket" class="btn btn-primary">{translate text="Submit Ticket" isAdminFacing=true}</button>
Expand Down
1 change: 1 addition & 0 deletions code/web/release_notes/24.06.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Fixed a bug where some devices were not displaying a back button when necessary. (Ticket 132122) (*KK*)
- On Grouped Work screen for side loads, the Access Online button will again properly open the content. (Ticket 132246) (*KK*)
- Fixed a bug preventing a user from switching languages and automatically re-rendering with updated translations. (Ticket 132494) (*KK*)
- Fixed a bug where certain devices would not display a visible back button in the header. (Tickets 133133 132122, 132707) (*KK*)
- On the Checkouts screen, the Access Online action for Libby items will now use the library's preferred reader name. (*KK*)
- On the Checkouts screen, the Access Online action for Libby items will now properly again open the content in the in-app browser. (*KK*)
- Added an alert to warn Android 11 or older users that they will no longer receive app updates. (*KK*)
Expand Down
48 changes: 45 additions & 3 deletions code/web/services/Admin/SubmitTicket.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ function launch() {
$reason = $_REQUEST['reason'];
$product = $_REQUEST['product'];
$sharepass = $_REQUEST['sharepass'] ?? null;
$examples = $_REQUEST['examples'];
$example1 = $_REQUEST['example1'];
$example2 = $_REQUEST['example2'];
$example3 = $_REQUEST['example3'];
$attachments = $_FILES['attachments'] ?? [];

global $serverName;
Expand All @@ -28,14 +30,54 @@ function launch() {
$description .= 'Reason: ' . $reason . "\n";
$description .= 'Product: ' . $product . "\n";

if($examples) {
$description .= 'Examples: ' . $examples . "\n";
if($example1) {
$description .= 'Example 1: ' . $example1 . "\n";
}

if($example2) {
$description .= 'Example 2: ' . $example2 . "\n";
}

if($example3) {
$description .= 'Example 3: ' . $example3 . "\n";
}

if($sharepass) {
$description .= 'Sharepass: ' . $sharepass . "\n";
}

$fileTooBig = false;
if($_FILES) {
$i = 0;
foreach ($_FILES as $file) {
$fileSize = $file['size'][$i];
$maxFileSize = 10 * 1048576; // 10MB for RT limitations
if($fileSize > $maxFileSize) {
$fileTooBig = true;
}
$i++;

}
}

// don't lose already entered in data if something goes wrong on the form
$interface->assign('name', $name);
$interface->assign('email', $email);
$interface->assign('subject', $subject);
$interface->assign('description', $_REQUEST['description']);
$interface->assign('reason', $reason);
$interface->assign('product', $product);
$interface->assign('sharepass', $sharepass);
$interface->assign('example1', $example1);
$interface->assign('example2', $example2);
$interface->assign('example3', $example3);

if($fileTooBig) {
$interface->assign('error', 'One or more of your files was larger than the 10MB file size limit.');
$this->display('submitTicket.tpl', 'Submit Ticket');
return;
}


$message = '';
try {
Expand Down

0 comments on commit 6f1cc43

Please sign in to comment.