{ "id": "136616", "key": "TIMOB-17693", "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": "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" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-10-16T20:57:40.000+0000", "created": "2014-09-15T21:31:26.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "TSP", "supportTeam" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2015-10-19T22:25:41.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": "h3. Request\r\n\r\nCustomer is asking to add keyboardType support to createAlertDialog in iOS.\r\n\r\nWhen an AlertDialog is created in iOS with PLAIN_TEXT_INPUT is showing UIKeyboardTypeDefault, in certain use cases is required to use other keyboards like the numberPad (Zip Code search, PIN code).\r\n\r\nh3. Additional info\r\n\r\nThis behaviour is possible in native iOS projects like this:\r\n\r\n{code}\r\nUIAlertView * alert = [[UIAlertView alloc] initWithTitle:@\"Hello!\" message:@\"Please enter your name:\" delegate:self cancelButtonTitle:@\"Continue\" otherButtonTitles:nil];\r\nalert.alertViewStyle = UIAlertViewStylePlainTextInput;\r\nUITextField * alertTextField = [alert textFieldAtIndex:0];\r\nalertTextField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;\r\nalertTextField.placeholder = @\"Enter your name\";\r\n[alert show];\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Support missing properties for UITextField inside Ti.UI.AlertDialog", "creator": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 481, "state": "closed", "name": "2015 Sprint 18 SDK", "startDate": "2015-08-29T00:30:25.440Z", "endDate": "2015-09-12T00:30:00.000Z", "completeDate": "2015-09-14T05:24:05.135Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "362683", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "* Introducing the {{placeholder}} property of {{UIAlertViewStylePlainTextInput}}\r\n* Introducing the {{loginPlaceholder}} and {{passwordPlaceholder}} properties of {{UIAlertViewStyleLoginAndPasswordInput}} with default value to \"Login\" and \"Password\" (as it was static before). \r\n* Introducing the {{keyboardType}} property using the existing {{Titanium.UI.KEYBOARD_*}} constants to be used in the alert dialog\r\n* Introducing the {{returnKeyType}} property using the existing {{Titanium.UI.RETURNKEY_*}} constants to be used in the alert dialog\r\n\r\nEverything covered?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-09-09T18:03:52.000+0000", "updated": "2015-09-09T18:03:52.000+0000" }, { "id": "362687", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "*PR pending*: https://github.com/appcelerator/titanium_mobile/pull/7155\r\n\r\nDemo code:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : '#fff',\r\n\tlayout : 'vertical'\r\n});\r\nvar btn1 = Ti.UI.createButton({\r\n\ttitle : \"Show input dialog!\",\r\n\ttop : 50\r\n});\r\nvar btn2 = Ti.UI.createButton({\r\n\ttitle : \"Show login dialog!\",\r\n\ttop : 50\r\n});\r\n\r\nwin.add(btn1);\r\nwin.add(btn2);\r\nwin.open();\r\n\r\nbtn1.addEventListener(\"click\", showInputDialog);\r\nbtn2.addEventListener(\"click\", showLoginDialog);\r\n\r\nfunction showInputDialog() {\r\n\tvar dialog = Ti.UI.createAlertDialog({\r\n\t\tstyle : Titanium.UI.iPhone.AlertDialogStyle.PLAIN_TEXT_INPUT,\r\n\t\ttitle : \"TIMOB-17693\",\r\n\t\tmessage : \"Hey there, what is your name?\",\r\n\t\tplaceholder : \"Enter your name ...\",\r\n\t\tkeyboardType : Ti.UI.KEYBOARD_EMAIL,\r\n\t\treturnKeyType : Ti.UI.RETURNKEY_DONE\r\n\t});\r\n\r\n\tdialog.show();\r\n}\r\n\r\nfunction showLoginDialog() {\r\n\tvar dialog = Ti.UI.createAlertDialog({\r\n\t\tstyle : Titanium.UI.iPhone.AlertDialogStyle.LOGIN_AND_PASSWORD_INPUT,\r\n\t\ttitle : \"TIMOB-17693\",\r\n\t\tmessage : \"Hey there, please authenticate!\",\r\n\t\tloginPlaceholder : \"Your E-Mail ...\",\r\n\t\tpasswordPlaceholder : \"Your Password ...\"\r\n\t});\r\n\r\n\tdialog.show();\r\n}\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-09-09T20:34:37.000+0000", "updated": "2015-09-09T20:35:22.000+0000" }, { "id": "363742", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "CR and FT passed. PR merged.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-14T04:27:58.000+0000", "updated": "2015-09-14T04:27:58.000+0000" }, { "id": "366790", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~hansknoechel] Everything looks good except that I am unable to set the keyboard type or returnkey type when the style of the alert is LOGIN_AND_PASSWORD_INPUT. It seems to default to the standard keyboard and return key. Is this intentional? Since many logins use an email address for the username, it would be nice to be able to set the keyboard to the email style. Tested using:\r\n\r\nMacOS 10.11 (15A284)\r\nStudio 4.4.0.201510092420\r\nTi SDK 5.1.0.v20151013151603\r\nAppc NPM 4.2.1-1\r\nAppc CLI 5.1.0-38\r\nTi CLI 5.0.5\r\nAlloy 1.7.16\r\nArrow 1.3.13\r\nXcode 7.0.1 (7A1001)\r\nNode v4.1.0\r\nJava 1.7.0_80\r\nproduction", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-10-14T16:29:44.000+0000", "updated": "2015-10-14T16:29:44.000+0000" }, { "id": "367022", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/7308\r\nPR (5_1_X): https://github.com/appcelerator/titanium_mobile/pull/7309 \r\n\r\nUpdated the example to support dynamic configuration of keyboard and returnkey using the {{Ti.UI.iPhone.AlertDialogStyle.LOGIN_AND_PASSWORD_INPUT}} style:\r\n{code}\r\n\tvar dialog = Ti.UI.createAlertDialog({\r\n\t\tstyle : Titanium.UI.iPhone.AlertDialogStyle.LOGIN_AND_PASSWORD_INPUT,\r\n\t\ttitle : \"TIMOB-17693\",\r\n\t\tmessage : \"Hey there, please authenticate!\",\r\n\t\tloginPlaceholder : \"Your E-Mail ...\",\r\n\t\tloginKeyboardType: Ti.UI.KEYBOARD_EMAIL,\r\n\t\tloginReturnKeyType: Ti.UI.RETURNKEY_NEXT,\r\n\t\tpasswordPlaceholder : \"Your Password ...\",\r\n\t\tpasswordKeyboardType: Ti.UI.KEYBOARD_ASCII,\r\n\t\tpasswordReturnKeyType: Ti.UI.RETURNKEY_DONE,\r\n\t});\r\n dialog.show();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-10-16T19:16:52.000+0000", "updated": "2015-10-16T19:17:28.000+0000" }, { "id": "367036", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR's Approved and Merged. Thanks! ", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-16T20:58:02.000+0000", "updated": "2015-10-16T23:16:03.000+0000" }, { "id": "367222", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\nMacOS 10.11 (15A284)\r\nStudio 4.4.0.201510161811\r\nTi SDK 5.2.0.v20151018201232\r\nAppc NPM 4.2.1-5\r\nAppc CLI 5.1.0-38\r\nTi CLI 5.0.5\r\nAlloy 1.7.16\r\nArrow 1.3.13\r\nXcode 7.0.1 (7A1001)\r\nNode v0.12.7\r\nJava 1.7.0_80\r\nproduction\r\n\r\nIn addition to previous tests the keyboards and return keys are now customizable as well.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-10-19T22:25:41.000+0000", "updated": "2015-10-19T22:25:41.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }