Index: lams_admin/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -r60dd4bbd334d67e6ced927859c35ca83720db776 -r4c3ad5024c58eb93d1b4190c5ad4960374e1f408 --- lams_admin/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 60dd4bbd334d67e6ced927859c35ca83720db776) +++ lams_admin/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 4c3ad5024c58eb93d1b4190c5ad4960374e1f408) @@ -626,6 +626,7 @@ config.smtp.port =SMTP port config.smtp.auth.security =SMTP authentication security config.server.country =Country +config.enable.portrait.editing =Enable profile portrait editing #======= End labels: Exported 620 labels for en AU ===== Index: lams_central/web/includes/javascript/webrtc-capturestill.js =================================================================== diff -u -r1783f39beaef59b68da9b1f1fe51004326254e16 -r4c3ad5024c58eb93d1b4190c5ad4960374e1f408 --- lams_central/web/includes/javascript/webrtc-capturestill.js (.../webrtc-capturestill.js) (revision 1783f39beaef59b68da9b1f1fe51004326254e16) +++ lams_central/web/includes/javascript/webrtc-capturestill.js (.../webrtc-capturestill.js) (revision 4c3ad5024c58eb93d1b4190c5ad4960374e1f408) @@ -30,6 +30,10 @@ photo = document.getElementById('photo'); startbutton = document.getElementById('startbutton'); + //*LAMS* don't initialize anything if profile portrait editing setting is off + if (photo === null) { + return; + } //*LAMS* onload event added by LAMS photo.onload = function() { if (typeof objectURL !== 'undefined') { Index: lams_central/web/profile/portrait.jsp =================================================================== diff -u -r0b4befa34c851fe0ca354488c0d090639dc97cea -r4c3ad5024c58eb93d1b4190c5ad4960374e1f408 --- lams_central/web/profile/portrait.jsp (.../portrait.jsp) (revision 0b4befa34c851fe0ca354488c0d090639dc97cea) +++ lams_central/web/profile/portrait.jsp (.../portrait.jsp) (revision 4c3ad5024c58eb93d1b4190c5ad4960374e1f408) @@ -8,6 +8,10 @@ <%@ taglib uri="tags-fmt" prefix="fmt"%> <%@ taglib uri="tags-lams" prefix="lams"%> +<%@ page import="org.lamsfoundation.lams.util.Configuration" %> +<%@ page import="org.lamsfoundation.lams.util.ConfigurationKeys" %> +<%=Configuration.get(ConfigurationKeys.ENABLE_PORTRAIT_EDITING)%> + @@ -146,80 +150,82 @@ - -
- -
- - -
-
- -
- -
- - - - - - -
-
-
+ +
+ + +
+ + +
+
+ +
+
- - - + + + + + +
+
+
+
+ + + + +
+
+
+
+ + +
+ -
-
- - -
- - -
-
-
- - -

- -

-
- - - - -
-
-
-
+
Index: lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch20180907.sql =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch20180907.sql (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch20180907.sql (revision 4c3ad5024c58eb93d1b4190c5ad4960374e1f408) @@ -0,0 +1,15 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4658 Enable profile portrait editing +INSERT INTO lams_configuration (config_key, config_value, description_key, header_name, format, required) +VALUES ('EnablePortraitEditing','true', 'config.enable.portrait.editing', 'config.header.features', 'BOOLEAN', 0); + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_common/src/java/org/lamsfoundation/lams/util/ConfigurationKeys.java =================================================================== diff -u -r360e2f8861e2162c11f54e995d92919aaa808cd4 -r4c3ad5024c58eb93d1b4190c5ad4960374e1f408 --- lams_common/src/java/org/lamsfoundation/lams/util/ConfigurationKeys.java (.../ConfigurationKeys.java) (revision 360e2f8861e2162c11f54e995d92919aaa808cd4) +++ lams_common/src/java/org/lamsfoundation/lams/util/ConfigurationKeys.java (.../ConfigurationKeys.java) (revision 4c3ad5024c58eb93d1b4190c5ad4960374e1f408) @@ -119,6 +119,8 @@ public static String ALLOW_KUMALIVE = "AllowKumalive"; public static String DISPLAY_PORTRAIT = "DisplayPortrait"; + + public static String ENABLE_PORTRAIT_EDITING = "EnablePortraitEditing"; public static String SHOW_ALL_MY_LESSON_LINK = "ShowAllMyLessonLink";