Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Lock "From" line Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Jeff U
Groupie
Groupie


Joined: 16 December 2007
Location: United States
Online Status: Offline
Posts: 58
Posted: 17 December 2007 at 8:07am | IP Logged Quote Jeff U

How can I lock the ability to change the "From" line. I found the snip in function.js but I am not sure how to lock the entry abiity on the form. .net version.

Thanks
Jeff
Back to Top View Jeff U's Profile Search for other posts by Jeff U
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 18 December 2007 at 2:05am | IP Logged Quote Andrew

To disable From field on compose message screen, you should change the following line in screen.new-message.js file (line 648):
Code:
var inp = CreateChildWithAttrs(td, 'input', [['type', 'text'], ['class', 'wm_input'], ['size', '93'], ['maxlength', '255']]);

replace with:
Code:
var inp = CreateChildWithAttrs(td, 'input', [['type', 'text'], ['class', 'wm_input'], ['size', '93'], ['maxlength', '255'], ['disabled', 'disabled']]);


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
Jeff U
Groupie
Groupie


Joined: 16 December 2007
Location: United States
Online Status: Offline
Posts: 58
Posted: 18 December 2007 at 7:17am | IP Logged Quote Jeff U

In the .net lite version? I don't have any file with that name.
Back to Top View Jeff U's Profile Search for other posts by Jeff U
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 19 December 2007 at 5:10am | IP Logged Quote Andrew

Sorry, that was about Pro version.

In the Lite version, you should modify functions.js file, line 740.

Before the line:
Code:
aCachePageElements[listc] = textfield;

insert:
Code:
if (listc == COMPOSE_MESSAGE_FROM) textfield.disabled = true;


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
Jeff U
Groupie
Groupie


Joined: 16 December 2007
Location: United States
Online Status: Offline
Posts: 58
Posted: 20 December 2007 at 7:54am | IP Logged Quote Jeff U

The closest line I have to that is:
aCachePageElements[listc] = textfield;
and your code snip did not do anything to that function.
Back to Top View Jeff U's Profile Search for other posts by Jeff U
 
Jeff U
Groupie
Groupie


Joined: 16 December 2007
Location: United States
Online Status: Offline
Posts: 58
Posted: 20 December 2007 at 8:10am | IP Logged Quote Jeff U

Found the problem. Needed to be:
if ([listc == COMPOSE_MESSAGE_FROM]) textfield.disabled = true;

Thanks
Jeff

Back to Top View Jeff U's Profile Search for other posts by Jeff U
 
Jeff U
Groupie
Groupie


Joined: 16 December 2007
Location: United States
Online Status: Offline
Posts: 58
Posted: 20 December 2007 at 8:14am | IP Logged Quote Jeff U

Spoke to soon. That just locked all entry out of the entire section.
Back to Top View Jeff U's Profile Search for other posts by Jeff U
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 21 December 2007 at 3:10am | IP Logged Quote Andrew

Is it the behavior you expected? If not, could you please describe how it behaves now and how you need it to behave?

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
Jeff U
Groupie
Groupie


Joined: 16 December 2007
Location: United States
Online Status: Offline
Posts: 58
Posted: 22 December 2007 at 9:04pm | IP Logged Quote Jeff U

I would like the from line to either be hidden from change, or not changeable to the end user.
Back to Top View Jeff U's Profile Search for other posts by Jeff U
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 24 December 2007 at 8:40am | IP Logged Quote Alex

In the WebMail Lite, you should modify functions.js file, line 725. It seems [i] was lost in our previous code sample (the forum engine treated it as italic tag). Here is the correction:

After the line:
Code:
var mm_tr = m_table.insertRow(-1);


insert (to hide the "From" line):
Code:
if (listc[i] == COMPOSE_MESSAGE_FROM) textfield.disabled = true;


or insert (to make the "From" line read-only):
Code:
if (listc[i] == COMPOSE_MESSAGE_FROM) mm_tr.style.display = 'none';



Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Jeff U
Groupie
Groupie


Joined: 16 December 2007
Location: United States
Online Status: Offline
Posts: 58
Posted: 27 December 2007 at 7:09am | IP Logged Quote Jeff U

Thats what I was after, thanks. The new version out yet?

Jeff
Back to Top View Jeff U's Profile Search for other posts by Jeff U
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 27 December 2007 at 8:19am | IP Logged Quote Alex

WebMail Lite v4.1 went internal testing stage. We expected it to be released in January 2008.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
maxline
Newbie
Newbie


Joined: 04 February 2008
Location: India
Online Status: Offline
Posts: 1
Posted: 04 February 2008 at 12:26pm | IP Logged Quote maxline

How do i Block the From Field in the Latest release
Back to Top View maxline's Profile Search for other posts by maxline
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 05 February 2008 at 1:18am | IP Logged Quote Andrew

Instructions are the same as in the second post of this topic, i.e. screen.new-message.js file, but line ~410 instead of 648.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
Jeff U
Groupie
Groupie


Joined: 16 December 2007
Location: United States
Online Status: Offline
Posts: 58
Posted: 14 March 2008 at 11:48am | IP Logged Quote Jeff U

Andrew,
How would I set the from field in WebMail Lite PHP to read only?

Thanks
Jeff
Back to Top View Jeff U's Profile Search for other posts by Jeff U
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 15 March 2008 at 4:07am | IP Logged Quote Andrew

The modifications described above for ASP.NET version of WebMail Lite (disabling From field) are correct for PHP version too.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
shashi_nsp
Newbie
Newbie
Avatar

Joined: 01 March 2009
Location: Oman
Online Status: Offline
Posts: 6
Posted: 01 March 2009 at 10:47pm | IP Logged Quote shashi_nsp

Jeff U wrote:
How can I lock the ability to change the "From" line. I found the snip in function.js but I am not sure how to lock the entry abiity on the form. .net version.

Thanks
Jeff


See the Line Num 738 & Change the From Filed Type to hidden.
----------------------
tr = tbl.insertRow(RowIndex++);
           td = tr.insertCell(0);
           td.className = 'wm_new_message_title';
           td.innerHTML = ' ';
           WebMail.LangChanger.Register('innerHTML', td, ' ', ' ');
           td = tr.insertCell(1);
           var inp = CreateChildWithAttrs(td, 'input', [['type', 'hidden'], ['class', 'wm_input'], ['size', '93'], ['maxlength', '255']]);
           inp.tabIndex = 1;
           this._fromObj = inp;
Back to Top View shashi_nsp's Profile Search for other posts by shashi_nsp
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide