{ "id": "99310", "key": "TIMOB-10507", "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": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-18T11:56:40.000+0000", "created": "2012-08-16T02:41:20.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "alertdialog", "input", "password", "style", "textfield" ], "versions": [], "issuelinks": [], "assignee": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T22:13:16.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": [], "description": "It would be nice to have text and password inputs can be enabled for AlertDialog. \"style\" API property can be used for this purpose. (UIAlertView alertViewStyle property).\r\n\r\nFor example:\r\n\r\n{code}var dialog = Ti.UI.createAlertDialog({\r\n title: 'Please enter your name',\r\n style: Ti.UI.iOS.AlertDialogStyle.PLAIN_TEXT_INPUT /* default is Ti.UI.iOS.AlertDialogStyle.DEFAULT */\r\n});{code}\r\n\r\nand the text can be passed to AlertDialog's \"click\" event (fired by clickedButtonAtIndex).\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Text/password inputs for AlertDialog", "creator": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "subtasks": [], "reporter": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "environment": "iOS", "comment": { "comments": [ { "id": "215315", "author": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "body": "I'm going to submit pull request for this feature, here is the functional test code:\r\n\r\n{code}Titanium.UI.setBackgroundColor('#fff');\r\n\r\nvar win = Titanium.UI.createWindow({ \r\n title: 'Alert Dialog Style',\r\n backgroundColor: '#fff',\r\n layout: 'vertical'\r\n});\r\n\r\nvar dialog = Titanium.UI.createAlertDialog({\r\n\tmessage: 'Sample message...',\r\n\tbuttonNames: ['OK', 'Cancel', 'Baska']\r\n});\r\n\r\ndialog.addEventListener('click', function(e) {\r\n\tswitch (dialog.style) {\r\n\t\tcase Titanium.UI.iPhone.AlertDialogStyle.PLAIN_TEXT_INPUT:\r\n\t\t\tvalue_label.text = 'Plain Text Input: ' + e.text;\r\n\t\t\tbreak;\r\n\t\tcase Titanium.UI.iPhone.AlertDialogStyle.SECURE_TEXT_INPUT:\r\n\t\t\tvalue_label.text = 'Secure Text Input: ' + e.text;\r\n\t\t\tbreak;\r\n\t\tcase Titanium.UI.iPhone.AlertDialogStyle.LOGIN_AND_PASSWORD_INPUT:\r\n\t\t\tvalue_label.text = 'Login: ' + e.login + ' Password: ' + e.password;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tvalue_label.text = 'Default alert dialog shown. There will be no `text` or `login`, `password` event properties.';\r\n\t\t\tbreak;\r\n\t}\r\n});\r\n\r\nvar button_default = Titanium.UI.createButton({\r\n\ttop: 10,\r\n\ttitle: 'Default Dialog',\r\n\tstyle: Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\n\r\nbutton_default.addEventListener('click', function(e) {\r\n\tdialog.title = 'Default Dialog';\r\n\tdialog.style = Titanium.UI.iPhone.AlertDialogStyle.DEFAULT;\r\n\tdialog.show();\r\n});\r\n\r\nwin.add(button_default);\r\n\r\nvar button_plain = Titanium.UI.createButton({\r\n\ttop: 5,\r\n\ttitle: 'Plain Text Input Dialog',\r\n\tstyle: Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\n\r\nbutton_plain.addEventListener('click', function(e) {\r\n\tdialog.text = 'Enter text';\r\n\tdialog.style = Titanium.UI.iPhone.AlertDialogStyle.PLAIN_TEXT_INPUT;\r\n\tdialog.show();\r\n});\r\n\r\nwin.add(button_plain);\r\n\r\nvar button_secure = Titanium.UI.createButton({\r\n\ttop: 5,\r\n\ttitle: 'Secure Text Input Dialog',\r\n\tstyle: Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\n\r\nbutton_secure.addEventListener('click', function(e) {\r\n\tdialog.title = 'Enter password';\r\n\tdialog.style = Titanium.UI.iPhone.AlertDialogStyle.SECURE_TEXT_INPUT;\r\n\tdialog.show();\r\n});\r\n\r\nwin.add(button_secure);\r\n\r\nvar button_login_and_password = Titanium.UI.createButton({\r\n\ttop: 5,\r\n\ttitle: 'Login and Password Dialog',\r\n\tstyle: Titanium.UI.iPhone.SystemButtonStyle.BORDERED\r\n});\r\n\r\nbutton_login_and_password.addEventListener('click', function(e) {\r\n\tdialog.title = 'Enter login and password';\r\n\tdialog.style = Titanium.UI.iPhone.AlertDialogStyle.LOGIN_AND_PASSWORD_INPUT;\r\n\tdialog.show();\r\n});\r\n\r\nwin.add(button_login_and_password);\r\n\r\nvar label = Titanium.UI.createLabel({\r\n\ttop: 10,\r\n\ttext: 'Dialog Input Value(s):'\r\n});\r\n\r\nwin.add(label);\r\n\r\nvar value_label = Titanium.UI.createLabel({\r\n\ttop: 5,\r\n\ttext: ''\r\n});\r\n\r\nwin.add(value_label);\r\n\r\nwin.open();{code}", "updateAuthor": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-08-21T06:47:32.000+0000", "updated": "2012-08-21T06:47:32.000+0000" }, { "id": "215316", "author": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "body": "Git commit can be found at https://github.com/appcelerator/titanium_mobile/pull/2789\r\n\r\nI've functionally tested with the code below using iOS 5 SDK.", "updateAuthor": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-08-21T06:53:02.000+0000", "updated": "2012-08-21T06:53:02.000+0000" }, { "id": "219505", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "merge pulled.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-18T11:56:40.000+0000", "updated": "2012-09-18T11:56:40.000+0000" }, { "id": "410773", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T22:13:16.000+0000", "updated": "2017-03-09T22:13:16.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }