File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ public function entry_create(EntryAddRequest $request)
137137 abort (599 ,$ e ->getDetailedError ()->getErrorMessage ());
138138 }
139139
140- // @todo To test and valide this Exception is caught
140+ // @todo when we create an entry, and it already exists, enable a redirect to it
141141 } catch (LdapRecordException $ e ) {
142142 $ request ->flash ();
143143
Original file line number Diff line number Diff line change 3434@section (' page-scripts' )
3535 <script type =" text/javascript" >
3636 $ (document ).ready (function () {
37- var rdn_value_set = null ;
38- var rdn_attr = null ;
37+ var rdn_value_set = $ (' input#rdn_value' ).val ();
38+ rdn_attr = $ (' select#rdn' ).val ();
39+
40+ if (rdn_attr) {
41+ $ (' #' + rdn_attr).find (' input' ).attr (' readonly' ,true );
42+ set_rdn_value ();
43+ }
3944
4045 function set_rdn_value () {
4146 if (rdn_attr && rdn_value_set)
Original file line number Diff line number Diff line change 6868@section (' page-scripts' )
6969 <script type =" text/javascript" >
7070 var oc = {!! $oo -> getObject (' objectclass' )-> values ! !} ;
71+ var rdn_attr;
7172
7273 function editmode () {
7374 // Find all input items and turn off readonly
@@ -76,6 +77,10 @@ function editmode() {
7677 if ($ (this )[0 ].name .match (/ ^ objectclass/ ))
7778 return ;
7879
80+ // Dont take of the readonly value for our RDN if it is set
81+ if (rdn_attr && ($ (this )[0 ].name === rdn_attr+ ' []' ))
82+ return ;
83+
7984 $ (this ).attr (' readonly' ,false );
8085 });
8186
You can’t perform that action at this time.
0 commit comments