{ "id": "153340", "key": "TIMOB-20024", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-05-11T17:05:15.000+0000", "created": "2015-11-20T10:27:36.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Crown" ], "versions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-05-12T04:33:39.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "I'd like to pre-set the values for the new [Ti.UI.AlertDialog|https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.AlertDialog] input fields.\r\n\r\n* {{value}} to set/get the value for {{PLAIN_TEXT_INPUT}} and {{SECURE_TEXT_INPUT}}\r\n* {{loginValue}} to set/get the login value for {{LOGIN_AND_PASSWORD_INPUT}}\r\n* {{passwordValue}} to set/get the password value for {{LOGIN_AND_PASSWORD_INPUT}}\r\n\r\nThe use case it to allow the user to change an existing setting in an app or press _Cancel_ if he sees it's OK already.", "attachment": [], "flagged": false, "summary": "iOS: Support setting values for Ti.UI.AlertDialog input fields", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": null, "comment": { "comments": [ { "id": "419480", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9046\r\nPR (6_1_X): https://github.com/appcelerator/titanium_mobile/pull/9047\r\n\r\nTest-Case:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar btn1 = Ti.UI.createButton({\r\n title: 'Show Single Input Dialog',\r\n top: 80\r\n});\r\n\r\nbtn1.addEventListener('click', function() {\r\n var dialog = Ti.UI.createAlertDialog({\r\n title: 'Test Single Input',\r\n message: 'Looks Good?',\r\n buttonNames: ['OK'], \r\n style: Ti.UI.iOS.AlertDialogStyle.PLAIN_TEXT_INPUT,\r\n \r\n // NEW\r\n value: 'Enter Value ...',\r\n });\r\n \r\n dialog.show();\r\n});\r\n\r\nvar btn2 = Ti.UI.createButton({\r\n title: 'Show Single Input Dialog',\r\n top: 160\r\n});\r\n\r\nbtn2.addEventListener('click', function() {\r\n var dialog = Ti.UI.createAlertDialog({\r\n title: 'Test Login / Password Input',\r\n message: 'Looks Good?',\r\n buttonNames: ['OK'], \r\n style: Ti.UI.iOS.AlertDialogStyle.LOGIN_AND_PASSWORD_INPUT,\r\n\r\n // NEW\r\n loginValue: 'Hans',\r\n passwordValue: 's3cr3t_p4ssw0r4', // Will be ****** anyway\r\n });\r\n \r\n dialog.show();\r\n});\r\n\r\nwin.add(btn1);\r\nwin.add(btn2);\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-10T16:48:19.000+0000", "updated": "2017-05-10T16:48:19.000+0000" }, { "id": "419564", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Passed FR with this environment:\r\nNode Version: 6.10.1\r\nNPM Version: 3.10.10\r\nMac OS: 10.12.4\r\nAppc CLI: 6.2.0\r\nAppc CLI NPM: 4.2.9\r\nTitanium SDK version: 6.2.0 from this PR\r\nAppcelerator Studio, build: 4.8.1.201612050850\r\nXcode 8.3.2\r\nFixes were seen in the latest SDK 6.1.0 and 6.2.0 builds. Closing ticket.\r\nI built an iOS app to device using the testcase from Han's comments above. I pressed on both buttons, and the forms were prefilled. I found that I had a choice to either edit the data in the fields or I can hit the \"OK\" button if I accepted the pre-filled data.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-11T17:04:31.000+0000", "updated": "2017-05-12T04:33:31.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }